From: Jesse Barnes Date: Thu, 4 Feb 2010 22:17:47 +0000 (-0800) Subject: drm/i915: fix drps disable so unload & re-load works X-Git-Tag: v2.6.34-rc4~12^2~68^2~24^2~10 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=357b13c3e498bb658f511f91a9e4f09c9553be6e drm/i915: fix drps disable so unload & re-load works 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 Signed-off-by: Eric Anholt --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cba51c2..e879885 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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;