drm/i915/gt: Also check set bits in clr_set()
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 30 Jun 2023 20:35:09 +0000 (13:35 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 3 Jul 2023 18:30:30 +0000 (11:30 -0700)
When checking if the workarounds were applied successfully, the
read-back mask should also contain the bits being set: it's possible
that in a call to wa_write_clr_set(), the cleared bits are not a
superset of the set bits.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230630203509.1635216-8-lucas.demarchi@intel.com
drivers/gpu/drm/i915/gt/intel_workarounds.c

index a6f3f16..b177c58 100644 (file)
@@ -241,13 +241,13 @@ static void wa_mcr_add(struct i915_wa_list *wal, i915_mcr_reg_t reg,
 static void
 wa_write_clr_set(struct i915_wa_list *wal, i915_reg_t reg, u32 clear, u32 set)
 {
-       wa_add(wal, reg, clear, set, clear, false);
+       wa_add(wal, reg, clear, set, clear | set, false);
 }
 
 static void
 wa_mcr_write_clr_set(struct i915_wa_list *wal, i915_mcr_reg_t reg, u32 clear, u32 set)
 {
-       wa_mcr_add(wal, reg, clear, set, clear, false);
+       wa_mcr_add(wal, reg, clear, set, clear | set, false);
 }
 
 static void