diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-11 18:08:25 (GMT) |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-18 12:34:00 (GMT) |
commit | 7fdd74ab8000562d4a81bc904e03cac6cc520410 (patch) | |
tree | e4ee01d54d12a2775d66fc73da0cda9c2bc656ee | |
parent | 2e9388923e83bc4e2726f170a984621f1d582e77 (diff) | |
download | linux-fsl-qoriq-7fdd74ab8000562d4a81bc904e03cac6cc520410.tar.xz |
drm/i915: don't save/restor ADPA for kms
We now no longer rely on this.
This is step 1 on a long journey to rid us of the save/restore
madness, which tends to lightly paper over many issues, and cause
tons of bad things itself ...
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
[danvet: satisfy Paulo's ocd and drop the needless braces.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 4f50d82..7ebd8d6 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -395,6 +395,12 @@ static void i915_save_modeset_reg(struct drm_device *dev) break; } + /* CRT state */ + if (HAS_PCH_SPLIT(dev)) + dev_priv->saveADPA = I915_READ(PCH_ADPA); + else + dev_priv->saveADPA = I915_READ(ADPA); + return; } @@ -601,6 +607,12 @@ static void i915_restore_modeset_reg(struct drm_device *dev) if (IS_GEN2(dev)) I915_WRITE(CURSIZE, dev_priv->saveCURSIZE); + /* CRT state */ + if (HAS_PCH_SPLIT(dev)) + I915_WRITE(PCH_ADPA, dev_priv->saveADPA); + else + I915_WRITE(ADPA, dev_priv->saveADPA); + return; } @@ -615,13 +627,6 @@ static void i915_save_display(struct drm_device *dev) /* Don't save them in KMS mode */ i915_save_modeset_reg(dev); - /* CRT state */ - if (HAS_PCH_SPLIT(dev)) { - dev_priv->saveADPA = I915_READ(PCH_ADPA); - } else { - dev_priv->saveADPA = I915_READ(ADPA); - } - /* LVDS state */ if (HAS_PCH_SPLIT(dev)) { dev_priv->savePP_CONTROL = I915_READ(PCH_PP_CONTROL); @@ -723,12 +728,6 @@ static void i915_restore_display(struct drm_device *dev) /* Don't restore them in KMS mode */ i915_restore_modeset_reg(dev); - /* CRT state */ - if (HAS_PCH_SPLIT(dev)) - I915_WRITE(PCH_ADPA, dev_priv->saveADPA); - else - I915_WRITE(ADPA, dev_priv->saveADPA); - /* LVDS state */ if (INTEL_INFO(dev)->gen >= 4 && !HAS_PCH_SPLIT(dev)) I915_WRITE(BLC_PWM_CTL2, dev_priv->saveBLC_PWM_CTL2); |