Commit c1b5dea0 authored by Kristian Høgsberg's avatar Kristian Høgsberg Committed by Eric Anholt

drm/i915: Disable pwrctx before unpin and free

Otherwise the chip may scribble over free memory.
Signed-off-by: default avatarKristian Høgsberg <krh@bitplanet.net>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 69341a5e
...@@ -4588,6 +4588,11 @@ void intel_modeset_cleanup(struct drm_device *dev) ...@@ -4588,6 +4588,11 @@ void intel_modeset_cleanup(struct drm_device *dev)
dev_priv->display.disable_fbc(dev); dev_priv->display.disable_fbc(dev);
if (dev_priv->pwrctx) { if (dev_priv->pwrctx) {
struct drm_i915_gem_object *obj_priv;
obj_priv = dev_priv->pwrctx->driver_private;
I915_WRITE(PWRCTXA, obj_priv->gtt_offset &~ PWRCTX_EN);
I915_READ(PWRCTXA);
i915_gem_object_unpin(dev_priv->pwrctx); i915_gem_object_unpin(dev_priv->pwrctx);
drm_gem_object_unreference(dev_priv->pwrctx); drm_gem_object_unreference(dev_priv->pwrctx);
} }
......
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