Mesa (9.2): i965: CS writes/reads should use I915_GEM_INSTRUCTION

Carl Worth cworth at kemper.freedesktop.org
Wed Nov 13 01:01:16 UTC 2013


Module: Mesa
Branch: 9.2
Commit: 52a6ebe2005d1d998a425a23d1ef45413ad88c07
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=52a6ebe2005d1d998a425a23d1ef45413ad88c07

Author: Daniel Vetter <daniel.vetter at ffwll.ch>
Date:   Wed Oct  9 15:49:11 2013 +0200

i965: CS writes/reads should use I915_GEM_INSTRUCTION

Otherwise the gen6 w/a in the kernel won't kick in and the write will
land nowhere.

Inspired by a patch Ken pointed me at which had the same issue (but
isn't yet merged and also for a gen7+ feature). An audit of the entire
driver didn't reveal any other case than the one in in the write_reg
helper used by the gen6 queryobj code.

Acked-by: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Tested-by: Xinkai Chen <yeled.nova at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Cc: "9.2" <mesa-stable at lists.freedesktop.org>
(cherry picked from commit 32a3f5f6d768e5828be1d1f46b1b3f819f55cba8)

Conflicts:
	src/mesa/drivers/dri/i965/gen6_queryobj.c

---

 src/mesa/drivers/dri/i965/gen6_queryobj.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c
index 6f4f6f5..8f26b63 100644
--- a/src/mesa/drivers/dri/i965/gen6_queryobj.c
+++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c
@@ -115,14 +115,14 @@ write_reg(struct brw_context *brw,
    BEGIN_BATCH(3);
    OUT_BATCH(MI_STORE_REGISTER_MEM | (3 - 2));
    OUT_BATCH(reg);
-   OUT_RELOC(query_bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+   OUT_RELOC(query_bo, I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
              idx * sizeof(uint64_t));
    ADVANCE_BATCH();
 
    BEGIN_BATCH(3);
    OUT_BATCH(MI_STORE_REGISTER_MEM | (3 - 2));
    OUT_BATCH(reg + sizeof(uint32_t));
-   OUT_RELOC(query_bo, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER,
+   OUT_RELOC(query_bo, I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION,
              sizeof(uint32_t) + idx * sizeof(uint64_t));
    ADVANCE_BATCH();
 }




More information about the mesa-commit mailing list