xf86-video-intel: src/sna/kgem.c src/sna/kgem.h
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jun 11 07:12:52 PDT 2013
src/sna/kgem.c | 8 +++-----
src/sna/kgem.h | 9 +++++++--
2 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 1392f296a3fc94bb64abe4c3370c2f3cd52bef9f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jun 11 15:10:06 2013 +0100
sna: Mollify an assert to allow us to call busy_ioctl on a GTT write
The code was being careful in making sure that only a BO with an
outstanding GPU write was being flushed. We need to relax that
assertion to allow us to call busy_ioctl after only GTT writes.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 9b783a9..0925c33 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4182,16 +4182,14 @@ void _kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo)
void __kgem_flush(struct kgem *kgem, struct kgem_bo *bo)
{
- assert(bo->rq);
- assert(bo->exec == NULL);
assert(bo->needs_flush);
/* The kernel will emit a flush *and* update its own flushing lists. */
- if (!__kgem_busy(kgem, bo->handle))
+ if (bo->exec == NULL && !__kgem_busy(kgem, bo->handle))
__kgem_bo_clear_busy(bo);
- DBG(("%s: handle=%d, busy?=%d\n",
- __FUNCTION__, bo->handle, bo->rq != NULL));
+ DBG(("%s: handle=%d, busy?=%d, flushed?=%d\n",
+ __FUNCTION__, bo->handle, bo->rq != NULL, bo->exec == NULL));
}
inline static bool needs_semaphore(struct kgem *kgem, struct kgem_bo *bo)
diff --git a/src/sna/kgem.h b/src/sna/kgem.h
index b7355d4..aa8097a 100644
--- a/src/sna/kgem.h
+++ b/src/sna/kgem.h
@@ -338,10 +338,15 @@ static inline void kgem_bo_flush(struct kgem *kgem, struct kgem_bo *bo)
return;
/* If the kernel fails to emit the flush, then it will be forced when
- * we assume direct access. And as the useual failure is EIO, we do
- * not actualy care.
+ * we assume direct access. And as the usual failure is EIO, we do
+ * not actually care.
*/
__kgem_flush(kgem, bo);
+
+ /* Whatever actually happens, we can regard the GTT write domain
+ * as being flushed.
+ */
+ bo->gtt_dirty = false;
}
static inline struct kgem_bo *kgem_bo_reference(struct kgem_bo *bo)
More information about the xorg-commit
mailing list