summaryrefslogtreecommitdiff
path: root/src/sna/kgem.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-11-05 23:40:28 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-11-05 23:50:10 +0000
commit6c8fc4434330ee37a290b6cf466af3282d09a8b3 (patch)
tree7d8f3af95c168095e1f8ed32ab049a8f6489b18b /src/sna/kgem.h
parentbf7316a4539afdf7a742d2b2ccbbaa5f27918255 (diff)
sna: Mark up CPU writes for scanout flush
When we flip to a bo, the kernel will flush it from the CPU write domain and so afterwards we need to do a new set-domain to mark up a subsequent CPU write (and flush before another flip). References: https://bugs.freedesktop.org/show_bug.cgi?id=95414 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.h')
-rw-r--r--src/sna/kgem.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index ded8f78f..08b4eb20 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -638,17 +638,24 @@ static inline void kgem_bo_mark_busy(struct kgem *kgem, struct kgem_bo *bo, int
}
}
-inline static void __kgem_bo_clear_busy(struct kgem_bo *bo)
+static inline void __kgem_bo_clear_dirty(struct kgem_bo *bo)
{
DBG(("%s: handle=%d\n", __FUNCTION__, bo->handle));
- bo->rq = NULL;
- list_del(&bo->request);
bo->domain = DOMAIN_NONE;
bo->needs_flush = false;
bo->gtt_dirty = false;
}
+inline static void __kgem_bo_clear_busy(struct kgem_bo *bo)
+{
+ DBG(("%s: handle=%d\n", __FUNCTION__, bo->handle));
+ bo->rq = NULL;
+ list_del(&bo->request);
+
+ __kgem_bo_clear_dirty(bo);
+}
+
static inline bool kgem_bo_is_busy(struct kgem_bo *bo)
{
DBG(("%s: handle=%d, domain: %d exec? %d, rq? %d\n", __FUNCTION__,