Re: [PATCH 2/2] drm/i915/bdw: Expose I915_EXEC_RESOURCE_STREAMER flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 06, 2014 at 10:25:06PM +0300, Abdiel Janulgue wrote:
> Ensures that the batch buffer is executed by the resource streamer
> 
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |    8 ++++++++
>  include/uapi/drm/i915_drm.h                |    7 ++++++-
>  2 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> index 47fe8ec..68aaa9b 100644
> --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> @@ -1074,6 +1074,14 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
>  	if (args->flags & I915_EXEC_IS_PINNED)
>  		flags |= I915_DISPATCH_PINNED;
>  
> +	if (args->flags & I915_EXEC_RESOURCE_STREAMER) {
> +		if ((args->flags & I915_EXEC_RING_MASK) != I915_EXEC_RENDER ||
> +		    !IS_BROADWELL(dev))
> +			return -EINVAL;

This misses I915_EXEC_DEFAULT. If you reorder this testing to after we
decide upon which ring is being run, this should look simpler.

 if (args->flags & I915_EXEC_RESOURCE_STREAMER) {
	if (!IS_BROADWELL(dev)) {
		DRM_DEBUG("resource streamer is only enabled for Broadwell\n");
		return -EINVAL;
	}
	if (ring->id != RCS) {
		DRM_DEBUG("resource streamer is only available on the render ring (not %s)\n", ring->name);
		return -EINVAL;
	}
	flags |= I915_DISPATCH_RS;
 }
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux