From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Javier Martinez Canillas <javierm@redhat.com>,
Maxime Ripard <mripard@kernel.org>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Andy Yan <andy.yan@rock-chips.com>,
David Airlie <airlied@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Jonas Karlman <jonas@kwiboo.se>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Liu Ying <victor.liu@nxp.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Shengjiu Wang <shengjiu.wang@nxp.com>,
Simona Vetter <simona@ffwll.ch>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant
Date: Tue, 19 May 2026 16:46:58 +0200 [thread overview]
Message-ID: <20260519144712.1418302-3-javierm@redhat.com> (raw)
In-Reply-To: <20260519144712.1418302-1-javierm@redhat.com>
Replace the driver local HDMI14_MAX_TMDSCLK define with the shared
constant defined in the <drm/display/drm_hdmi_helper.h> header.
The local define incorrectly referenced HDMI 1.4, but the 340 MHz
maximum TMDS character rate was actually introduced in HDMI 1.3.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 41b3a9cfa2f5..d7c0a599aa42 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -51,8 +51,6 @@
/* DW-HDMI Controller >= 0x200a are at least compliant with SCDC version 1 */
#define SCDC_MIN_SOURCE_VERSION 0x1
-#define HDMI14_MAX_TMDSCLK 340000000
-
static const u16 csc_coeff_default[3][4] = {
{ 0x2000, 0x0000, 0x0000, 0x0000 },
{ 0x0000, 0x2000, 0x0000, 0x0000 },
@@ -1426,7 +1424,7 @@ void dw_hdmi_set_high_tmds_clock_ratio(struct dw_hdmi *hdmi,
/* Control for TMDS Bit Period/TMDS Clock-Period Ratio */
if (dw_hdmi_support_scdc(hdmi, display)) {
- if (mtmdsclock > HDMI14_MAX_TMDSCLK)
+ if (mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3)
drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 1);
else
drm_scdc_set_high_tmds_clock_ratio(hdmi->curr_conn, 0);
@@ -1671,7 +1669,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi,
}
/* Wait for resuming transmission of TMDS clock and data */
- if (mtmdsclock > HDMI14_MAX_TMDSCLK)
+ if (mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3)
msleep(100);
return dw_hdmi_phy_power_on(hdmi);
@@ -2032,7 +2030,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
/* Set up HDMI_FC_INVIDCONF */
inv_val = (hdmi->hdmi_data.hdcp_enable ||
(dw_hdmi_support_scdc(hdmi, display) &&
- (vmode->mtmdsclock > HDMI14_MAX_TMDSCLK ||
+ (vmode->mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 ||
hdmi_info->scdc.scrambling.low_rates)) ?
HDMI_FC_INVIDCONF_HDCP_KEEPOUT_ACTIVE :
HDMI_FC_INVIDCONF_HDCP_KEEPOUT_INACTIVE);
@@ -2100,7 +2098,7 @@ static void hdmi_av_composer(struct dw_hdmi *hdmi,
/* Scrambling Control */
if (dw_hdmi_support_scdc(hdmi, display)) {
- if (vmode->mtmdsclock > HDMI14_MAX_TMDSCLK ||
+ if (vmode->mtmdsclock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3 ||
hdmi_info->scdc.scrambling.low_rates) {
/*
* HDMI2.0 Specifies the following procedure:
--
2.54.0
next prev parent reply other threads:[~2026-05-19 14:47 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 14:46 [PATCH 0/8] drm/display: hdmi: Add common TMDS character rate constants Javier Martinez Canillas
2026-05-19 14:46 ` [PATCH 1/8] " Javier Martinez Canillas
2026-05-19 15:20 ` Jani Nikula
2026-05-20 7:40 ` Javier Martinez Canillas
2026-05-20 7:51 ` Jani Nikula
2026-05-20 8:13 ` Maxime Ripard
2026-05-20 8:36 ` Javier Martinez Canillas
2026-05-20 9:56 ` Dmitry Baryshkov
2026-05-20 12:17 ` Javier Martinez Canillas
2026-05-20 12:58 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:46 ` Javier Martinez Canillas [this message]
2026-05-20 12:59 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Heiko Stuebner
2026-05-20 13:32 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:46 ` [PATCH 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
2026-05-20 13:33 ` Neil Armstrong
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
2026-05-20 13:00 ` Heiko Stuebner
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Javier Martinez Canillas
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-19 14:57 ` Chen-Yu Tsai
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-19 14:47 ` [PATCH 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
2026-05-20 9:51 ` Dmitry Baryshkov
2026-05-25 12:44 ` Claude review: " Claude Code Review Bot
2026-05-25 12:44 ` Claude review: drm/display: hdmi: Add common TMDS character rate constants Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260519144712.1418302-3-javierm@redhat.com \
--to=javierm@redhat.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=andy.yan@rock-chips.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=shengjiu.wang@nxp.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox