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>

authored by Roel Kluin and committed by Eric Anholt 819e0064 9c9fe1f8

+1 -1
+1 -1
drivers/gpu/drm/i915/i915_suspend.c
··· 598 598 599 599 for (i = 0; i < 16; i++) { 600 600 I915_WRITE(SWF00 + (i << 2), dev_priv->saveSWF0[i]); 601 - I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i+7]); 601 + I915_WRITE(SWF10 + (i << 2), dev_priv->saveSWF1[i]); 602 602 } 603 603 for (i = 0; i < 3; i++) 604 604 I915_WRITE(SWF30 + (i << 2), dev_priv->saveSWF2[i]);