diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-22 17:53:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-22 18:46:26 +0100 |
commit | f22ea4e821a33eccd3a9283d7ab048857008f7e8 (patch) | |
tree | af17ec000d95558e9a82000b817d5670d099d33e /src | |
parent | dca0f1c2ccf14df38764ed12b971dc491cf22608 (diff) |
sna: Disable unused CRTC after undock events
If undocking removes output (as the MST topology changes and some
outputs then become unreachable), we may leave dangling CRTC. This
confuses us, so disable any enabled but unconnected CRTC after the
undock event.
Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
References: https://bugs.freedesktop.org/show_bug.cgi?id=80355#c5
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_display.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 0cee970d..e7dd3d8d 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -3506,6 +3506,7 @@ static void sna_output_del(xf86OutputPtr output) xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int i; + DBG(("%s(%s)\n", __FUNCTION__, output->name)); assert(to_sna_output(output)); RROutputDestroy(output->randr_output); @@ -3549,7 +3550,7 @@ void sna_mode_discover(struct sna *sna) struct drm_mode_card_res res; uint32_t connectors[32]; int i, j, serial; - bool changed = false; + int changed = 0; VG_CLEAR(connectors); @@ -3589,7 +3590,7 @@ void sna_mode_discover(struct sna *sna) to_sna_output(output)->id = 0; output->crtc = NULL; } - changed = true; + changed |= 2; } } @@ -3598,6 +3599,10 @@ void sna_mode_discover(struct sna *sna) /* Reorder user visible listing */ sort_randr_outputs(sna, screen); + + if (changed & 2) + xf86DisableUnusedFunctions(sna->scrn); + xf86RandR12TellChanged(screen); } } |