summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorMika Kuoppala2015-12-16 08:26:48 +0100
committerMika Kuoppala2016-01-08 12:13:50 +0100
commit7571494004d88249bcee2a20fa74cb50753676fe (patch)
tree1f1e51b4ad0482bad782071eebdc64b9aa2b1bcd /drivers/gpu/drm/i915/intel_display.c
parentdrm/i915: Detect and clear unclaimed access on resume (diff)
downloadkernel-qcow2-linux-7571494004d88249bcee2a20fa74cb50753676fe.tar.gz
kernel-qcow2-linux-7571494004d88249bcee2a20fa74cb50753676fe.tar.xz
kernel-qcow2-linux-7571494004d88249bcee2a20fa74cb50753676fe.zip
drm/i915: Do one shot unclaimed mmio detection less frequently
We have done unclaimed register access check in normal (mmio_debug=0) mode once per write. This adds probability of finding the exact sequence where we did the bad access, but also adds burden to each write. As we have mmio_debug available for more fine grained analysis, give up accuracy of detecting correct spot at the first occurrence by doing the one shot detection and arming of mmio_debug in hangcheck and in modeset. This removes the write path performance burden. v2: Remove gratuitous DRM_DEBUG and return value, comments (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Paulo Zanoni <przanoni@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450250808-14864-1-git-send-email-mika.kuoppala@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 738d0dca47a8..3edf22ad7673 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13684,6 +13684,19 @@ static int intel_atomic_commit(struct drm_device *dev,
drm_atomic_state_free(state);
+ /* As one of the primary mmio accessors, KMS has a high likelihood
+ * of triggering bugs in unclaimed access. After we finish
+ * modesetting, see if an error has been flagged, and if so
+ * enable debugging for the next modeset - and hope we catch
+ * the culprit.
+ *
+ * XXX note that we assume display power is on at this point.
+ * This might hold true now but we need to add pm helper to check
+ * unclaimed only when the hardware is on, as atomic commits
+ * can happen also when the device is completely off.
+ */
+ intel_uncore_arm_unclaimed_mmio_detection(dev_priv);
+
return 0;
}