Several DRM drivers already define their own constants for minimum and maximum TMDS character rates.
By defining common rate constants in a shared header, drivers can just use them instead of having driver local define macros or use magic numbers. The values defined in the <drm/display/drm_hdmi_helper.h> header correspond to maximum TMDS character rates defined by each HDMI specification version: - DRM_HDMI_TMDS_CHAR_RATE_MIN: 25 MHz (minimum for all versions) - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0: 165 MHz (HDMI 1.0 maximum) - DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3: 340 MHz (HDMI 1.3 maximum) - DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0: 600 MHz (HDMI 2.0 maximum) Suggested-by: Maxime Ripard <[email protected]> Signed-off-by: Javier Martinez Canillas <[email protected]> --- include/drm/display/drm_hdmi_helper.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/drm/display/drm_hdmi_helper.h b/include/drm/display/drm_hdmi_helper.h index 9c31ed90516b..0ee246ff82e0 100644 --- a/include/drm/display/drm_hdmi_helper.h +++ b/include/drm/display/drm_hdmi_helper.h @@ -5,6 +5,12 @@ #include <linux/hdmi.h> +/* HDMI spec TMDS character rate limits (in Hz) */ +#define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000 +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0 165000000 +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 340000000 +#define DRM_HDMI_TMDS_CHAR_RATE_MAX_2_0 600000000 + struct drm_connector; struct drm_connector_state; struct drm_display_mode; -- 2.54.0
