aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-10-03 08:45:14 -0400
committerJani Nikula <jani.nikula@intel.com>2016-10-10 09:06:41 -0400
commitf856f847b22c52be82f712ea6ada946c6db884d7 (patch)
tree1a7a3a2a56df2b7279532a95a0ea0b90c2d53447
parentbe5c571b2ff3a164d2e14ccc100cb5b2b3d3fb7c (diff)
drm/i915: Just clear the mmiodebug before a register access
When we enable the per-register access mmiodebug, it is to detect which access is illegal. Reporting on earlier untraced access outside of the mmiodebug does not help debugging (as the suspicion is immediately put upon the current register which is not at fault)! References: https://bugs.freedesktop.org/show_bug.cgi?id=97985 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Cc: stable@vger.kernel.org Link: http://patchwork.freedesktop.org/patch/msgid/20161003124516.12388-1-chris@chris-wilson.co.uk (cherry picked from commit dda960335e020835f7f1c12760e7f0b525b451e2) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_uncore.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index a9b6c936aadd..ee2306a79747 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -796,10 +796,9 @@ __unclaimed_reg_debug(struct drm_i915_private *dev_priv,
796 const bool read, 796 const bool read,
797 const bool before) 797 const bool before)
798{ 798{
799 if (WARN(check_for_unclaimed_mmio(dev_priv), 799 if (WARN(check_for_unclaimed_mmio(dev_priv) && !before,
800 "Unclaimed register detected %s %s register 0x%x\n", 800 "Unclaimed %s register 0x%x\n",
801 before ? "before" : "after", 801 read ? "read from" : "write to",
802 read ? "reading" : "writing to",
803 i915_mmio_reg_offset(reg))) 802 i915_mmio_reg_offset(reg)))
804 i915.mmio_debug--; /* Only report the first N failures */ 803 i915.mmio_debug--; /* Only report the first N failures */
805} 804}