drm/i915/display: Add support for SNPS PHY HDMI PLL algorithm for DG2
authorAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Mon, 20 Jan 2025 04:21:17 +0000 (09:51 +0530)
committerAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Thu, 23 Jan 2025 04:27:24 +0000 (09:57 +0530)
commit5947642004bfd56436ce63d3e65d517b5be52549
tree0eb5c877a1e7951615eb8963f6763b673a639b4a
parentb9360d1751ec9397ab9e4fdea24a749d8fc19c91
drm/i915/display: Add support for SNPS PHY HDMI PLL algorithm for DG2

Add helpers to calculate the necessary parameters for configuring the
HDMI PLL for SNPS MPLLB and C10 PHY.

The pll parameters are computed for desired pixel clock, curve data
and other inputs used for interpolation and finally stored in the
pll_state.

Currently the helper is used to compute PLLs for DG2 SNPS PHY.
Support for computing Plls for C10 PHY is added in subsequent patches.

v2:
-Used kernel types instead of C99 types. (Jani)
-Fixed styling issues and renamed few variables to more meaningful
 names. (Jani)
-Added Xe make file changes. (Jani)
-Fixed build errors reported by kernel test robot

v3:
-Renamed helper to align with file name. (Jani)

v4:
-Removed erroraneous comment, and added Bspec# as part of trailer. (Suraj)
-Fixed warning flagged by kernel test robot.

Bspec: 54032
Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Tested-by: Khaled Almahallawy <khaled.almahallawy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250120042122.1029481-2-ankit.k.nautiyal@intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_snps_hdmi_pll.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_snps_hdmi_pll.h [new file with mode: 0644]
drivers/gpu/drm/xe/Makefile