drm: allow changing DPMS mode
authorMarta Lofstedt <[email protected]>
Mon, 5 Dec 2016 12:04:08 +0000 (14:04 +0200)
committerDaniel Vetter <[email protected]>
Tue, 6 Dec 2016 09:03:28 +0000 (10:03 +0100)
The drm_atomic_helper_connector_dpms
will set the connector back the old DPMS state
before returning. This makes it impossible to change
DPMS state of the connector.

Fixes: 0853695c3ba46f97dfc0b5885f7b7e640ca212dd
v2: edit of commit message
Cc: Chris Wilson <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Eric Engestrom <[email protected]>
Cc: Sean Paul <[email protected]>
Cc: [email protected]
Cc: <[email protected]>
Signed-off-by: Marta Lofstedt <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/drm_atomic_helper.c

index 494680c9056e31d6b1249d922853734ffb6fdffd..6a5acb91fa7f95257375af3303061f6d980fd5da 100644 (file)
@@ -2885,8 +2885,8 @@ retry:
 fail:
        if (ret == -EDEADLK)
                goto backoff;
-
-       connector->dpms = old_mode;
+       if (ret != 0)
+               connector->dpms = old_mode;
        drm_atomic_state_put(state);
        return ret;