diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-02-25 08:13:41 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-06-05 02:52:40 -0400 |
commit | dbb42748ac4929987c1449ecb296b39ef8956b62 (patch) | |
tree | cb5d45b6047b51dd5b9254dc8e043090771acae4 | |
parent | 54e472ae9632992bfbd0c6fd8c8fc5c88d2bdd1f (diff) |
drm/i915: Move the C3 LP write bit setup to gen3_init_clock_gating() for KMS
Move the MI_ARB_STATE MI_ARB_C3_LP_WRITE_ENABLE setup to
gen3_init_clock_gating() from i915_gem_load() when KMS is enabled. Leave
it in i915_gem_load() for the UMS case, but add an explcit check, just
to make it easier to spot it when we eventually rip out UMS support.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_pm.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 87e9b349ebef..89525007925b 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -4756,7 +4756,7 @@ i915_gem_load(struct drm_device *dev) | |||
4756 | init_waitqueue_head(&dev_priv->gpu_error.reset_queue); | 4756 | init_waitqueue_head(&dev_priv->gpu_error.reset_queue); |
4757 | 4757 | ||
4758 | /* On GEN3 we really need to make sure the ARB C3 LP bit is set */ | 4758 | /* On GEN3 we really need to make sure the ARB C3 LP bit is set */ |
4759 | if (IS_GEN3(dev)) { | 4759 | if (!drm_core_check_feature(dev, DRIVER_MODESET) && IS_GEN3(dev)) { |
4760 | I915_WRITE(MI_ARB_STATE, | 4760 | I915_WRITE(MI_ARB_STATE, |
4761 | _MASKED_BIT_ENABLE(MI_ARB_C3_LP_WRITE_ENABLE)); | 4761 | _MASKED_BIT_ENABLE(MI_ARB_C3_LP_WRITE_ENABLE)); |
4762 | } | 4762 | } |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index b124ba4ca7e5..f6fd86a17174 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -5507,6 +5507,9 @@ static void gen3_init_clock_gating(struct drm_device *dev) | |||
5507 | 5507 | ||
5508 | /* interrupts should cause a wake up from C3 */ | 5508 | /* interrupts should cause a wake up from C3 */ |
5509 | I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_AGPBUSY_INT_EN)); | 5509 | I915_WRITE(INSTPM, _MASKED_BIT_ENABLE(INSTPM_AGPBUSY_INT_EN)); |
5510 | |||
5511 | /* On GEN3 we really need to make sure the ARB C3 LP bit is set */ | ||
5512 | I915_WRITE(MI_ARB_STATE, _MASKED_BIT_ENABLE(MI_ARB_C3_LP_WRITE_ENABLE)); | ||
5510 | } | 5513 | } |
5511 | 5514 | ||
5512 | static void i85x_init_clock_gating(struct drm_device *dev) | 5515 | static void i85x_init_clock_gating(struct drm_device *dev) |