summaryrefslogtreecommitdiff
path: root/src/sna/sna_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-09-07 22:07:04 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-09-07 22:07:04 +0100
commit6a6517c748c33a73c92ca67cae9bfb00d48d2382 (patch)
treee2f99c429e12f45d6e498198e1265afe40c0b4ad /src/sna/sna_display.c
parent7ee7e373f24b0c4604dbf67f7ff82bdb7edc55d1 (diff)
sna: Only update the CRTCs after a resize if master
It appears possible to race the framebuffer resize with a VT switch and so end up attempting to update the CRTCs whilst master. The code complains, but in reality we can just ignore the requested change until we VT switch back and then apply the updates upon restoration of master. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r--src/sna/sna_display.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 7bbf40fe..be02a786 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -2782,6 +2782,10 @@ sna_mode_resize(ScrnInfoPtr scrn, int width, int height)
scrn->virtualY = height;
scrn->displayWidth = width;
+ /* Only update the CRTCs if we are in control */
+ if (!scrn->vtSema)
+ return TRUE;
+
for (i = 0; i < xf86_config->num_crtc; i++) {
xf86CrtcPtr crtc = xf86_config->crtc[i];