Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9739e746 authored by Daniel Vetter's avatar Daniel Vetter Committed by Eric Anholt
Browse files

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: default avatarEric Anholt <eric@anholt.net>
Fixes: 29dc0d1d ("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: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170330204831.8225-1-daniel.vetter@ffwll.ch


Tested-by: default avatarEric Anholt <eric@anholt.net>
Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
parent bcd2ba02
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -872,7 +872,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
	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;