summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-11-26 10:34:28 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-11-26 10:34:28 +0000
commitd21ed3a6aba5ae227cc5ecd164f3c18bc48c69af (patch)
tree99ba3fe7190bf3360a27acf09e1423e6c456162f /src
parent7a904ce839933d57176e013cdad147533c33ca2f (diff)
sna: Use a single execobject flag to mark read/write domains
Slight modification to the proposed API to only pass the simplified domain tracking now performed by the kernel. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/sna/kgem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 034e1827..7f8774ff 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -111,6 +111,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
#define LOCAL_I915_PARAM_HAS_NO_RELOC 24
#define LOCAL_I915_PARAM_HAS_HANDLE_LUT 25
+#define LOCAL_EXEC_OBJECT_WRITE (1<<2)
#define LOCAL_I915_EXEC_NO_RELOC (1<<10)
#define LOCAL_I915_EXEC_HANDLE_LUT (1<<11)
@@ -2313,9 +2314,7 @@ void _kgem_submit(struct kgem *kgem)
kgem->exec[i].alignment = 0;
kgem->exec[i].offset = rq->bo->presumed_offset;
kgem->exec[i].flags = 0;
- kgem->exec[i].rsvd1 = (I915_GEM_DOMAIN_COMMAND |
- I915_GEM_DOMAIN_INSTRUCTION |
- I915_GEM_DOMAIN_VERTEX);
+ kgem->exec[i].rsvd1 = 0;
kgem->exec[i].rsvd2 = 0;
rq->bo->target_handle = kgem->has_handle_lut ? i : handle;
@@ -3925,10 +3924,9 @@ uint32_t kgem_add_reloc(struct kgem *kgem,
kgem->reloc[index].target_handle = bo->target_handle;
kgem->reloc[index].presumed_offset = bo->presumed_offset;
- bo->exec->rsvd1 |= read_write_domain >> 16;
if (read_write_domain & 0x7fff) {
assert(!bo->snoop || kgem->can_blt_cpu);
- bo->exec->rsvd1 |= (uint64_t)(read_write_domain & 0x7fff) << 32;
+ bo->exec->flags |= LOCAL_EXEC_OBJECT_WRITE;
kgem_bo_mark_dirty(bo);
}