drm/i915: Only hook up uncore->debug for primary uncore
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 6 Sep 2022 23:49:22 +0000 (16:49 -0700)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Mon, 12 Sep 2022 12:23:11 +0000 (15:23 +0300)
commit639e30ee3950dd77606d91719ba85df27b882f0e
tree0de5a197bc0bece44d139a14ccfc9fa23f2d3ba8
parentf16bfc1d5de082f50ecf87eaa98c357226ea06f1
drm/i915: Only hook up uncore->debug for primary uncore

The original intent of intel_uncore_mmio_debug as described in commit
0a9b26306d6a ("drm/i915: split out uncore_mmio_debug") was to be a
singleton structure that could be shared between multiple GTs' uncore
objects in a multi-tile system.  Somehow we went off track and
started allocating separate instances of this structure for each GT,
which defeats that original goal.

But in reality, there isn't even a need to share the mmio_debug between
multiple GTs; on all modern platforms (i.e., everything after gen7)
unclaimed register accesses are something that can only be detected for
display registers.  There's no point in grabbing the debug spinlock and
checking for unclaimed accesses on an uncore used by an xehpsdv or pvc
remote tile GT, or the uncore used by a mtl standalone media GT since
all of the display accesses go through the primary intel_uncore.

The simplest solution is to simply leave uncore->debug NULL on all
intel_uncore instances except for the primary one.  This will allow us
to avoid the pointless debug spinlock acquisition we've been doing on
MMIO accesses coming in through these intel_uncores.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220906234934.3655440-3-matthew.d.roper@intel.com
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/gt/intel_gt.c
drivers/gpu/drm/i915/i915_driver.c
drivers/gpu/drm/i915/intel_uncore.c
drivers/gpu/drm/i915/intel_uncore.h