diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2012-11-20 10:27:38 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-11-21 11:47:07 -0500 |
commit | c54e59046c825266ca0decdac47fcfcf902b6cd6 (patch) | |
tree | b1ecb0e6291d6fd4368bf0028784e63bf967ccc5 /drivers | |
parent | cc391bbbddd16c36dabcb9f4a26500a2973a7108 (diff) |
drm/i915: fix false positive "Unclaimed write" messages
We don't check if the "unclaimed register" bit is set before we call
writel, so if it was already set before, we might print a misleading
message about "unclaimed write" on the wrong register.
This patch makes us check the unclaimed bit before the writel, so we
can print a new "Unknown unclaimed register before writing to %x"
message.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index f5b505a5b81e..f7aef97290bc 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -1264,6 +1264,10 @@ void i915_write##x(struct drm_i915_private *dev_priv, u32 reg, u##x val) { \ | |||
1264 | } \ | 1264 | } \ |
1265 | if (IS_GEN5(dev_priv->dev)) \ | 1265 | if (IS_GEN5(dev_priv->dev)) \ |
1266 | ilk_dummy_write(dev_priv); \ | 1266 | ilk_dummy_write(dev_priv); \ |
1267 | if (IS_HASWELL(dev_priv->dev) && (I915_READ_NOTRACE(GEN7_ERR_INT) & ERR_INT_MMIO_UNCLAIMED)) { \ | ||
1268 | DRM_ERROR("Unknown unclaimed register before writing to %x\n", reg); \ | ||
1269 | I915_WRITE_NOTRACE(GEN7_ERR_INT, ERR_INT_MMIO_UNCLAIMED); \ | ||
1270 | } \ | ||
1267 | if (IS_VALLEYVIEW(dev_priv->dev) && IS_DISPLAYREG(reg)) { \ | 1271 | if (IS_VALLEYVIEW(dev_priv->dev) && IS_DISPLAYREG(reg)) { \ |
1268 | write##y(val, dev_priv->regs + reg + 0x180000); \ | 1272 | write##y(val, dev_priv->regs + reg + 0x180000); \ |
1269 | } else { \ | 1273 | } else { \ |