[Intel-gfx] [PATCH 3/7] drm/i915: Detect and clear unclaimed access on resume

Mika Kuoppala mika.kuoppala at linux.intel.com
Tue Dec 15 06:25:08 PST 2015


If something, the usual suspect being bios, access hw
behind our back, don't let it slide into situation where
normal register access will detect this and spit out
a warn on into dmesg. On some bdw bioses this happens
during igt/bat run always and as there is not much we can
do about it, its better just to detect and flush this
explicitly on resume and only print a debug message.

v2: use DRM_DEBUG_DRIVER (Chris)
v3: s/access/mmio, s/prior/prior to, s/dev/dev_priv

Testcase: igt/pm_rpm/basic-rte
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Paulo Zanoni <przanoni at gmail.com>
Cc: Daniel Vetter <daniel.vetter at intel.com>
Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_drv.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 8ddfcce..3f2a1d0 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1478,6 +1478,9 @@ static int intel_runtime_suspend(struct device *device)
 	}
 
 	intel_uncore_forcewake_reset(dev, false);
+	if (intel_uncore_unclaimed_mmio(dev_priv))
+		DRM_ERROR("Unclaimed access detected prior to suspending\n");
+
 	dev_priv->pm.suspended = true;
 
 	/*
@@ -1523,6 +1526,8 @@ static int intel_runtime_resume(struct device *device)
 
 	intel_opregion_notify_adapter(dev, PCI_D0);
 	dev_priv->pm.suspended = false;
+	if (intel_uncore_unclaimed_mmio(dev_priv))
+		DRM_DEBUG_DRIVER("Unclaimed access during suspend, bios?\n");
 
 	intel_guc_resume(dev);
 
-- 
2.5.0



More information about the Intel-gfx mailing list