Skip to content

Commit

Permalink
drm/i915: Fix read outside array bounds in restoring the SWF10 range.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Eric Anholt committed Aug 5, 2009
1 parent 9c9fe1f commit 819e006
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_suspend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 819e006

Please sign in to comment.