diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2013-01-25 21:44:46 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-01-31 11:50:12 +0100 |
commit | 766aa1c42362eafc53f5939cd3f83113e9d062ed (patch) | |
tree | 195794e1c1dcd325a27474f17def29a3c1593aa9 /drivers/gpu/drm/i915/i915_suspend.c | |
parent | d93c6233543cdab83eca4d0590737c3e99314fd6 (diff) | |
download | blackbird-op-linux-766aa1c42362eafc53f5939cd3f83113e9d062ed.tar.gz blackbird-op-linux-766aa1c42362eafc53f5939cd3f83113e9d062ed.zip |
drm/i915: Introduce i915_vgacntrl_reg()
The VGACNTRL register has moved around between different platforms.
To handle the differences add i915_vgacntrl_reg() which returns the
correct offset for the VGACNTRL register.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_suspend.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 3911e0450bbe..2135f21ea458 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -73,10 +73,7 @@ static void i915_save_vga(struct drm_device *dev) dev_priv->regfile.saveVGA0 = I915_READ(VGA0); dev_priv->regfile.saveVGA1 = I915_READ(VGA1); dev_priv->regfile.saveVGA_PD = I915_READ(VGA_PD); - if (HAS_PCH_SPLIT(dev)) - dev_priv->regfile.saveVGACNTRL = I915_READ(CPU_VGACNTRL); - else - dev_priv->regfile.saveVGACNTRL = I915_READ(VGACNTRL); + dev_priv->regfile.saveVGACNTRL = I915_READ(i915_vgacntrl_reg(dev)); /* VGA color palette registers */ dev_priv->regfile.saveDACMASK = I915_READ8(VGA_DACMASK); @@ -137,10 +134,7 @@ static void i915_restore_vga(struct drm_device *dev) u16 cr_index, cr_data, st01; /* VGA state */ - if (HAS_PCH_SPLIT(dev)) - I915_WRITE(CPU_VGACNTRL, dev_priv->regfile.saveVGACNTRL); - else - I915_WRITE(VGACNTRL, dev_priv->regfile.saveVGACNTRL); + I915_WRITE(i915_vgacntrl_reg(dev), dev_priv->regfile.saveVGACNTRL); I915_WRITE(VGA0, dev_priv->regfile.saveVGA0); I915_WRITE(VGA1, dev_priv->regfile.saveVGA1); |