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

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Tue Feb 10 09:16:14 PST 2015


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.

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 &&
+	    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



More information about the Intel-gfx mailing list