i965: Enable resource streamer for the batchbuffer
authorAbdiel Janulgue <abdiel.janulgue@linux.intel.com>
Tue, 2 Jul 2013 15:48:22 +0000 (11:48 -0400)
committerAbdiel Janulgue <abdiel.janulgue@linux.intel.com>
Sat, 18 Jul 2015 13:16:52 +0000 (16:16 +0300)
commit090529af1828817344e0850ef27eebd1f096eb5f
treec0266a93c9415b13b277b6cb4fe476c1516939de
parentccf9598ad7681f5c9c87e9ca8bf856fcb5198b45
i965: Enable resource streamer for the batchbuffer

Check first if the hardware and kernel supports resource streamer. If this
is allowed, tell the kernel to enable the resource streamer enable bit on
MI_BATCHBUFFER_START by specifying I915_EXEC_RESOURCE_STREAMER
execbuffer flags.

v2: - Use new I915_PARAM_HAS_RESOURCE_STREAMER ioctl to check if kernel
      supports RS (Ken).
    - Add brw_device_info::has_resource_streamer and toggle it for
      Haswell, Broadwell, Cherryview, Skylake, and Broxton (Ken).
v3: - Update I915_PARAM_HAS_RESOURCE_STREAMER to match updated kernel.
v4: - Always inspect the getparam.value (Chris Wilson).
v5: - Fold redundant devinfo->has_resource_streamer check in context create
      into init screen.

Cc: kenneth@whitecape.org
Cc: chris@chris-wilson.co.uk
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_context.h
src/mesa/drivers/dri/i965/brw_device_info.c
src/mesa/drivers/dri/i965/brw_device_info.h
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.h