Commit 905c27bb authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: don't save/restore irq regs for kms

We already call drm_irq_install/uninstall at the right time, which
will set up the irq registers with the correct values (through the
preinstall hooks).

For kms this is at best harmless, in the worst case we get an
interrupt when we don't really expect it.

v2: Fixup the logic, noticed by Paulo Zanoni.
Reviewed-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent f81183f7
...@@ -818,6 +818,7 @@ int i915_save_state(struct drm_device *dev) ...@@ -818,6 +818,7 @@ int i915_save_state(struct drm_device *dev)
i915_save_display(dev); i915_save_display(dev);
if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
/* Interrupt state */ /* Interrupt state */
if (HAS_PCH_SPLIT(dev)) { if (HAS_PCH_SPLIT(dev)) {
dev_priv->saveDEIER = I915_READ(DEIER); dev_priv->saveDEIER = I915_READ(DEIER);
...@@ -833,6 +834,7 @@ int i915_save_state(struct drm_device *dev) ...@@ -833,6 +834,7 @@ int i915_save_state(struct drm_device *dev)
dev_priv->saveIER = I915_READ(IER); dev_priv->saveIER = I915_READ(IER);
dev_priv->saveIMR = I915_READ(IMR); dev_priv->saveIMR = I915_READ(IMR);
} }
}
intel_disable_gt_powersave(dev); intel_disable_gt_powersave(dev);
...@@ -869,6 +871,7 @@ int i915_restore_state(struct drm_device *dev) ...@@ -869,6 +871,7 @@ int i915_restore_state(struct drm_device *dev)
i915_restore_display(dev); i915_restore_display(dev);
if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
/* Interrupt state */ /* Interrupt state */
if (HAS_PCH_SPLIT(dev)) { if (HAS_PCH_SPLIT(dev)) {
I915_WRITE(DEIER, dev_priv->saveDEIER); I915_WRITE(DEIER, dev_priv->saveDEIER);
...@@ -882,6 +885,7 @@ int i915_restore_state(struct drm_device *dev) ...@@ -882,6 +885,7 @@ int i915_restore_state(struct drm_device *dev)
I915_WRITE(IER, dev_priv->saveIER); I915_WRITE(IER, dev_priv->saveIER);
I915_WRITE(IMR, dev_priv->saveIMR); I915_WRITE(IMR, dev_priv->saveIMR);
} }
}
/* Cache mode state */ /* Cache mode state */
I915_WRITE(CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000); I915_WRITE(CACHE_MODE_0, dev_priv->saveCACHE_MODE_0 | 0xffff0000);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment