diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-03 15:17:19 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-04 19:37:35 -0500 |
commit | 17fe6981109e995f36723e4880a97d48fa38920a (patch) | |
tree | aaea3c1e9acc50832725b9f9545eb0816cdf8b07 /drivers | |
parent | b9e68670cc3a13166b389ce847af19b0d0d33c67 (diff) |
drm/i915/lvds: Connect the PWM to the LVDS pipe
... and do not just assume to always use pipe B.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 23247b235e68..d07055c4d84f 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -1012,10 +1012,18 @@ bool intel_lvds_init(struct drm_device *dev) | |||
1012 | out: | 1012 | out: |
1013 | if (HAS_PCH_SPLIT(dev)) { | 1013 | if (HAS_PCH_SPLIT(dev)) { |
1014 | u32 pwm; | 1014 | u32 pwm; |
1015 | /* make sure PWM is enabled */ | 1015 | |
1016 | pipe = (I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT) ? 1 : 0; | ||
1017 | |||
1018 | /* make sure PWM is enabled and locked to the LVDS pipe */ | ||
1016 | pwm = I915_READ(BLC_PWM_CPU_CTL2); | 1019 | pwm = I915_READ(BLC_PWM_CPU_CTL2); |
1017 | pwm |= (PWM_ENABLE | PWM_PIPE_B); | 1020 | if (pipe == 0 && (pwm & PWM_PIPE_B)) |
1018 | I915_WRITE(BLC_PWM_CPU_CTL2, pwm); | 1021 | I915_WRITE(BLC_PWM_CPU_CTL2, pwm & ~PWM_ENABLE); |
1022 | if (pipe) | ||
1023 | pwm |= PWM_PIPE_B; | ||
1024 | else | ||
1025 | pwm &= ~PWM_PIPE_B; | ||
1026 | I915_WRITE(BLC_PWM_CPU_CTL2, pwm | PWM_ENABLE); | ||
1019 | 1027 | ||
1020 | pwm = I915_READ(BLC_PWM_PCH_CTL1); | 1028 | pwm = I915_READ(BLC_PWM_PCH_CTL1); |
1021 | pwm |= PWM_PCH_ENABLE; | 1029 | pwm |= PWM_PCH_ENABLE; |