dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/atomic-helper: Do not call ->mode_fixup for CRTC which will be disabled
@ 2016-05-27  9:35 Liu Ying
  2016-05-30  8:46 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Liu Ying @ 2016-05-27  9:35 UTC (permalink / raw)
  To: dri-devel

When a CRTC is going to be disabled, it's state may contain a display mode
with zeroed content.  This could be reproduced by HDMI cable hotplug out
operation with legacy fbdev support in dual display cases.  It would confuse
driver's CRTC callback ->mode_fixup and make the total state be rejected.
So, let's don't call the callback for the CRTC.

Signed-off-by: Liu Ying <gnuiyl@gmail.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ddfa0d1..939df90 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -414,6 +414,9 @@ mode_fixup(struct drm_atomic_state *state)
 	for_each_crtc_in_state(state, crtc, crtc_state, i) {
 		const struct drm_crtc_helper_funcs *funcs;
 
+		if (!crtc_state->enable)
+			continue;
+
 		if (!crtc_state->mode_changed &&
 		    !crtc_state->connectors_changed)
 			continue;
-- 
2.7.4

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

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

end of thread, other threads:[~2016-05-30  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27  9:35 [PATCH] drm/atomic-helper: Do not call ->mode_fixup for CRTC which will be disabled Liu Ying
2016-05-30  8:46 ` Daniel Vetter
2016-05-30  9:59   ` Ying Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox