aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_suspend.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-25 11:53:22 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-01-31 05:50:04 -0500
commita65e827dd57b2fd48a698209dd7701eb13e72095 (patch)
treeee9ee35ee897abed42b39992790b98c8d705f1e0 /drivers/gpu/drm/i915/i915_suspend.c
parent44cec74040564cba2ace8c3756d2fc908bc7a373 (diff)
drm/i915: move DP save/restore into i915_ums.c
Note that this slightly changes the order, but we only move it within the block of registers that restore encoder state. Specifically LVDS is now restored after DP, whereas previously it was done before. Legacy vga is still restored afterwards, which seems to be the important thing (if there's anything important in this restore ordering at all). Reviewed-by: Imre Deak <imre.deak@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.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 3b9baea9a4c2..3911e0450bbe 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -240,24 +240,6 @@ static void i915_save_display(struct drm_device *dev)
240 dev_priv->regfile.savePP_DIVISOR = I915_READ(PP_DIVISOR); 240 dev_priv->regfile.savePP_DIVISOR = I915_READ(PP_DIVISOR);
241 } 241 }
242 242
243 if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
244 /* Display Port state */
245 if (SUPPORTS_INTEGRATED_DP(dev)) {
246 dev_priv->regfile.saveDP_B = I915_READ(DP_B);
247 dev_priv->regfile.saveDP_C = I915_READ(DP_C);
248 dev_priv->regfile.saveDP_D = I915_READ(DP_D);
249 dev_priv->regfile.savePIPEA_GMCH_DATA_M = I915_READ(_PIPEA_GMCH_DATA_M);
250 dev_priv->regfile.savePIPEB_GMCH_DATA_M = I915_READ(_PIPEB_GMCH_DATA_M);
251 dev_priv->regfile.savePIPEA_GMCH_DATA_N = I915_READ(_PIPEA_GMCH_DATA_N);
252 dev_priv->regfile.savePIPEB_GMCH_DATA_N = I915_READ(_PIPEB_GMCH_DATA_N);
253 dev_priv->regfile.savePIPEA_DP_LINK_M = I915_READ(_PIPEA_DP_LINK_M);
254 dev_priv->regfile.savePIPEB_DP_LINK_M = I915_READ(_PIPEB_DP_LINK_M);
255 dev_priv->regfile.savePIPEA_DP_LINK_N = I915_READ(_PIPEA_DP_LINK_N);
256 dev_priv->regfile.savePIPEB_DP_LINK_N = I915_READ(_PIPEB_DP_LINK_N);
257 }
258 /* FIXME: regfile.save TV & SDVO state */
259 }
260
261 /* Only regfile.save FBC state on the platform that supports FBC */ 243 /* Only regfile.save FBC state on the platform that supports FBC */
262 if (I915_HAS_FBC(dev)) { 244 if (I915_HAS_FBC(dev)) {
263 if (HAS_PCH_SPLIT(dev)) { 245 if (HAS_PCH_SPLIT(dev)) {
@@ -323,16 +305,6 @@ static void i915_restore_display(struct drm_device *dev)
323 I915_WRITE(PP_CONTROL, dev_priv->regfile.savePP_CONTROL); 305 I915_WRITE(PP_CONTROL, dev_priv->regfile.savePP_CONTROL);
324 } 306 }
325 307
326 if (!drm_core_check_feature(dev, DRIVER_MODESET)) {
327 /* Display Port state */
328 if (SUPPORTS_INTEGRATED_DP(dev)) {
329 I915_WRITE(DP_B, dev_priv->regfile.saveDP_B);
330 I915_WRITE(DP_C, dev_priv->regfile.saveDP_C);
331 I915_WRITE(DP_D, dev_priv->regfile.saveDP_D);
332 }
333 /* FIXME: restore TV & SDVO state */
334 }
335
336 /* only restore FBC info on the platform that supports FBC*/ 308 /* only restore FBC info on the platform that supports FBC*/
337 intel_disable_fbc(dev); 309 intel_disable_fbc(dev);
338 if (I915_HAS_FBC(dev)) { 310 if (I915_HAS_FBC(dev)) {
@@ -347,6 +319,7 @@ static void i915_restore_display(struct drm_device *dev)
347 I915_WRITE(FBC_CONTROL, dev_priv->regfile.saveFBC_CONTROL); 319 I915_WRITE(FBC_CONTROL, dev_priv->regfile.saveFBC_CONTROL);
348 } 320 }
349 } 321 }
322
350 if (!drm_core_check_feature(dev, DRIVER_MODESET)) 323 if (!drm_core_check_feature(dev, DRIVER_MODESET))
351 i915_restore_vga(dev); 324 i915_restore_vga(dev);
352 else 325 else