summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-10-21 09:52:18 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2016-10-21 11:33:47 +0100
commitb9cebe59f9ddc1b38e47514e04a37b6de4efe2df (patch)
tree36ce9be0c234324ced5715671272161b63e06a6a
parent6a2e5bca4214a3785f20fa8ba3dce5325ef75a27 (diff)
sna: Ignore the current CRTC mode following a hotplug event
If we detect a change in the output status, ignore the residual mode on the CRTC. We use this CRTC mode during inheritance to provide continuity and to make xrandr look neat we ensure that the mode is included in the output list. However, following a hotplug event the current mode may now be invalid and needs to be pruned. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 5e8c50a5..9d60d9a0 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -272,6 +272,7 @@ struct sna_output {
uint32_t last_detect;
uint32_t status;
+ unsigned int hotplug_count;
bool update_properties;
bool reprobe;
@@ -3971,7 +3972,7 @@ sna_output_get_modes(xf86OutputPtr output)
sna_output_attach_tile(output);
current = NULL;
- if (output->crtc) {
+ if (output->crtc && !sna_output->hotplug_count) {
struct drm_mode_crtc mode;
VG_CLEAR(mode);
@@ -5302,6 +5303,7 @@ void sna_mode_discover(struct sna *sna, bool tell)
} else {
DBG(("%s: output %s (id=%d), changed state, reprobing\n",
__FUNCTION__, output->name, sna_output->id));
+ sna_output->hotplug_count++;
sna_output->last_detect = 0;
changed |= 4;
}