]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/uncore: Warn on previous unclaimed accesses
authorLucas De Marchi <lucas.demarchi@intel.com>
Tue, 5 Apr 2022 00:11:49 +0000 (17:11 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Wed, 6 Apr 2022 20:31:30 +0000 (13:31 -0700)
commit04c5c969052f8bcb3f49241e6a83371cf7c0f1ec
treedc93f85acf61d68d8f3677c4a3830b299d3fc21c
parent47b11b8ef07e4f6f7cae5b5669dfed3a4ba584fd
drm/i915/uncore: Warn on previous unclaimed accesses

Since gen6 we use FPGA_DBG register to detect unclaimed MMIO registers.
This register is in the display engine IP and can only ever detect
unclaimed accesses to registers in this area. However sometimes there
are reports of this triggering for registers in other areas, which
should not be possible.

Right now we always warn after the read/write of registers going through
unclaimed_reg_debug(). However places using __raw_uncore_* may be
triggering the unclaimed access and those being later accounted to a
different register. Let's warn both before and after the read/write
with a slightly different message, so it's clear if the register
reported in the warning is actually the culprit.

Commit 01f50383a051 ("drm/i915: Just clear the mmiodebug before a
register access") attempted to solve the same issue by removing the
warning when if FPGA_DBG flags before the mmio read/write. However, it
doesn't solve it completely as FPGA_DBG may remain set when reading
registers outside display. So in the end the check after the mmio
read/write triggers the warning pointing to the wrong register.

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/20220405001149.2675226-1-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_uncore.c