]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915: Double check we didn't miss an unclaimed register access
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Sep 2018 11:17:32 +0000 (12:17 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 4 Sep 2018 13:28:51 +0000 (14:28 +0100)
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: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180904111732.24266-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_uncore.c

index 20f2f5ad9c3f972966eb4c3199b39dc0b70b3288..05f0cda18501f6dacbc819eed524d9544be98d15 100644 (file)
@@ -2283,15 +2283,16 @@ bool intel_uncore_unclaimed_mmio(struct drm_i915_private *dev_priv)
 bool
 intel_uncore_arm_unclaimed_mmio_detection(struct drm_i915_private *dev_priv)
 {
-       if (unlikely(i915_modparams.mmio_debug ||
-                    dev_priv->uncore.unclaimed_mmio_check <= 0))
+       if (unlikely(dev_priv->uncore.unclaimed_mmio_check <= 0))
                return false;
 
        if (unlikely(intel_uncore_unclaimed_mmio(dev_priv))) {
-               DRM_DEBUG("Unclaimed register detected, "
-                         "enabling oneshot unclaimed register reporting. "
-                         "Please use i915.mmio_debug=N for more information.\n");
-               i915_modparams.mmio_debug++;
+               if (!i915_modparams.mmio_debug) {
+                       DRM_DEBUG("Unclaimed register detected, "
+                                 "enabling oneshot unclaimed register reporting. "
+                                 "Please use i915.mmio_debug=N for more information.\n");
+                       i915_modparams.mmio_debug++;
+               }
                dev_priv->uncore.unclaimed_mmio_check--;
                return true;
        }