drm/i915: Fix HDMI 12bpc and pixel repeat clock readout for DDI platforms
Subsystems (2)
PATCH 1/2 drm/i915: Fix HDMI 12bpc and pixel repeat clock readout for DDI platforms
From: Ville Syrjälä <[email protected]>
Take the HDMI 12bpc mode and pixel repeat into account when extracting the dotclock from the hardware on DDI platforms.
Tested on HSW only.
Signed-off-by Ville Syrjälä <[email protected]>
--- drivers/gpu/drm/i915/intel_ddi.c | 49 ++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 25 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +24 -25
@@ -855,6 +855,26 @@ static int skl_calc_wrpll_link(struct drm_i915_private *dev_priv,return dco_freq / (p0 * p1 * p2 *5 ); } +static void ddi_dotclock_get (struct intel_crtc_state *pipe_config) +{ +int dotclock; + +if (pipe_config->has_pch_encoder) + dotclock =intel_dotclock_calculate (pipe_config->port_clock, + &pipe_config->fdi_m_n); +else if (pipe_config->has_dp_encoder) + dotclock =intel_dotclock_calculate (pipe_config->port_clock, + &pipe_config->dp_m_n); +else if (pipe_config->has_hdmi_sink && pipe_config->pipe_bpp ==36 ) + dotclock = pipe_config->port_clock *2 /3 ; +else + dotclock = pipe_config->port_clock; + +if (pipe_config->pixel_multiplier) + dotclock /= pipe_config->pixel_multiplier; + + pipe_config->base.adjusted_mode.crtc_clock = dotclock; +}static void skl_ddi_clock_get (struct intel_encoder *encoder,struct intel_crtc_state *pipe_config)
@@ -901,12 +921,7 @@ static void skl_ddi_clock_get(struct intel_encoder *encoder, pipe_config->port_clock = link_clock; -if (pipe_config->has_dp_encoder) - pipe_config->base.adjusted_mode.crtc_clock = -intel_dotclock_calculate (pipe_config->port_clock, - &pipe_config->dp_m_n); -else - pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; +ddi_dotclock_get (pipe_config); } static void hsw_ddi_clock_get(struct intel_encoder *encoder,
@@ -953,16 +968,7 @@ static void hsw_ddi_clock_get(struct intel_encoder *encoder, pipe_config->port_clock = link_clock *2 ; -if (pipe_config->has_pch_encoder) - pipe_config->base.adjusted_mode.crtc_clock = -intel_dotclock_calculate (pipe_config->port_clock, - &pipe_config->fdi_m_n); -else if (pipe_config->has_dp_encoder) - pipe_config->base.adjusted_mode.crtc_clock = -intel_dotclock_calculate (pipe_config->port_clock, - &pipe_config->dp_m_n); -else - pipe_config->base.adjusted_mode.crtc_clock = pipe_config->port_clock; +ddi_dotclock_get (pipe_config); } static int bxt_calc_pll_link(struct drm_i915_private *dev_priv,
@@ -979,16 +985,9 @@ static void bxt_ddi_clock_get(struct intel_encoder *encoder,enum port port =intel_ddi_get_encoder_port (encoder);uint32_t dpll = port; - pipe_config->port_clock = -bxt_calc_pll_link (dev_priv, dpll); + pipe_config->port_clock =bxt_calc_pll_link (dev_priv, dpll); -if (pipe_config->has_dp_encoder) - pipe_config->base.adjusted_mode.crtc_clock = -intel_dotclock_calculate (pipe_config->port_clock, - &pipe_config->dp_m_n); -else - pipe_config->base.adjusted_mode.crtc_clock = - pipe_config->port_clock; +ddi_dotclock_get (pipe_config); } void intel_ddi_clock_get(struct intel_encoder *encoder,
Signature · 6 lines
2.3.6 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 Revert "drm/i915: Disable 12bpc hdmi for now"
From: Ville Syrjälä <[email protected]>
HDMI 12bpc should be working fine now. Let it loose.
This reverts commit 5e3daaca09f5158eff9c92290faa1d2001ecc6e4.
Signed-off-by Ville Syrjälä <[email protected]>
--- drivers/gpu/drm/i915/intel_hdmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +1 -2
@@ -1262,8 +1262,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,*/ if (pipe_config->pipe_bpp >8 *3 && pipe_config->has_hdmi_sink && clock_12bpc <= portclock_limit && -hdmi_12bpc_possible (pipe_config) && -0 /* FIXME 12bpc support totally broken */ ) { +hdmi_12bpc_possible (pipe_config)) {DRM_DEBUG_KMS ("picking bpc to 12 for HDMI output\n" ); desired_bpp =12 *3 ;
Signature · 6 lines
2.3.6 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx