[Intel-gfx] [PATCH] drm/i915: Clarify error message on failed workaround
Chris Wilson
chris at chris-wilson.co.uk
Fri Jan 1 22:14:42 UTC 2021
Quoting Matt Roper (2020-12-31 19:11:03)
> Let's modify the "workaround lost" error message slightly to make it
> more clear what the various numbers represent. Also, the 'expected'
> value needs to be &'d with wa->read so that it doesn't include the mask
> bits for masked registers (those bits are write-only in the hardware and
> will usually always read out as 0's).
>
> Signed-off-by: Matt Roper <matthew.d.roper at intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> index 42d320e68b60..b0e3a5ba0320 100644
> --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c
> +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c
> @@ -1383,9 +1383,9 @@ static bool
> wa_verify(const struct i915_wa *wa, u32 cur, const char *name, const char *from)
> {
> if ((cur ^ wa->set) & wa->read) {
> - DRM_ERROR("%s workaround lost on %s! (%x=%x/%x, expected %x)\n",
> + DRM_ERROR("%s workaround lost on %s! (reg[%x]=0x%x, relevant bits were 0x%x vs expected 0x%x)\n",
> name, from, i915_mmio_reg_offset(wa->reg),
> - cur, cur & wa->read, wa->set);
> + cur, cur & wa->read, wa->set & wa->read);
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list