drm/i915: fix drps disable so unload & re-load works
authorJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 4 Feb 2010 22:17:47 +0000 (14:17 -0800)
committerEric Anholt <eric@anholt.net>
Mon, 22 Feb 2010 16:46:57 +0000 (11:46 -0500)
At unload time, we need to disable DRPS, but we need to do it correctly
or the GPU will hang and we won't be able to load the module again.  So
set the SFCAVM bit so we can properly restore the DRPS config at unload.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_display.c

index cba51c2b512f665138bd4abe139d183ad4138ab9..e879885f47545d6e854a9fef123926e135edcc10 100644 (file)
@@ -4699,7 +4699,7 @@ void ironlake_disable_drps(struct drm_device *dev)
        fstart = (I915_READ(MEMMODECTL) & MEMMODE_FSTART_MASK) >>
                MEMMODE_FSTART_SHIFT;
        rgvswctl = (MEMCTL_CMD_CHFREQ << MEMCTL_CMD_SHIFT) |
-               (fstart << MEMCTL_FREQ_SHIFT);
+               (fstart << MEMCTL_FREQ_SHIFT) | MEMCTL_SFCAVM;
        I915_WRITE(MEMSWCTL, rgvswctl);
        msleep(1);
        rgvswctl |= MEMCTL_CMD_STS;