aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaxime Ripard <[email protected]>2024-05-27 15:57:58 +0200
committerMaxime Ripard <[email protected]>2024-05-28 10:12:25 +0200
commit40167bcbd19c241fc30a912fa8a8276b9ed1a12e (patch)
tree1e7aef0eb6d2529fa8cc7977f78977a4b2559a93 /include
parent08eeaa134e1d801e2d935c16b9200535bd580b8a (diff)
drm/display: hdmi: Add HDMI compute clock helper
A lot of HDMI drivers have some variation of the formula to calculate the TMDS character rate from a mode, but few of them actually take all parameters into account. Let's create a helper to provide that rate taking all parameters into account. Reviewed-by: Dave Stevenson <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Maxime Ripard <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/drm/display/drm_hdmi_helper.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/display/drm_hdmi_helper.h b/include/drm/display/drm_hdmi_helper.h
index 76d234826e22..57e3b18c15ec 100644
--- a/include/drm/display/drm_hdmi_helper.h
+++ b/include/drm/display/drm_hdmi_helper.h
@@ -24,4 +24,8 @@ drm_hdmi_infoframe_set_hdr_metadata(struct hdmi_drm_infoframe *frame,
void drm_hdmi_avi_infoframe_content_type(struct hdmi_avi_infoframe *frame,
const struct drm_connector_state *conn_state);
+unsigned long long
+drm_hdmi_compute_mode_clock(const struct drm_display_mode *mode,
+ unsigned int bpc, enum hdmi_colorspace fmt);
+
#endif