public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix ICL HDMI clock readout
@ 2018-08-28 15:32 Ville Syrjala
  2018-08-28 17:26 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Ville Syrjala @ 2018-08-28 15:32 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Copy the 38.4 vs. 19.2 MHz ref clock exception from the dpll
mgr into the clock readout function as well.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107722
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index f3b115ce4029..68b301e6f41d 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1416,6 +1416,13 @@ static int cnl_calc_wrpll_link(struct drm_i915_private *dev_priv,
 
 	ref_clock = dev_priv->cdclk.hw.ref;
 
+	/*
+	 * For ICL, the spec states: if reference frequency is 38.4, use 19.2
+	 * because the DPLL automatically divides that by 2.
+	 */
+	if (IS_ICELAKE(dev_priv) && ref_clock == 38400)
+		ref_clock = 19200;
+
 	dco_freq = (cfgcr0 & DPLL_CFGCR0_DCO_INTEGER_MASK) * ref_clock;
 
 	dco_freq += (((cfgcr0 & DPLL_CFGCR0_DCO_FRACTION_MASK) >>
-- 
2.16.4

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

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

end of thread, other threads:[~2018-09-04 13:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28 15:32 [PATCH] drm/i915: Fix ICL HDMI clock readout Ville Syrjala
2018-08-28 17:26 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-08-28 20:36 ` [PATCH] " Rodrigo Vivi
2018-08-30 15:48   ` Ville Syrjälä
2018-08-30 19:09     ` Rodrigo Vivi
2018-08-28 21:07 ` ✓ Fi.CI.IGT: success for " Patchwork
2018-09-03 14:28 ` [PATCH v2] drm/i915: Fix ICL+ " Ville Syrjala
2018-09-04  5:21   ` Rodrigo Vivi
2018-09-04 13:26     ` Ville Syrjälä
2018-09-03 15:10 ` ✓ Fi.CI.BAT: success for drm/i915: Fix ICL HDMI clock readout (rev2) Patchwork
2018-09-03 21:56 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox