[Intel-gfx] [PATCH 11/13] drm/i915: Use fb modifiers in intel_check_cursor_plane

Daniel Vetter daniel at ffwll.ch
Tue Feb 10 23:53:42 PST 2015


On Tue, Feb 10, 2015 at 05:16:14PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Also drop the mutex since with universal planes object tiling mode is
> locked down while assigned to a framebuffer.

I've clarified this to say that universal implies fb exists, and that
implies the tiling is locked down.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 38c2909..edd6cfe 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12175,12 +12175,11 @@ intel_check_cursor_plane(struct drm_plane *plane,
>  		return 0;
>  
>  	/* we only need to pin inside GTT if cursor is non-phy */
> -	mutex_lock(&dev->struct_mutex);
> -	if (!INTEL_INFO(dev)->cursor_needs_physical && obj->tiling_mode) {
> +	if (!INTEL_INFO(dev)->cursor_needs_physical &&

I've dropped the cursor_needs_physical check here too because it doesn't
make a lot of sense really. Tiled cursors really don't make any sense at
all.
-Daniel

> +	    fb->modifier[0] != DRM_FORMAT_MOD_NONE) {
>  		DRM_DEBUG_KMS("cursor cannot be tiled\n");
>  		ret = -EINVAL;
>  	}
> -	mutex_unlock(&dev->struct_mutex);
>  
>  finish:
>  	if (intel_crtc->active) {
> -- 
> 2.2.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Intel-gfx mailing list