mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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>,
	Heiko Stuebner <heiko@sntech.de>
Subject: [PATCH v2 1/8] video/hdmi: Add common TMDS character rate constants
Date: Wed, 20 May 2026 16:43:37 +0200	[thread overview]
Message-ID: <20260520144424.1633354-2-javierm@redhat.com> (raw)
In-Reply-To: <20260520144424.1633354-1-javierm@redhat.com>

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 <linux/hdmi.h> header correspond to maximum TMDS
character rates defined by each HDMI specification version:

  - HDMI_TMDS_CHAR_RATE_MIN_HZ:     25 MHz (minimum for all versions)
  - HDMI_1_0_TMDS_CHAR_RATE_MAX_HZ: 165 MHz (HDMI 1.0 maximum)
  - HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ: 340 MHz (HDMI 1.3 maximum)
  - HDMI_2_0_TMDS_CHAR_RATE_MAX_HZ: 600 MHz (HDMI 2.0 maximum)

Suggested-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
---

Changes in v2:
- Change naming convention to HDMI_$SPEC_TMDS_CHAR_RATE_MAX_HZ (Maxime).
- Define the constants in <linux/hdmi.h> (Dmitry).

 include/linux/hdmi.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 96bda41d9148..8dab78e1f61b 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -50,6 +50,12 @@ enum hdmi_infoframe_type {
 	HDMI_INFOFRAME_TYPE_DRM = 0x87,
 };
 
+/* HDMI spec maximum TMDS character rates, in Hz */
+#define HDMI_TMDS_CHAR_RATE_MIN_HZ         25000000
+#define HDMI_1_0_TMDS_CHAR_RATE_MAX_HZ    165000000
+#define HDMI_1_3_TMDS_CHAR_RATE_MAX_HZ    340000000
+#define HDMI_2_0_TMDS_CHAR_RATE_MAX_HZ    600000000
+
 #define HDMI_IEEE_OUI 0x000c03
 #define HDMI_FORUM_IEEE_OUI 0xc45dd8
 #define HDMI_INFOFRAME_HEADER_SIZE  4
-- 
2.54.0


  reply	other threads:[~2026-05-20 14:44 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20 14:43 [PATCH v2 0/8] hdmi: " Javier Martinez Canillas
2026-05-20 14:43 ` Javier Martinez Canillas [this message]
2026-05-20 14:55   ` [PATCH v2 1/8] video/hdmi: " Dmitry Baryshkov
2026-05-20 15:01   ` Javier Martinez Canillas
2026-05-20 15:22   ` Neil Armstrong
2026-05-20 14:43 ` [PATCH v2 2/8] drm/bridge: dw-hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-20 14:43 ` [PATCH v2 3/8] drm/bridge: dw-hdmi-qp: " Javier Martinez Canillas
2026-05-21  8:53   ` Heiko Stuebner
2026-05-20 14:43 ` [PATCH v2 4/8] drm/bridge: inno-hdmi: " Javier Martinez Canillas
2026-05-20 14:43 ` [PATCH v2 5/8] drm/sti: hdmi: Use the common TMDS char rate constants Javier Martinez Canillas
2026-05-20 14:43 ` [PATCH v2 6/8] drm/sun4i: hdmi: Use the common TMDS char rate constant Javier Martinez Canillas
2026-05-20 14:43 ` [PATCH v2 7/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY Javier Martinez Canillas
2026-05-20 14:43 ` [PATCH v2 8/8] drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY Javier Martinez Canillas
2026-05-20 16:28 ` [PATCH v2 0/8] hdmi: Add common TMDS character rate constants Maxime Ripard
2026-05-21  9:59 ` Javier Martinez Canillas

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=20260520144424.1633354-2-javierm@redhat.com \
    --to=javierm@redhat.com \
    --cc=heiko@sntech.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mripard@kernel.org \
    /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

Powered by JetHome