sna: Clear the transform flag on disabling the CRTC
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 21 Jun 2014 14:43:32 +0000 (15:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 21 Jun 2014 14:45:39 +0000 (15:45 +0100)
In places, we assume that if the flag is set, we must have an active
CRTC. However, we were not clearing when disabling the CRTC.

Reported-by: Sree Harsha Totakura <freedesktop@h.totakura.in>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80325
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/sna/sna_display.c

index bc35a67..305bccf 100644 (file)
@@ -1410,7 +1410,10 @@ sna_crtc_disable(xf86CrtcPtr crtc)
                sna->mode.dirty = true;
        }
 
+       sna_crtc->transform = false;
+
        assert(sna_crtc->dpms_mode == DPMSModeOff);
+       assert(!sna_crtc->shadow);
 }
 
 static void update_flush_interval(struct sna *sna)
@@ -6213,6 +6216,7 @@ void sna_mode_redisplay(struct sna *sna)
                        continue;
 
                assert(crtc->enabled);
+               assert(sna_crtc->bo);
 
                damage.extents = crtc->bounds;
                damage.data = NULL;