sna: Only submit a batch to the scanout if it is not already busy
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
cd7a56b731
commit
663e387b35
|
|
@ -3001,10 +3001,10 @@ void _kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
|
|||
__kgem_bo_destroy(kgem, bo);
|
||||
}
|
||||
|
||||
void __kgem_flush(struct kgem *kgem, struct kgem_bo *bo)
|
||||
bool __kgem_flush(struct kgem *kgem, struct kgem_bo *bo)
|
||||
{
|
||||
/* The kernel will emit a flush *and* update its own flushing lists. */
|
||||
kgem_busy(kgem, bo->handle);
|
||||
return kgem_busy(kgem, bo->handle);
|
||||
}
|
||||
|
||||
bool kgem_check_bo(struct kgem *kgem, ...)
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ static inline void kgem_bo_submit(struct kgem *kgem, struct kgem_bo *bo)
|
|||
_kgem_submit(kgem);
|
||||
}
|
||||
|
||||
void __kgem_flush(struct kgem *kgem, struct kgem_bo *bo);
|
||||
bool __kgem_flush(struct kgem *kgem, struct kgem_bo *bo);
|
||||
static inline void kgem_bo_flush(struct kgem *kgem, struct kgem_bo *bo)
|
||||
{
|
||||
kgem_bo_submit(kgem, bo);
|
||||
|
|
|
|||
|
|
@ -11998,7 +11998,7 @@ static bool sna_accel_do_flush(struct sna *sna)
|
|||
DBG(("%s (time=%ld), triggered\n", __FUNCTION__, (long)sna->time));
|
||||
sna->timer_expire[FLUSH_TIMER] =
|
||||
sna->time + sna->vblank_interval;
|
||||
return true;
|
||||
return priv->cpu_damage || !__kgem_flush(&sna->kgem, priv->gpu_bo);
|
||||
}
|
||||
} else {
|
||||
if (priv->cpu_damage == NULL && priv->gpu_bo->exec == NULL) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue