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>,
Chen-Yu Tsai <wens@kernel•org>, David Airlie <airlied@gmail•com>,
Jernej Skrabec <jernej.skrabec@gmail•com>,
Maarten Lankhorst <maarten.lankhorst@linux•intel.com>,
Samuel Holland <samuel@sholland•org>,
Simona Vetter <simona@ffwll•ch>,
Thomas Zimmermann <tzimmermann@suse•de>,
dri-devel@lists•freedesktop.org,
linux-arm-kernel@lists•infradead.org,
linux-sunxi@lists•linux.dev
Subject: [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant
Date: Tue, 19 May 2026 16:47:02 +0200 [thread overview]
Message-ID: <20260519144712.1418302-7-javierm@redhat.com> (raw)
In-Reply-To: <20260519144712.1418302-1-javierm@redhat.com>
Replace the 165000000 magic number with the shared constant defined
in the <drm/display/drm_hdmi_helper.h> header.
The old comment referenced "HDMI <= 1.2" but 165 MHz is actually
the maximum TMDS character rate defined by the HDMI 1.0 spec.
Suggested-by: Maxime Ripard <mripard@kernel•org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat•com>
---
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
index 07e2afcb4f95..723a6a11c94e 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
@@ -189,8 +189,8 @@ sun4i_hdmi_connector_clock_valid(const struct drm_connector *connector,
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
return MODE_BAD;
- /* 165 MHz is the typical max pixelclock frequency for HDMI <= 1.2 */
- if (clock > 165000000)
+ /* HDMI 1.0 max TMDS character rate */
+ if (clock > DRM_HDMI_TMDS_CHAR_RATE_MAX_1_0)
return MODE_CLOCK_HIGH;
rounded_rate = clk_round_rate(hdmi->tmds_clk, clock);
--
2.54.0
next prev parent reply other threads:[~2026-05-19 14:49 UTC|newest]
Thread overview: 3+ 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:47 ` Javier Martinez Canillas [this message]
2026-05-19 14:57 ` [PATCH 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Chen-Yu Tsai
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-7-javierm@redhat.com \
--to=javierm@redhat$(echo .)com \
--cc=airlied@gmail$(echo .)com \
--cc=dri-devel@lists$(echo .)freedesktop.org \
--cc=jernej.skrabec@gmail$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-sunxi@lists$(echo .)linux.dev \
--cc=maarten.lankhorst@linux$(echo .)intel.com \
--cc=mripard@kernel$(echo .)org \
--cc=samuel@sholland$(echo .)org \
--cc=simona@ffwll$(echo .)ch \
--cc=tzimmermann@suse$(echo .)de \
--cc=wens@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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