diff options
author | Dave Airlie <airlied@redhat.com> | 2010-07-19 23:15:31 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-07-20 01:24:18 -0400 |
commit | 944001201ca0196bcdb088129e5866a9f379d08c (patch) | |
tree | eb8b2b2a9b00f469c283c5714c6d642db8aaa46b | |
parent | 45503ded966c98e604c9667c0b458d40666b9ef3 (diff) |
drm/i915: enable low power render writes on GEN3 hardware.
A lot of 945GMs have had stability issues for a long time, this manifested as X hangs, blitter engine hangs, and lots of crashes.
one such report is at:
https://bugs.freedesktop.org/show_bug.cgi?id=20560
along with numerous distro bugzillas.
This only took a week of digging and hair ripping to figure out.
Tracked down and tested on a 945GM Lenovo T60,
previously running
x11perf -copypixwin500
or
x11perf -copywinpix500
repeatedly would cause the GPU to wedge within 4 or 5 tries, with random busy bits set.
After this patch no hangs were observed.
cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 074385882ccf..43ce3809ef64 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -4741,6 +4741,16 @@ i915_gem_load(struct drm_device *dev) | |||
4741 | list_add(&dev_priv->mm.shrink_list, &shrink_list); | 4741 | list_add(&dev_priv->mm.shrink_list, &shrink_list); |
4742 | spin_unlock(&shrink_list_lock); | 4742 | spin_unlock(&shrink_list_lock); |
4743 | 4743 | ||
4744 | /* On GEN3 we really need to make sure the ARB C3 LP bit is set */ | ||
4745 | if (IS_GEN3(dev)) { | ||
4746 | u32 tmp = I915_READ(MI_ARB_STATE); | ||
4747 | if (!(tmp & MI_ARB_C3_LP_WRITE_ENABLE)) { | ||
4748 | /* arb state is a masked write, so set bit + bit in mask */ | ||
4749 | tmp = MI_ARB_C3_LP_WRITE_ENABLE | (MI_ARB_C3_LP_WRITE_ENABLE << MI_ARB_MASK_SHIFT); | ||
4750 | I915_WRITE(MI_ARB_STATE, tmp); | ||
4751 | } | ||
4752 | } | ||
4753 | |||
4744 | /* Old X drivers will take 0-2 for front, back, depth buffers */ | 4754 | /* Old X drivers will take 0-2 for front, back, depth buffers */ |
4745 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) | 4755 | if (!drm_core_check_feature(dev, DRIVER_MODESET)) |
4746 | dev_priv->fence_reg_start = 3; | 4756 | dev_priv->fence_reg_start = 3; |