From 6a6517c748c33a73c92ca67cae9bfb00d48d2382 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 7 Sep 2013 22:07:04 +0100 Subject: [PATCH] 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 Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 4 ++++ 1 file changed, 4 insertions(+) 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];