]> Git Repo - linux.git/commitdiff
drm: Only take cursor locks when the cursor plane exists
authorDaniel Vetter <[email protected]>
Fri, 7 Apr 2017 16:48:17 +0000 (18:48 +0200)
committerSean Paul <[email protected]>
Fri, 7 Apr 2017 17:28:32 +0000 (13:28 -0400)
I thought I've fixed this, but maybe not. Anyway, clearly broken, and
easy fix.

Cc: Tony Lindgren <[email protected]>
Reported-by: Tony Lindgren <[email protected]>
Fixes: b95ff0319a82 ("drm: Remove drm_modeset_(un)lock_crtc")
Cc: Harry Wentland <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: David Airlie <[email protected]>
Cc: [email protected]
Signed-off-by: Daniel Vetter <[email protected]>
Tested-by: Tony Lindgren <[email protected]>
Reviewed-by: Daniel Stone <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/drm_plane.c

index 838ca742a28b8da731d021857e9dd2db992e9d08..fedd4d60d9cd5b2bab64ed8aae1391ea2f402fc5 100644 (file)
@@ -720,15 +720,15 @@ retry:
        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;
        }
This page took 0.060051 seconds and 4 git commands to generate.