From: Mika Kahola Date: Thu, 12 Mar 2026 08:06:47 +0000 (+0000) Subject: drm/i915/lt_phy: Add xe3plpd .get_freq hook X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff684c7eaca3da6f4436ef268da9ded7d0c4c4d4;p=thirdparty%2Flinux.git drm/i915/lt_phy: Add xe3plpd .get_freq hook Add .get_freq function hook to support dpll framework for xe3plpd platform. v2: Restore port clock calculation (Suraj) Signed-off-by: Mika Kahola Reviewed-by: Suraj Kandpal Link: https://patch.msgid.link/20260312080657.2648265-15-mika.kahola@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c index 6502916793f5d..412582e29ca6a 100644 --- a/drivers/gpu/drm/i915/display/intel_dpll_mgr.c +++ b/drivers/gpu/drm/i915/display/intel_dpll_mgr.c @@ -4583,8 +4583,21 @@ static bool xe3plpd_pll_get_hw_state(struct intel_display *display, return intel_lt_phy_pll_readout_hw_state(encoder, &dpll_hw_state->ltpll); } +static int xe3plpd_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_lt_phy_calc_port_clock(display, &dpll_hw_state->ltpll); +} + static const struct intel_dpll_funcs xe3plpd_pll_funcs = { .get_hw_state = xe3plpd_pll_get_hw_state, + .get_freq = xe3plpd_pll_get_freq, }; static const struct dpll_info xe3plpd_plls[] = {