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>,
Alain Volmat <alain.volmat@foss.st.com>,
David Airlie <airlied@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Raphael Gallais-Pou <rgallaispou@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 5/8] drm/sti: hdmi: Use the common TMDS char rate constants
Date: Tue, 19 May 2026 16:47:01 +0200 [thread overview]
Message-ID: <20260519144712.1418302-6-javierm@redhat.com> (raw)
In-Reply-To: <20260519144712.1418302-1-javierm@redhat.com>
Replace the 340000000 and 165000000 magic numbers with the shared
constants defined in the <drm/display/drm_hdmi_helper.h> header.
Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
index d25ecd4f4b67..1c5a54cb999a 100644
--- a/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
+++ b/drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c
@@ -4,6 +4,7 @@
* Author: Vincent Abriou <vincent.abriou@st.com> for STMicroelectronics.
*/
+#include <drm/display/drm_hdmi_helper.h>
#include <drm/drm_print.h>
#include "sti_hdmi_tx3g4c28phy.h"
@@ -102,7 +103,7 @@ static bool sti_hdmi_tx3g4c28phy_start(struct sti_hdmi *hdmi)
tmdsck = ckpxpll;
pllctrl |= 40 << PLL_CFG_NDIV_SHIFT;
- if (tmdsck > 340000000) {
+ if (tmdsck > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_3) {
DRM_ERROR("output TMDS clock (%d) out of range\n", tmdsck);
goto err;
}
@@ -135,7 +136,7 @@ static bool sti_hdmi_tx3g4c28phy_start(struct sti_hdmi *hdmi)
HDMI_SRZ_CFG_EN_BIASRES_DETECTION |
HDMI_SRZ_CFG_EN_SINK_TERM_DETECTION);
- if (tmdsck > 165000000)
+ if (tmdsck > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0)
val |= HDMI_SRZ_CFG_EN_SRC_TERMINATION;
/*
--
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 ` [PATCH 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-20 12:59 ` 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 ` Javier Martinez Canillas [this message]
2026-05-25 12:44 ` Claude review: drm/sti: hdmi: Use the common TMDS char rate constants 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-6-javierm@redhat.com \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=alain.volmat@foss.st.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=rgallaispou@gmail.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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