diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2022-06-10 09:07:48 +0200 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2022-06-13 17:28:24 +0200 |
commit | 899ff3663841eba92aa503d760b5d316b2e972df (patch) | |
tree | c0ed2019c11bc61fba4e2579f7753efd53c0fb4d /tests/i915/gem_workarounds.c | |
parent | dfc7ef0b191b45056a6006555cf0a70ae55886d8 (diff) |
lib/intel_reg: Add common MI_* macros to remove duplicates
In few tests we got some MI_* duplicates (MI_MATH for example).
Add common definitions in intel_reg.h and remove local definitions
in the tests.
v2: Definitions MI_LOAD_REGISTER_MEM_GEN8 was removed so from now
on user will need to encode length on it own. :
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'tests/i915/gem_workarounds.c')
-rw-r--r-- | tests/i915/gem_workarounds.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/i915/gem_workarounds.c b/tests/i915/gem_workarounds.c index 70967b3f..fc518492 100644 --- a/tests/i915/gem_workarounds.c +++ b/tests/i915/gem_workarounds.c @@ -83,8 +83,6 @@ static bool write_only(const uint32_t addr) return false; } -#define MI_STORE_REGISTER_MEM (0x24 << 23) - static int workaround_fail_count(int i915, const intel_ctx_t *ctx) { struct drm_i915_gem_exec_object2 obj[2]; @@ -122,7 +120,7 @@ static int workaround_fail_count(int i915, const intel_ctx_t *ctx) out = base = gem_mmap__cpu(i915, obj[1].handle, 0, batch_sz, PROT_WRITE); for (int i = 0; i < num_wa_regs; i++) { - *out++ = MI_STORE_REGISTER_MEM | ((gen >= 8 ? 4 : 2) - 2); + *out++ = MI_STORE_REGISTER_MEM | (1 + (gen >= 8)); *out++ = wa_regs[i].addr; reloc[i].target_handle = obj[0].handle; reloc[i].offset = (out - base) * sizeof(*out); |