[Intel-gfx] [PATCH 17/18] drm/i915: add I915_EXEC_VEBOX to i915_gem_do_execbuffer()

Damien Lespiau damien.lespiau at intel.com
Tue May 28 17:08:38 CEST 2013


On Sat, Apr 27, 2013 at 05:59:28PM -0700, Ben Widawsky wrote:
> From: "Xiang, Haihao" <haihao.xiang at intel.com>
> 
> A user can run batchbuffer via VEBOX ring.
> 
> Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
> [Order changed by]
> Signed-off-by: Ben Widawsky <ben at bwidawsk.net>

Reviewed-by: Damien Lespiau <damien.lespiau at intel.com>

-- 
Damien

> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c | 9 +++++++++
>  include/uapi/drm/i915_drm.h                | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 117ce38..a8bb62c 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -885,6 +885,15 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
>  			return -EPERM;
>  		}
>  		break;
> +	case I915_EXEC_VEBOX:
> +		ring = &dev_priv->ring[VECS];
> +		if (ctx_id != 0) {
> +			DRM_DEBUG("Ring %s doesn't support contexts\n",
> +				  ring->name);
> +			return -EPERM;
> +		}
> +		break;
> +
>  	default:
>  		DRM_DEBUG("execbuf with unknown ring: %d\n",
>  			  (int)(args->flags & I915_EXEC_RING_MASK));
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 07d5941..81b9981 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -660,6 +660,7 @@ struct drm_i915_gem_execbuffer2 {
>  #define I915_EXEC_RENDER                 (1<<0)
>  #define I915_EXEC_BSD                    (2<<0)
>  #define I915_EXEC_BLT                    (3<<0)
> +#define I915_EXEC_VEBOX                  (4<<0)
>  
>  /* Used for switching the constants addressing mode on gen4+ RENDER ring.
>   * Gen6+ only supports relative addressing to dynamic state (default) and
> -- 
> 1.8.2.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx



More information about the Intel-gfx mailing list