[PATCH 4/5] drm/i915/hdmi: Add helper to get max FRL rate for an HDMI sink
Ankit Nautiyal <[email protected]> Wed, 5 Aug 2026 09:20:26 +0530
| Newsgroups | org.freedesktop.lists.intel-xe,org.freedesktop.lists.intel-gfx |
|---|---|
| Message-ID | <[email protected]> |
Add the helpers for getting the max FRL rate with and without DSC for an HDMI sink. Signed-off-by: Ankit Nautiyal <[email protected]> Reviewed-by: Suraj Kandpal <[email protected]> --- drivers/gpu/drm/i915/display/intel_hdmi.c | 19 +++++++++++++++++++ drivers/gpu/drm/i915/display/intel_hdmi.h | 3 +++ 2 files changed, 22 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index d3efd9e4e86a..9b637e38a1a5 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -3422,3 +3422,22 @@ intel_hdmi_dsc_get_bpp(int src_fractional_bpp, int slice_width, int num_slices, return 0; } + +int intel_hdmi_sink_max_frl_rate(struct drm_connector *connector) +{ + int max_lanes = connector->display_info.hdmi.max_lanes; + int rate_per_lane = connector->display_info.hdmi.max_frl_rate_per_lane; + + return max_lanes * rate_per_lane; +} + +int intel_hdmi_sink_dsc_max_frl_rate(struct drm_connector *connector) +{ + int max_lanes = connector->display_info.hdmi.dsc_cap.max_lanes; + int rate_per_lane = connector->display_info.hdmi.dsc_cap.max_frl_rate_per_lane; + + if (!max_lanes || !rate_per_lane) + return 0; + + return max_lanes * rate_per_lane; +} diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.h b/drivers/gpu/drm/i915/display/intel_hdmi.h index c3a0e81615e4..c95ed37bcc0c 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.h +++ b/drivers/gpu/drm/i915/display/intel_hdmi.h @@ -75,4 +75,7 @@ void hsw_read_infoframe(struct intel_encoder *encoder, void intel_hdmi_poll_for_scrambling_enable(const struct intel_crtc_state *crtc_state, struct drm_connector *_connector); +int intel_hdmi_sink_max_frl_rate(struct drm_connector *connector); +int intel_hdmi_sink_dsc_max_frl_rate(struct drm_connector *connector); + #endif /* __INTEL_HDMI_H__ */ -- 2.50.1