Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f856f847 authored by Chris Wilson's avatar Chris Wilson Committed by Jani Nikula
Browse files

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: default avatarMika 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: default avatarJani Nikula <jani.nikula@intel.com>
parent be5c571b
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -796,10 +796,9 @@ __unclaimed_reg_debug(struct drm_i915_private *dev_priv,
		      const bool read,
		      const bool read,
		      const bool before)
		      const bool before)
{
{
	if (WARN(check_for_unclaimed_mmio(dev_priv),
	if (WARN(check_for_unclaimed_mmio(dev_priv) && !before,
		 "Unclaimed register detected %s %s register 0x%x\n",
		 "Unclaimed %s register 0x%x\n",
		 before ? "before" : "after",
		 read ? "read from" : "write to",
		 read ? "reading" : "writing to",
		 i915_mmio_reg_offset(reg)))
		 i915_mmio_reg_offset(reg)))
		i915.mmio_debug--; /* Only report the first N failures */
		i915.mmio_debug--; /* Only report the first N failures */
}
}