[Intel-gfx] [PATCH v3 3/6] drm/i915: Amalgamate flushing of display objects

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Wed Feb 22 10:57:51 UTC 2017


Add the message from your reply.

On ke, 2017-02-22 at 09:41 +0000, Chris Wilson wrote:
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP>

> @@ -1613,23 +1613,16 @@ i915_gem_sw_finish_ioctl(struct drm_device *dev, void *data,
>  {
>  	struct drm_i915_gem_sw_finish *args = data;
>  	struct drm_i915_gem_object *obj;
> -	int err = 0;
>  
>  	obj = i915_gem_object_lookup(file, args->handle);
>  	if (!obj)
>  		return -ENOENT;
>  
>  	/* Pinned buffers may be scanout, so flush the cache */
> -	if (READ_ONCE(obj->pin_display)) {
> -		err = i915_mutex_lock_interruptible(dev);
> -		if (!err) {
> -			i915_gem_object_flush_cpu_write_domain(obj);
> -			mutex_unlock(&dev->struct_mutex);
> -		}
> -	}
> -
> +	i915_gem_object_flush_to_display(obj);

.._flush_if_display() and this is

Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list