Commit 77895af2 authored by Jani Nikula's avatar Jani Nikula

drm/i915/suspend: replace I915_READ()/WRITE() with intel_de_read()/write()

Another straggler with I915_READ() and I915_WRITE() uses gone.
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201130111601.2817-6-jani.nikula@intel.com
parent 124a60f2
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "display/intel_de.h"
#include "display/intel_fbc.h" #include "display/intel_fbc.h"
#include "display/intel_gmbus.h" #include "display/intel_gmbus.h"
#include "display/intel_vga.h" #include "display/intel_vga.h"
...@@ -39,21 +40,21 @@ static void intel_save_swf(struct drm_i915_private *dev_priv) ...@@ -39,21 +40,21 @@ static void intel_save_swf(struct drm_i915_private *dev_priv)
/* Scratch space */ /* Scratch space */
if (IS_GEN(dev_priv, 2) && IS_MOBILE(dev_priv)) { if (IS_GEN(dev_priv, 2) && IS_MOBILE(dev_priv)) {
for (i = 0; i < 7; i++) { for (i = 0; i < 7; i++) {
dev_priv->regfile.saveSWF0[i] = I915_READ(SWF0(i)); dev_priv->regfile.saveSWF0[i] = intel_de_read(dev_priv, SWF0(i));
dev_priv->regfile.saveSWF1[i] = I915_READ(SWF1(i)); dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, SWF1(i));
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
dev_priv->regfile.saveSWF3[i] = I915_READ(SWF3(i)); dev_priv->regfile.saveSWF3[i] = intel_de_read(dev_priv, SWF3(i));
} else if (IS_GEN(dev_priv, 2)) { } else if (IS_GEN(dev_priv, 2)) {
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
dev_priv->regfile.saveSWF1[i] = I915_READ(SWF1(i)); dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, SWF1(i));
} else if (HAS_GMCH(dev_priv)) { } else if (HAS_GMCH(dev_priv)) {
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
dev_priv->regfile.saveSWF0[i] = I915_READ(SWF0(i)); dev_priv->regfile.saveSWF0[i] = intel_de_read(dev_priv, SWF0(i));
dev_priv->regfile.saveSWF1[i] = I915_READ(SWF1(i)); dev_priv->regfile.saveSWF1[i] = intel_de_read(dev_priv, SWF1(i));
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
dev_priv->regfile.saveSWF3[i] = I915_READ(SWF3(i)); dev_priv->regfile.saveSWF3[i] = intel_de_read(dev_priv, SWF3(i));
} }
} }
...@@ -64,21 +65,21 @@ static void intel_restore_swf(struct drm_i915_private *dev_priv) ...@@ -64,21 +65,21 @@ static void intel_restore_swf(struct drm_i915_private *dev_priv)
/* Scratch space */ /* Scratch space */
if (IS_GEN(dev_priv, 2) && IS_MOBILE(dev_priv)) { if (IS_GEN(dev_priv, 2) && IS_MOBILE(dev_priv)) {
for (i = 0; i < 7; i++) { for (i = 0; i < 7; i++) {
I915_WRITE(SWF0(i), dev_priv->regfile.saveSWF0[i]); intel_de_write(dev_priv, SWF0(i), dev_priv->regfile.saveSWF0[i]);
I915_WRITE(SWF1(i), dev_priv->regfile.saveSWF1[i]); intel_de_write(dev_priv, SWF1(i), dev_priv->regfile.saveSWF1[i]);
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
I915_WRITE(SWF3(i), dev_priv->regfile.saveSWF3[i]); intel_de_write(dev_priv, SWF3(i), dev_priv->regfile.saveSWF3[i]);
} else if (IS_GEN(dev_priv, 2)) { } else if (IS_GEN(dev_priv, 2)) {
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
I915_WRITE(SWF1(i), dev_priv->regfile.saveSWF1[i]); intel_de_write(dev_priv, SWF1(i), dev_priv->regfile.saveSWF1[i]);
} else if (HAS_GMCH(dev_priv)) { } else if (HAS_GMCH(dev_priv)) {
for (i = 0; i < 16; i++) { for (i = 0; i < 16; i++) {
I915_WRITE(SWF0(i), dev_priv->regfile.saveSWF0[i]); intel_de_write(dev_priv, SWF0(i), dev_priv->regfile.saveSWF0[i]);
I915_WRITE(SWF1(i), dev_priv->regfile.saveSWF1[i]); intel_de_write(dev_priv, SWF1(i), dev_priv->regfile.saveSWF1[i]);
} }
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
I915_WRITE(SWF3(i), dev_priv->regfile.saveSWF3[i]); intel_de_write(dev_priv, SWF3(i), dev_priv->regfile.saveSWF3[i]);
} }
} }
...@@ -88,7 +89,7 @@ void i915_save_display(struct drm_i915_private *dev_priv) ...@@ -88,7 +89,7 @@ void i915_save_display(struct drm_i915_private *dev_priv)
/* Display arbitration control */ /* Display arbitration control */
if (INTEL_GEN(dev_priv) <= 4) if (INTEL_GEN(dev_priv) <= 4)
dev_priv->regfile.saveDSPARB = I915_READ(DSPARB); dev_priv->regfile.saveDSPARB = intel_de_read(dev_priv, DSPARB);
if (IS_GEN(dev_priv, 4)) if (IS_GEN(dev_priv, 4))
pci_read_config_word(pdev, GCDGMBUS, pci_read_config_word(pdev, GCDGMBUS,
...@@ -109,7 +110,7 @@ void i915_restore_display(struct drm_i915_private *dev_priv) ...@@ -109,7 +110,7 @@ void i915_restore_display(struct drm_i915_private *dev_priv)
/* Display arbitration */ /* Display arbitration */
if (INTEL_GEN(dev_priv) <= 4) if (INTEL_GEN(dev_priv) <= 4)
I915_WRITE(DSPARB, dev_priv->regfile.saveDSPARB); intel_de_write(dev_priv, DSPARB, dev_priv->regfile.saveDSPARB);
/* only restore FBC info on the platform that supports FBC*/ /* only restore FBC info on the platform that supports FBC*/
intel_fbc_global_disable(dev_priv); intel_fbc_global_disable(dev_priv);
......
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