aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTvrtko Ursulin <[email protected]>2015-02-10 17:16:14 +0000
committerDaniel Vetter <[email protected]>2015-02-13 23:28:20 +0100
commit6a418fcd84d655e97333627c4247a318e99b0ecf (patch)
tree36e6f23a44cc2e631ef7ee55fc0898929bbc5ffd
parent66ebf56714ed0b475afc5fb91c7e7230cf86c2a6 (diff)
drm/i915: Use fb modifiers in intel_check_cursor_plane
Also drop the mutex since with universal planes there is always a proper framebuffer around which wraps the underlying bo. Which means tiling is locked down. This was different in the old code which directly took gem handles. The looking though was always cargo-cult since races where not prevented in any way. v2: Unconditionally enforce untiled, because cursors are always untiled. The check for physical or gtt cursor is irrelevant. Also clarify the commit message a bit Signed-off-by: Tvrtko Ursulin <[email protected]> (v1) Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4b01876b760f..ddf890767461 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12173,13 +12173,10 @@ intel_check_cursor_plane(struct drm_plane *plane,
if (fb == crtc->cursor->fb)
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 (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) {