RE: [PATCH 13/14] drm/i915/hdmi: Add helper to get max FRL rate for an HDMI sink

"Kandpal, Suraj" <[email protected]> Mon, 3 Aug 2026 05:30:20 +0000
Newsgroups org.freedesktop.lists.intel-gfx,org.freedesktop.lists.intel-xe
Message-ID <DS4PPFE901A304F48B11578AA8B8DDBFDD2E3D52@DS4PPFE901A304F.namprd11.prod.outlook.com>
> Subject: [PATCH 13/14] drm/i915/hdmi: Add helper to get max FRL rate for =
an
> HDMI sink
>=20
> Add the helpers for getting the max FRL rate with and without DSC for an =
HDMI
> sink.
>=20
> Signed-off-by: Ankit Nautiyal <[email protected]>

LGTM,
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(+)
>=20
> diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c
> b/drivers/gpu/drm/i915/display/intel_hdmi.c
> index 95393ec5d561..352a315b0fb0 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c
> @@ -3479,3 +3479,22 @@ intel_hdmi_dsc_get_bpp(int src_fractional_bpp, int
> slice_width, int num_slices,
>=20
>  	return dsc_bpp_x16;
>  }
> +
> +int intel_hdmi_sink_max_frl_rate(struct drm_connector *connector) {
> +	int max_lanes =3D connector->display_info.hdmi.max_lanes;
> +	int rate_per_lane =3D
> +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 =3D connector->display_info.hdmi.dsc_cap.max_lanes;
> +	int rate_per_lane =3D
> +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 072c8d228697..f7a494df19e6 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdmi.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdmi.h
> @@ -80,4 +80,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);
>=20
> +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