Skip to content

Commit 8b0f7e0

Browse files
mkaholarodrigovivi
authored andcommitted
drm/i915: Configure DPLL's for Cannonlake
DPLL's are defined in DPCLKA_CFGCR0 register (0x6C200). Let's use these definitions when computing dpll's for ddi ports. v2: (Rodrigo) Remove register that was defined in another patch with fixed name and more bits. Signed-off-by: Kahola, Mika <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]> Reviewed-by: Ander Conselvan de Oliveira <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 555e38d commit 8b0f7e0

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

drivers/gpu/drm/i915/intel_display.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8868,6 +8868,22 @@ static int haswell_crtc_compute_clock(struct intel_crtc *crtc,
88688868
return 0;
88698869
}
88708870

8871+
static void cannonlake_get_ddi_pll(struct drm_i915_private *dev_priv,
8872+
enum port port,
8873+
struct intel_crtc_state *pipe_config)
8874+
{
8875+
enum intel_dpll_id id;
8876+
u32 temp;
8877+
8878+
temp = I915_READ(DPCLKA_CFGCR0) & DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(port);
8879+
id = temp >> (port * 2);
8880+
8881+
if (WARN_ON(id < SKL_DPLL0 || id > SKL_DPLL2))
8882+
return;
8883+
8884+
pipe_config->shared_dpll = intel_get_shared_dpll_by_id(dev_priv, id);
8885+
}
8886+
88718887
static void bxt_get_ddi_pll(struct drm_i915_private *dev_priv,
88728888
enum port port,
88738889
struct intel_crtc_state *pipe_config)
@@ -9055,7 +9071,9 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc,
90559071

90569072
port = (tmp & TRANS_DDI_PORT_MASK) >> TRANS_DDI_PORT_SHIFT;
90579073

9058-
if (IS_GEN9_BC(dev_priv))
9074+
if (IS_CANNONLAKE(dev_priv))
9075+
cannonlake_get_ddi_pll(dev_priv, port, pipe_config);
9076+
else if (IS_GEN9_BC(dev_priv))
90599077
skylake_get_ddi_pll(dev_priv, port, pipe_config);
90609078
else if (IS_GEN9_LP(dev_priv))
90619079
bxt_get_ddi_pll(dev_priv, port, pipe_config);

0 commit comments

Comments
 (0)