diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-03-19 08:22:56 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-03-19 08:22:56 +0000 |
commit | 78db4b9606deef31d68cf7c7e04fda39343712e3 (patch) | |
tree | 53b9ba9edd7440aeda63e0f66f706ecacf9630a6 /sys/dev/drm/i915_suspend.c | |
parent | 76f193cd692e42617fb7f33b9581e7e5a3da58f0 (diff) | |
download | FreeBSD-src-78db4b9606deef31d68cf7c7e04fda39343712e3.zip FreeBSD-src-78db4b9606deef31d68cf7c7e04fda39343712e3.tar.gz |
Pull in some suspend / resume changes from Intel's code
Tested by: mav@
MFC after: 3 days
Diffstat (limited to 'sys/dev/drm/i915_suspend.c')
-rw-r--r-- | sys/dev/drm/i915_suspend.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sys/dev/drm/i915_suspend.c b/sys/dev/drm/i915_suspend.c index 9f8fad6..0d50777 100644 --- a/sys/dev/drm/i915_suspend.c +++ b/sys/dev/drm/i915_suspend.c @@ -125,11 +125,6 @@ static void i915_save_vga(struct drm_device *dev) /* VGA color palette registers */ dev_priv->saveDACMASK = I915_READ8(VGA_DACMASK); - /* DACCRX automatically increments during read */ - I915_WRITE8(VGA_DACRX, 0); - /* Read 3 bytes of color data from each index */ - for (i = 0; i < 256 * 3; i++) - dev_priv->saveDACDATA[i] = I915_READ8(VGA_DACDATA); /* MSR bits */ dev_priv->saveMSR = I915_READ8(VGA_MSR_READ); @@ -231,12 +226,6 @@ static void i915_restore_vga(struct drm_device *dev) /* VGA color palette registers */ I915_WRITE8(VGA_DACMASK, dev_priv->saveDACMASK); - /* DACCRX automatically increments during read */ - I915_WRITE8(VGA_DACWX, 0); - /* Read 3 bytes of color data from each index */ - for (i = 0; i < 256 * 3; i++) - I915_WRITE8(VGA_DACDATA, dev_priv->saveDACDATA[i]); - } int i915_save_state(struct drm_device *dev) @@ -250,6 +239,13 @@ int i915_save_state(struct drm_device *dev) pci_read_config_byte(dev->pdev, LBB, &dev_priv->saveLBB); #endif + /* Render Standby */ + if (IS_I965G(dev) && IS_MOBILE(dev)) + dev_priv->saveRENDERSTANDBY = I915_READ(MCHBAR_RENDER_STANDBY); + + /* Hardware status page */ + dev_priv->saveHWS = I915_READ(HWS_PGA); + /* Display arbitration control */ dev_priv->saveDSPARB = I915_READ(DSPARB); @@ -379,6 +375,14 @@ int i915_restore_state(struct drm_device *dev) pci_write_config_byte(dev->pdev, LBB, dev_priv->saveLBB); #endif + /* Render Standby */ + if (IS_I965G(dev) && IS_MOBILE(dev)) + I915_WRITE(MCHBAR_RENDER_STANDBY, dev_priv->saveRENDERSTANDBY); + + /* Hardware status page */ + I915_WRITE(HWS_PGA, dev_priv->saveHWS); + + /* Display arbitration */ I915_WRITE(DSPARB, dev_priv->saveDSPARB); /* Pipe & plane A info */ |