Commit d6ddbd5c authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/ast: Don't check new mode if CRTC is being disabled

Suspending failed because there's no mode if the CRTC is being
disabled. Early-out in this case. This fixes runtime PM for ast.

v3:
	* fixed commit message
v2:
	* added Tested-by/Reported-by tags
	* added Fixes tags and CC (Sam)
	* improved comment
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reported-by: default avatarCary Garrett <cogarre@gmail.com>
Tested-by: default avatarCary Garrett <cogarre@gmail.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Fixes: b48e1b6f ("drm/ast: Add CRTC helpers for atomic modesetting")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: <stable@vger.kernel.org> # v5.6+
Link: https://patchwork.freedesktop.org/patch/msgid/20200507090640.21561-1-tzimmermann@suse.de
parent 3a53230e
......@@ -802,6 +802,9 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
return -EINVAL;
}
if (!state->enable)
return 0; /* no mode checks if CRTC is being disabled */
ast_state = to_ast_crtc_state(state);
format = ast_state->format;
......
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