Skip to content

Commit

Permalink
drm/i915: don't save/restore HWS_PGA reg for kms
Browse files Browse the repository at this point in the history
We already do that as part of the ringbuffer re-setup at resume time.
Furthermore the register offset has moved on gen6+ around quite a bit,
and on ilk/gm45 we also need to restore the HWS reg for the bsd ring,
not just the render ring.

So again in kms mode this is only confusing a best, hence don't
bother.

v2: Fixup logic, noticed by Paulo Zanoni.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Daniel Vetter committed Oct 17, 2012
1 parent 905c27b commit c630119
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/gpu/drm/i915/i915_suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,8 @@ int i915_save_state(struct drm_device *dev)
mutex_lock(&dev->struct_mutex);

/* Hardware status page */
dev_priv->saveHWS = I915_READ(HWS_PGA);
if (!drm_core_check_feature(dev, DRIVER_MODESET))
dev_priv->saveHWS = I915_READ(HWS_PGA);

i915_save_display(dev);

Expand Down Expand Up @@ -867,7 +868,8 @@ int i915_restore_state(struct drm_device *dev)
mutex_lock(&dev->struct_mutex);

/* Hardware status page */
I915_WRITE(HWS_PGA, dev_priv->saveHWS);
if (!drm_core_check_feature(dev, DRIVER_MODESET))
I915_WRITE(HWS_PGA, dev_priv->saveHWS);

i915_restore_display(dev);

Expand Down

0 comments on commit c630119

Please sign in to comment.