drm/i915: don't save/restore LBB on Gen5+
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Thu, 12 Sep 2013 16:58:17 +0000 (13:58 -0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 13 Sep 2013 09:40:45 +0000 (11:40 +0200)
Because this PCI config register doesn't exist on Gen5+.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_suspend.c

index 70db618989c42a3bcd3a73df44593a368e2d66d0..3538370e3a47078326767a03b144fb0b75c4992f 100644 (file)
@@ -340,7 +340,9 @@ int i915_save_state(struct drm_device *dev)
        struct drm_i915_private *dev_priv = dev->dev_private;
        int i;
 
-       pci_read_config_byte(dev->pdev, LBB, &dev_priv->regfile.saveLBB);
+       if (INTEL_INFO(dev)->gen <= 4)
+               pci_read_config_byte(dev->pdev, LBB,
+                                    &dev_priv->regfile.saveLBB);
 
        mutex_lock(&dev->struct_mutex);
 
@@ -390,7 +392,9 @@ int i915_restore_state(struct drm_device *dev)
        struct drm_i915_private *dev_priv = dev->dev_private;
        int i;
 
-       pci_write_config_byte(dev->pdev, LBB, dev_priv->regfile.saveLBB);
+       if (INTEL_INFO(dev)->gen <= 4)
+               pci_write_config_byte(dev->pdev, LBB,
+                                     dev_priv->regfile.saveLBB);
 
        mutex_lock(&dev->struct_mutex);