drm/i915/gt: Clear all bits from GEN12_FF_MODE2
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 30 Jun 2023 20:35:04 +0000 (13:35 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 3 Jul 2023 18:29:05 +0000 (11:29 -0700)
commite8f7df163cb40152b757be0f66a9c6b520b3037a
tree46c36902abcc1dc12b7b50286ec72d10d817a660
parentf567947b9c084d5584f23e0e9e15bc6bb41d7c5b
drm/i915/gt: Clear all bits from GEN12_FF_MODE2

Right now context workarounds don't do a rmw and instead only write to
the register. Since 2 separate programmings to the same register are
coalesced into a single write, this is not problematic for
GEN12_FF_MODE2 since both TDS and GS timer are going to be written
together and the other remaining bits be zeroed.

However in order to fix other workarounds that may want to preserve the
unrelated bits in the same register, context workarounds need to
be changed to a rmw. To prepare for that, move the programming of
GEN12_FF_MODE2 to a single place so the value passed for "clear" can
be all the bits. Otherwise the second workaround would be dropped as
it'd be detected as overwriting a previously programmed workaround.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230630203509.1635216-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/gt/intel_workarounds.c