dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/ast: Don't check new mode if CRTC is being disabled
@ 2020-04-30  9:13 Thomas Zimmermann
  2020-04-30  9:22 ` Sam Ravnborg
  2020-05-01 13:20 ` Emil Velikov
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Zimmermann @ 2020-04-30  9:13 UTC (permalink / raw)
  To: airlied, daniel, kraxel, sam, emil.velikov, cogarre
  Cc: Thomas Zimmermann, dri-devel

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

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/ast/ast_mode.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 7a9f20a2fd303..089b7d9a0cf3f 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -801,6 +801,9 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
 		return -EINVAL;
 	}
 
+	if (!state->enable)
+		return 0; /* no checks required if CRTC is being disabled */
+
 	ast_state = to_ast_crtc_state(state);
 
 	format = ast_state->format;
-- 
2.26.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-05-06 10:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30  9:13 [PATCH] drm/ast: Don't check new mode if CRTC is being disabled Thomas Zimmermann
2020-04-30  9:22 ` Sam Ravnborg
2020-04-30  9:44   ` Thomas Zimmermann
2020-05-01 13:20 ` Emil Velikov
2020-05-04 12:07   ` Thomas Zimmermann
2020-05-04 15:31     ` Daniel Vetter
2020-05-06  8:06       ` Thomas Zimmermann
2020-05-06 10:58         ` Daniel Vetter
2020-05-05 14:13     ` Emil Velikov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).