> Subject: [CI 26/32] drm/i915/display: Add .get_freq to MTL+ platforms
> 
> Add .get_freq hook to support dpll framework for MTL+ platforms.
> 
> Signed-off-by: Mika Kahola <[email protected]>

LGTM,
Reviewed-by: Suraj Kandpal <[email protected]>

> ---
>  drivers/gpu/drm/i915/display/intel_dpll_mgr.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> index db6ae7bc63d6..07bc99ae689c 100644
> --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c
> @@ -4379,8 +4379,21 @@ static bool mtl_pll_get_hw_state(struct
> intel_display *display,
>       return intel_cx0pll_readout_hw_state(encoder, &dpll_hw_state-
> >cx0pll);  }
> 
> +static int mtl_pll_get_freq(struct intel_display *display,
> +                         const struct intel_dpll *pll,
> +                         const struct intel_dpll_hw_state *dpll_hw_state) {
> +     struct intel_encoder *encoder = get_intel_encoder(display, pll);
> +
> +     if (drm_WARN_ON(display->drm, !encoder))
> +             return -EINVAL;
> +
> +     return intel_cx0pll_calc_port_clock(encoder, &dpll_hw_state-
> >cx0pll);
> +}
> +
>  static const struct intel_dpll_funcs mtl_pll_funcs = {
>       .get_hw_state = mtl_pll_get_hw_state,
> +     .get_freq = mtl_pll_get_freq,
>  };
> 
>  static const struct dpll_info mtl_plls[] = {
> --
> 2.34.1

Reply via email to