]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/display: Add helper function for fuzzy clock check
authorMika Kahola <mika.kahola@intel.com>
Mon, 19 Jan 2026 09:37:49 +0000 (09:37 +0000)
committerMika Kahola <mika.kahola@intel.com>
Tue, 20 Jan 2026 08:52:54 +0000 (10:52 +0200)
commit920fa5d920c362a2e57ffec7bb39b5c25bc59610
tree6b933716e32ac6ccabc68a8528f9ca3cb66b9de7
parentcf0635d40af0029ed5f600f366a395df3c58a19b
drm/i915/display: Add helper function for fuzzy clock check

The hard coded clock rate stored in the PLL state will be removed by
a follow-up change. The clock is calculated instead of
using clock from the PLL divider values. Since this calculated clock
may vary due to fixed point rounding issues, a +-1 kHz variation is
allowed with the request clock rate against the calculated clock rate.

v2:
- Use the stricter +-1 kHz allowed difference.
- Derive the clock from PLL dividers in intel_cx0pll_enable().
- Move corresponding fuzzy check for LT PHY PLLs to this patch.

v3: Reword commit message (Suraj)
    Move clock check to intel_dpll and rename it (Suraj)

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patch.msgid.link/20260119093757.2850233-9-mika.kahola@intel.com
drivers/gpu/drm/i915/display/intel_cx0_phy.c
drivers/gpu/drm/i915/display/intel_dpll.c
drivers/gpu/drm/i915/display/intel_dpll.h
drivers/gpu/drm/i915/display/intel_lt_phy.c