Commit 2e064163 authored by Daniel Vetter's avatar Daniel Vetter Committed by Sean Paul

drm: Only take cursor locks when the cursor plane exists

I thought I've fixed this, but maybe not. Anyway, clearly broken, and
easy fix.

Cc: Tony Lindgren <tony@atomide.com>
Reported-by: default avatarTony Lindgren <tony@atomide.com>
Fixes: b95ff031 ("drm: Remove drm_modeset_(un)lock_crtc")
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarDaniel Stone <daniels@collabora.com>
Signed-off-by: default avatarSean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170407164817.28272-1-daniel.vetter@ffwll.ch
parent 3bacf436
......@@ -720,15 +720,15 @@ static int drm_mode_cursor_common(struct drm_device *dev,
ret = drm_modeset_lock(&crtc->mutex, &ctx);
if (ret)
goto out;
ret = drm_modeset_lock(&crtc->cursor->mutex, &ctx);
if (ret)
goto out;
/*
* If this crtc has a universal cursor plane, call that plane's update
* handler rather than using legacy cursor handlers.
*/
if (crtc->cursor) {
ret = drm_modeset_lock(&crtc->cursor->mutex, &ctx);
if (ret)
goto out;
ret = drm_mode_cursor_universal(crtc, req, file_priv, &ctx);
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment