drm/i915/gt: rename wa_write_masked_or()
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 9 Dec 2020 04:52:45 +0000 (20:52 -0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Dec 2020 11:37:02 +0000 (11:37 +0000)
commit305b3bb52271fbe7442236e7f3a0b0b5cc25a475
tree84cad2de24669ac65dac0baf9aa742bbcb2f9c49
parent61b3b0d1009986895be57b760ca4ebda43a212e2
drm/i915/gt: rename wa_write_masked_or()

The use of "masked" in this function is due to its history. Once upon a
time it received a mask and a value as parameter. Since
commit eeec73f8a4a4 ("drm/i915/gt: Skip rmw for masked registers")
that is not true anymore and now there is a clear and a set parameter.
Depending on the case, that can still be thought as a mask and value,
but there are some subtle differences: what we clear doesn't need to be
the same bits we are setting, particularly when we are using masked
registers.

The fact that we also have "masked registers", i.e. registers whose mask
is stored in the upper 16 bits of the register, makes it even more
confusing, because "masked" in wa_write_masked_or() has little to do
with masked registers, but rather refers to the old mask parameter the
function received (that can also, but not exclusively, be used to write
to masked register).

Avoid the ambiguity and misnomer by renaming it to something else,
hopefully less confusing: wa_write_clr_set(), to designate that we are
doing both clr and set operations in the register.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20201209045246.2905675-2-lucas.demarchi@intel.com
drivers/gpu/drm/i915/gt/intel_workarounds.c