Commit 7ef4ac6e authored by Chris Wilson's avatar Chris Wilson

drm/i915: Double check we didn't miss an unclaimed register access

Currently, if the user has enabled mmio-debug around each register
access, we presume that we have then checked them all. However, it is
still possible through omission (raw register access) or external
interaction that the unclaimed access was not highlighted.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180904111732.24266-1-chris@chris-wilson.co.uk
parent 9f9d594d
...@@ -2283,15 +2283,16 @@ bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv) ...@@ -2283,15 +2283,16 @@ bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv)
bool bool
intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv) intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
{ {
if (unlikely(i915_modparams.mmio_debug || if (unlikely(dev_priv->uncore.unclaimed_mmio_check <= 0))
dev_priv->uncore.unclaimed_mmio_check <= 0))
return false; return false;
if (unlikely(intel_uncore_unclaimed_mmio(dev_priv))) { if (unlikely(intel_uncore_unclaimed_mmio(dev_priv))) {
DRM_DEBUG("Unclaimed register detected, " if (!i915_modparams.mmio_debug) {
"enabling oneshot unclaimed register reporting. " DRM_DEBUG("Unclaimed register detected, "
"Please use i915.mmio_debug=N for more information.\n"); "enabling oneshot unclaimed register reporting. "
i915_modparams.mmio_debug++; "Please use i915.mmio_debug=N for more information.\n");
i915_modparams.mmio_debug++;
}
dev_priv->uncore.unclaimed_mmio_check--; dev_priv->uncore.unclaimed_mmio_check--;
return true; return true;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment