[Intel-gfx] [PATCH][drm/i915] restore HWS_PGA if resuming from suspend
Eric Anholt
eric at anholt.net
Mon Nov 17 19:26:12 CET 2008
On Mon, 2008-11-17 at 18:14 +0800, Li Peng wrote:
> This patch restore HWS_PGA for device who don't use gtt mapped hardware
> status page.
> It is to fix the suspend/resume failure of xf86-video-intel dri2 branch
> on 945GME, as the dri2 branch doesn't call I830Resume() to restore
> hardware status page anymore and we need to handle this in
> i915_gem_entervt_ioctl()
This should also be saved/restored in i915_suspend.c so that it works
correctly in the absence of the X Server doing the enter/leavevt path.
> Peng
> diff --git a/drivers/gpu/drm/i915/i915_gem.c
> b/drivers/gpu/drm/i915/i915_gem.c
> index a15b098..b6b451a 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2924,8 +2924,13 @@ i915_gem_init_hws(struct drm_device *dev)
> /* If we need a physical address for the status page, it's already
> * initialized at driver load time.
> */
> - if (!I915_NEED_GFX_HWS(dev))
> + if (!I915_NEED_GFX_HWS(dev)) {
> + if (dev_priv->mm.suspended) {
> + I915_WRITE(HWS_PGA, dev_priv->dma_status_page);
> + I915_READ(HWS_PGA); /* posting read */
> + }
> return 0;
> + }
>
> obj = drm_gem_object_alloc(dev, 4096);
> if (obj == NULL) {
>
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081117/37783d62/attachment.sig>
More information about the Intel-gfx
mailing list