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>
This commit is contained in:
parent
d1b479a340
commit
8c3b82f207
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue