Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 17fe6981 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/lvds: Connect the PWM to the LVDS pipe



... and do not just assume to always use pipe B.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent b9e68670
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1012,10 +1012,18 @@ bool intel_lvds_init(struct drm_device *dev)
out:
	if (HAS_PCH_SPLIT(dev)) {
		u32 pwm;
		/* make sure PWM is enabled */

		pipe = (I915_READ(PCH_LVDS) & LVDS_PIPEB_SELECT) ? 1 : 0;

		/* make sure PWM is enabled and locked to the LVDS pipe */
		pwm = I915_READ(BLC_PWM_CPU_CTL2);
		pwm |= (PWM_ENABLE | PWM_PIPE_B);
		I915_WRITE(BLC_PWM_CPU_CTL2, pwm);
		if (pipe == 0 && (pwm & PWM_PIPE_B))
			I915_WRITE(BLC_PWM_CPU_CTL2, pwm & ~PWM_ENABLE);
		if (pipe)
			pwm |= PWM_PIPE_B;
		else
			pwm &= ~PWM_PIPE_B;
		I915_WRITE(BLC_PWM_CPU_CTL2, pwm | PWM_ENABLE);

		pwm = I915_READ(BLC_PWM_PCH_CTL1);
		pwm |= PWM_PCH_ENABLE;