aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-02-19 14:13:35 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-02-19 19:33:48 -0500
commit02bcca0d72a1491d30cfb5dce29e348ac15fd01c (patch)
tree7afbedaf3e353d00f9992923851095b3512f496d /drivers/gpu/drm
parent3f1e109a8be5670487e00e1c6bc0670526325227 (diff)
drm/i915: clear the FPGA_DBG_RM_NOCLAIM bit at driver init
Otherwise, if the BIOS did anything wrong, our first I915_{WRITE,READ} will give us "unclaimed register" messages. V2: Even earlier. V3: Move it to intel_early_sanitize_regs. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=58897 Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 4fa6beb14c77..e16099b6f942 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1453,6 +1453,22 @@ static void i915_dump_device_info(struct drm_i915_private *dev_priv)
1453} 1453}
1454 1454
1455/** 1455/**
1456 * intel_early_sanitize_regs - clean up BIOS state
1457 * @dev: DRM device
1458 *
1459 * This function must be called before we do any I915_READ or I915_WRITE. Its
1460 * purpose is to clean up any state left by the BIOS that may affect us when
1461 * reading and/or writing registers.
1462 */
1463static void intel_early_sanitize_regs(struct drm_device *dev)
1464{
1465 struct drm_i915_private *dev_priv = dev->dev_private;
1466
1467 if (IS_HASWELL(dev))
1468 I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
1469}
1470
1471/**
1456 * i915_driver_load - setup chip and create an initial config 1472 * i915_driver_load - setup chip and create an initial config
1457 * @dev: DRM device 1473 * @dev: DRM device
1458 * @flags: startup flags 1474 * @flags: startup flags
@@ -1542,6 +1558,8 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags)
1542 goto put_gmch; 1558 goto put_gmch;
1543 } 1559 }
1544 1560
1561 intel_early_sanitize_regs(dev);
1562
1545 aperture_size = dev_priv->gtt.mappable_end; 1563 aperture_size = dev_priv->gtt.mappable_end;
1546 1564
1547 dev_priv->gtt.mappable = 1565 dev_priv->gtt.mappable =