diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-07-26 00:50:38 +0200 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-08-05 20:21:29 +0200 |
commit | 819e0064634f580ab618189e657ea58341d214b7 (patch) | |
tree | 4b3bc501613ef3dbbaed592f0e6935fe035399f4 /drivers/gpu | |
parent | drm/i915: Use our own workqueue to avoid wedging the system along with the GPU. (diff) | |
download | linux-819e0064634f580ab618189e657ea58341d214b7.tar.xz linux-819e0064634f580ab618189e657ea58341d214b7.zip |
drm/i915: Fix read outside array bounds in restoring the SWF10 range.
dev_priv->saveSWF1 is a 16 element array, but this reads up to index 22,
and restored values from the wrong registers.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_suspend.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c index 9e1d16e5c3ea..1d04e1904ac6 100644 --- a/drivers/gpu/drm/i915/i915_suspend.c +++ b/drivers/gpu/drm/i915/i915_suspend.c @@ -598,7 +598,7 @@ int i915_restore_state(struct drm_device *dev) for (i = 0; i < 16; i++) { I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]); - I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); + I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i]); } for (i = 0; i < 3; i++) I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]); |