diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-08 22:39:32 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-08 22:42:11 +0000 |
commit | 4e4e10935d2815fb62aeaedbfffe10aad115ec0b (patch) | |
tree | 67cb878a98a00986224fed1d0d634ea3463319e2 /src/sna/kgem.h | |
parent | cef11795f627a393d4254845b0a19eefbf6c782c (diff) |
sna: Flush upon change of target if GPU is idle
The aim is to improve GPU concurrency by keeping it busy. The possible
complication is that we incur more overhead due to small batches.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r-- | src/sna/kgem.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h index e7e53af5..5cd22ccf 100644 --- a/src/sna/kgem.h +++ b/src/sna/kgem.h @@ -347,7 +347,9 @@ static inline void kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo) void kgem_clear_dirty(struct kgem *kgem); -static inline void kgem_set_mode(struct kgem *kgem, enum kgem_mode mode) +static inline void kgem_set_mode(struct kgem *kgem, + enum kgem_mode mode, + struct kgem_bo *bo) { assert(!kgem->wedged); @@ -355,6 +357,9 @@ static inline void kgem_set_mode(struct kgem *kgem, enum kgem_mode mode) kgem_submit(kgem); #endif + if (kgem->mode && bo->exec == NULL && kgem_ring_is_idle(kgem, kgem->ring)) + kgem_submit(kgem); + if (kgem->mode == mode) return; |