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>
This commit is contained in:
Chris Wilson 2013-09-07 22:07:04 +01:00
parent 7ee7e373f2
commit 6a6517c748
1 changed files with 4 additions and 0 deletions

View File

@ -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];