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 11:21:29 -0700 |
commit | 819e0064634f580ab618189e657ea58341d214b7 (patch) | |
tree | 4b3bc501613ef3dbbaed592f0e6935fe035399f4 /drivers | |
parent | 9c9fe1f841745184bbc5460c6f3909fded3b929b (diff) | |
download | op-kernel-dev-819e0064634f580ab618189e657ea58341d214b7.zip op-kernel-dev-819e0064634f580ab618189e657ea58341d214b7.tar.gz |
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')
-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 9e1d16e..1d04e19 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]); |