summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-02-12 09:51:38 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2015-02-12 09:51:38 +0000
commit147e190d1e18d3ac6dc23aa4e493eec28aa75d1d (patch)
treebc55c0684dd384636d384dc89b97c73288acde59 /src
parent8348927c37b0550ce666d1156b0860b15de2a35a (diff)
sna: When turning off outputs whilst DPMS off, update the right counters
Whilst the outputs are hidden, if we want to disable a CRTC, we want to manipulate the hidden counter as opposed to current front_active counter. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/sna_display.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index 423b93db..4f4ffdc1 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -1541,8 +1541,13 @@ __sna_crtc_disable(struct sna *sna, struct sna_crtc *sna_crtc)
kgem_bo_destroy(&sna->kgem, sna_crtc->bo);
sna_crtc->bo = NULL;
- assert(sna->mode.front_active);
- sna->mode.front_active--;
+ if (sna->mode.hidden) {
+ sna->mode.hidden--;
+ assert(sna->mode.hidden);
+ } else {
+ assert(sna->mode.front_active);
+ sna->mode.front_active--;
+ }
sna->mode.dirty = true;
}
@@ -2379,6 +2384,7 @@ retry: /* Attach per-crtc pixmap or direct */
sna_crtc_randr(crtc);
if (sna_crtc->transform)
sna_crtc_damage(crtc);
+ assert(!sna->mode.hidden);
sna->mode.front_active += saved_bo == NULL;
sna->mode.dirty = true;
DBG(("%s: handle=%d, scanout_active=%d, front_active=%d\n",