[Intel-gfx] [PATCH 1/2] drm/i915/hsw: Add I915_EXEC_RESOURCE_STREAMER flag
Kenneth Graunke
kenneth at whitecape.org
Wed Oct 9 23:40:22 CEST 2013
On 10/08/2013 02:09 PM, Abdiel Janulgue wrote:
> Ensures that the batch buffer is executed by the resource streamer.
>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_execbuffer.c | 2 ++
> include/uapi/drm/i915_drm.h | 5 +++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 0ce0d47..4a56c58 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -962,6 +962,8 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
> case I915_EXEC_DEFAULT:
> case I915_EXEC_RENDER:
> ring = &dev_priv->ring[RCS];
> + flags |= (args->flags & I915_EXEC_RESOURCE_STREAMER) ?
> + I915_EXEC_RESOURCE_STREAMER : 0;
> break;
> case I915_EXEC_BSD:
> ring = &dev_priv->ring[VCS];
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 3a4e97b..5a4bd16 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -731,6 +731,11 @@ struct drm_i915_gem_execbuffer2 {
> */
> #define I915_EXEC_HANDLE_LUT (1<<12)
>
> +/** Tell the kernel that the batchbuffer is processed by
> + * the resource streamer.
> + */
> +#define I915_EXEC_RESOURCE_STREAMER (1<<13)
> +
> #define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_HANDLE_LUT<<1)
>
> #define I915_EXEC_CONTEXT_ID_MASK (0xffffffff)
>
I think you need to change __I915_EXEC_UNKNOWN_FLAGS to:
#define __I915_EXEC_UNKNOWN_FLAGS -(I915_EXEC_RESOURCE_STREAMER<<1)
since you've added a new bit.
More information about the Intel-gfx
mailing list