]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Introduce HAS_FPGA_DBG_UNCLAIMED()
authorDamien Lespiau <damien.lespiau@intel.com>
Mon, 22 Apr 2013 17:40:40 +0000 (18:40 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 23 Apr 2013 15:47:25 +0000 (17:47 +0200)
Let's introduce one more of those orthogonal feature macros. This should
hopefully make the code more readable and make things easier for new platform
enabling.

This time, HAS_FPGA_DBG_UNCLAIMED() is true for platforms that have bit
31 of FPGA_DBG able to signal unclaimed writes.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h

index cfa1298669ca28483e9fd05ae855f355bfe14a15..13a72e63b4e9558f8de97e7334b282a90d4bdb5e 100644 (file)
@@ -1472,7 +1472,7 @@ static void intel_early_sanitize_regs(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
 
-       if (IS_HASWELL(dev))
+       if (HAS_FPGA_DBG_UNCLAIMED(dev))
                I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
 }
 
index 564d4c65e25ba566ace0cfd446c8063bc1a359f0..896b90430ba9fcb876070ef60a05994dc5b5b39c 100644 (file)
@@ -1205,7 +1205,7 @@ ilk_dummy_write(struct drm_i915_private *dev_priv)
 static void
 hsw_unclaimed_reg_clear(struct drm_i915_private *dev_priv, u32 reg)
 {
-       if (IS_HASWELL(dev_priv->dev) &&
+       if (HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev) &&
            (I915_READ_NOTRACE(FPGA_DBG) & FPGA_DBG_RM_NOCLAIM)) {
                DRM_ERROR("Unknown unclaimed register before writing to %x\n",
                          reg);
@@ -1216,7 +1216,7 @@ hsw_unclaimed_reg_clear(struct drm_i915_private *dev_priv, u32 reg)
 static void
 hsw_unclaimed_reg_check(struct drm_i915_private *dev_priv, u32 reg)
 {
-       if (IS_HASWELL(dev_priv->dev) &&
+       if (HAS_FPGA_DBG_UNCLAIMED(dev_priv->dev) &&
            (I915_READ_NOTRACE(FPGA_DBG) & FPGA_DBG_RM_NOCLAIM)) {
                DRM_ERROR("Unclaimed write to %x\n", reg);
                I915_WRITE_NOTRACE(FPGA_DBG, FPGA_DBG_RM_NOCLAIM);
index 5407714dee8b3080f39729cf47eef6b9ce1e0125..ffd325c7040755bd66905f150c6ce800b08d35ca 100644 (file)
@@ -1370,6 +1370,7 @@ struct drm_i915_file_private {
 
 #define HAS_DDI(dev)           (INTEL_INFO(dev)->has_ddi)
 #define HAS_POWER_WELL(dev)    (IS_HASWELL(dev))
+#define HAS_FPGA_DBG_UNCLAIMED(dev)    (IS_HASWELL(dev))
 
 #define INTEL_PCH_DEVICE_ID_MASK               0xff00
 #define INTEL_PCH_IBX_DEVICE_ID_TYPE           0x3b00