Skip to content

Commit 69e6300

Browse files
Liu Yingalexdeucher
authored andcommitted
drm/atomic: Check new_crtc_state->active to determine if CRTC needs disable in self refresh mode
Actual hardware state of CRTC is controlled by the member 'active' in struct drm_crtc_state instead of the member 'enable', according to the kernel doc of the member 'enable'. In fact, the drm client modeset and atomic helpers are using the member 'active' to do the control. Referencing the member 'enable' of new_crtc_state, the function crtc_needs_disable() may fail to reflect if CRTC needs disable in self refresh mode, e.g., when the framebuffer emulation will be blanked through the client modeset helper with the next commit, the member 'enable' of new_crtc_state is still true while the member 'active' is false, hence the relevant potential encoder and bridges won't be disabled. So, let's check new_crtc_state->active to determine if CRTC needs disable in self refresh mode instead of new_crtc_state->enable. Fixes: 1452c25 ("drm: Add helpers to kick off self refresh mode in drivers") Cc: Sean Paul <[email protected]> Cc: Rob Clark <[email protected]> Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Liu Ying <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 5da8b49 commit 69e6300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ crtc_needs_disable(struct drm_crtc_state *old_state,
10161016
* it's in self refresh mode and needs to be fully disabled.
10171017
*/
10181018
return old_state->active ||
1019-
(old_state->self_refresh_active && !new_state->enable) ||
1019+
(old_state->self_refresh_active && !new_state->active) ||
10201020
new_state->self_refresh_active;
10211021
}
10221022

0 commit comments

Comments
 (0)