From ee7ed478a2bb81c923d29106b0b1dfd73161c2fc Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Sep 2014 08:20:03 +0100 Subject: [PATCH] sna: Skip over hotunplugged outputs during CRTC set These outputs are already marked as disconnected and so should be excluded from the CRTC set, but to be safe skip over them. Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index a1a87825..c972e316 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -981,6 +981,13 @@ sna_crtc_apply(xf86CrtcPtr crtc) if (output->crtc != crtc) continue; + /* Skip over any hotunplugged outputs so that we can + * recover in cases where the previous mode is now + * only partially valid. + */ + if (!to_sna_output(output)->id) + continue; + DBG(("%s: attaching output '%s' %d [%d] to crtc:%d (pipe %d) (possible crtc:%x, possible clones:%x)\n", __FUNCTION__, output->name, i, to_connector_id(output), sna_crtc->id, sna_crtc->pipe,