diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-10 16:20:52 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-10 16:20:52 +0000 |
commit | 8c3b82f207bc8cf697646d3324cb4103da3b7856 (patch) | |
tree | 882294ade8a80845b7d2bed6ab05ef638d8811c1 | |
parent | d1b479a3404e6b52a23e0443c36d0682cbaf3c2f (diff) |
sna: Avoid reusing the same 'busy' bit for two different meanings.
Oops, I thought the 'busy' bit was now used and apparently forgot it is
used to control the periodic flushing...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 3 | ||||
-rw-r--r-- | src/sna/kgem.h | 1 | ||||
-rw-r--r-- | src/sna/sna_accel.c | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index eef2f562..a730e960 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -1254,7 +1254,6 @@ static void kgem_add_bo(struct kgem *kgem, struct kgem_bo *bo) /* XXX is it worth working around gcc here? */ kgem->flush |= bo->flush; - kgem->busy |= bo->scanout; } static uint32_t kgem_end_batch(struct kgem *kgem) @@ -1943,6 +1942,8 @@ static void kgem_commit(struct kgem *kgem) bo->rq = NULL; bo->exec = NULL; } + + kgem->scanout_busy |= bo->scanout; } if (rq == &_kgem_static_request) { diff --git a/src/sna/kgem.h b/src/sna/kgem.h index 21398bf1..212b94e5 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -155,6 +155,7 @@ struct kgem { uint32_t need_purge:1; uint32_t need_retire:1; uint32_t need_throttle:1; + uint32_t scanout_busy:1; uint32_t busy:1; uint32_t has_userptr :1; diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 43ed159e..d2f132c0 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -14380,7 +14380,8 @@ void sna_accel_block_handler(struct sna *sna, struct timeval **tv) UpdateCurrentTimeIf(); if (sna->kgem.nbatch && - (sna->kgem.busy || kgem_ring_is_idle(&sna->kgem, sna->kgem.ring))) { + (sna->kgem.scanout_busy || + kgem_ring_is_idle(&sna->kgem, sna->kgem.ring))) { DBG(("%s: GPU idle, flushing\n", __FUNCTION__)); _kgem_submit(&sna->kgem); } @@ -14433,7 +14434,7 @@ set_tv: } } - sna->kgem.busy = false; + sna->kgem.scanout_busy = false; } void sna_accel_wakeup_handler(struct sna *sna) |