From: Jani Nikula <jani.nikula@intel.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
linux-kernel@vger.kernel.org
Cc: Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>,
Simona Vetter <simona@ffwll.ch>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/8] drm/display: hdmi: Add common TMDS character rate constants
Date: Wed, 20 May 2026 10:51:37 +0300 [thread overview]
Message-ID: <b67b6e84021fd6d629e43132ccecae152af9bfaf@intel.com> (raw)
In-Reply-To: <875x4iy1em.fsf@ocarina.mail-host-address-is-not-set>
On Wed, 20 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
> Jani Nikula <jani.nikula@intel.com> writes:
>
> Hello Jani,
>
>> On Tue, 19 May 2026, Javier Martinez Canillas <javierm@redhat.com> wrote:
>
> [...]
>
>>>
>>> +/* 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
>>
>> Usually everything in DRM is in kHz, and Hz is the exception.
>>
>
> That is correct but in this case these constants are to be used with the
> HDMI helpers. Both struct drm_connector_hdmi_state.tmds_char_rate and
> the struct drm_bridge_funcs.hdmi_tmds_char_rate_valid() callback expect
> the TMDS char rate to be defined in Hz.
I guess I'm surprised those things were defined in terms of Hz then.
> If we define these in kHz, it means that drivers will have to * 1000 at
> every call site.
Yeah, not ideal.
>> I'm also not sure the 1_0, 1_3, and 2_0 really help anyone reading the
>> code. I won't remember what they mean in Hz or kHz, and I'll have to
>> look them up every single time.
>>
>
> I discussed this with Maxime before posting the patches since I wondered
> the same. He suggested that the max TMDS character rate was linked to the
> HDMI spec versions and that it would be more readable to name it using
> the spec version rather than the resolution.
Frankly I've never thought of the limits in terms of the spec versions,
but maybe it's just me. *shrug*
BR,
Jani.
>
> The other naming I suggested was:
>
> /* HDMI spec TMDS character rate limits (in Hz) */
> #define DRM_HDMI_TMDS_CHAR_RATE_MIN 25000000
> #define DRM_HDMI_TMDS_CHAR_RATE_74_25MHZ 74250000
> #define DRM_HDMI_TMDS_CHAR_RATE_148_5MHZ 148500000
> #define DRM_HDMI_TMDS_CHAR_RATE_297MHZ 297000000
> #define DRM_HDMI_TMDS_CHAR_RATE_MAX_1_4 340000000
>
>> BR,
>> Jani.
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2026-05-20 7:51 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 [this message]
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 ` [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=b67b6e84021fd6d629e43132ccecae152af9bfaf@intel.com \
--to=jani.nikula@intel.com \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=nicolas.frattaroli@collabora.com \
--cc=simona@ffwll.ch \
/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