All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/cnl: Mask previous DDI - PLL mapping
@ 2017-12-01  2:08 James Ausmus
  2017-12-01  2:17 ` James Ausmus
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: James Ausmus @ 2017-12-01  2:08 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

Without masking out the old value, we can end up pointing the DDI to a
disabled PLL, which makes the system fall over. Mask out the previous
value before setting the PLL to DDI mapping.

This can be observed by running igt/testdisplay with both an eDP and
HDMI/DP output active.

Fixes: 555e38d273172 ("drm/i915/cnl: DDI - PLL mapping")
Testcase: igt/testdisplay
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matt Atwood <matthew.s.atwood@intel.com>
Signed-off-by: James Ausmus <james.ausmus@intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index eff3b51872eb..123a3253453f 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -2098,6 +2098,7 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder,
 	if (IS_CANNONLAKE(dev_priv)) {
 		/* Configure DPCLKA_CFGCR0 to map the DPLL to the DDI. */
 		val = I915_READ(DPCLKA_CFGCR0);
+		val &= ~DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(port);
 		val |= DPCLKA_CFGCR0_DDI_CLK_SEL(pll->id, port);
 		I915_WRITE(DPCLKA_CFGCR0, val);
 
-- 
2.15.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-12-01 17:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-01  2:08 [PATCH] drm/i915/cnl: Mask previous DDI - PLL mapping James Ausmus
2017-12-01  2:17 ` James Ausmus
2017-12-01 17:37   ` Rodrigo Vivi
2017-12-01  2:31 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-01  2:49 ` ✗ Fi.CI.BAT: failure for drm/i915/cnl: Mask previous DDI - PLL mapping (rev2) Patchwork
2017-12-01  5:40 ` ✓ Fi.CI.BAT: success " Patchwork
2017-12-01  6:29 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-12-01  7:45 ` ✓ Fi.CI.BAT: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.