aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_plane.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-03-30 22:48:31 +0200
committerEric Anholt <eric@anholt.net>2017-03-30 17:28:24 -0700
commit9739e7464691456dd7c297b92ef0783fe13f6ba5 (patch)
tree665f02f821fcca7c616f9b217c767fbcc0fbfb1f /drivers/gpu/drm/drm_plane.c
parentdrm: Clarify the role of plane_state argument to drm_simple update(). (diff)
downloadlinux-dev-9739e7464691456dd7c297b92ef0783fe13f6ba5.tar.xz
linux-dev-9739e7464691456dd7c297b92ef0783fe13f6ba5.zip
drm: Fix locking gotcha in page_flip ioctl
We want to lock the primary plane, not the cursor (which might be optional). Real bad case of copy-paste fail, unfortunately our CI didn't catch that because i915 does have a cursor plane. Reported-by: Eric Anholt <eric@anholt.net> Fixes: 29dc0d1de182 ("drm: Roll out acquire context for the page_flip ioctl") Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Sean Paul <seanpaul@chromium.org> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170330204831.8225-1-daniel.vetter@ffwll.ch Tested-by: Eric Anholt <eric@anholt.net> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Diffstat (limited to 'drivers/gpu/drm/drm_plane.c')
-rw-r--r--drivers/gpu/drm/drm_plane.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 5eca3184a747..bc71aa2b7872 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -872,7 +872,7 @@ retry:
ret = drm_modeset_lock(&crtc->mutex, &ctx);
if (ret)
goto out;
- ret = drm_modeset_lock(&crtc->cursor->mutex, &ctx);
+ ret = drm_modeset_lock(&crtc->primary->mutex, &ctx);
if (ret)
goto out;