[v2,0/8] hdmi: Add common TMDS character rate constants

Message ID 20260520144424.1633354-1-javierm@redhat.com (mailing list archive)
Headers
Series hdmi: Add common TMDS character rate constants |

Message

Javier Martinez Canillas May 20, 2026, 2:43 p.m. UTC
Several DRM drivers define their own local macros or use magic numbers for
the standard HDMI TMDS character rate limits. Maxime Ripard suggested that
instead these common rate constants could be included to a shared header.

This series introduces these constants to the <linux/hdmi.h> header and
replaces the local defined constants or magic numbers in drivers.

I split the changes as one patch per driver, so that these can be reviewed
individually and merged at their own pace.

This is a version 2 that addresses issues pointed out by Maxime Ripard and
Dmitry Baryshkov.

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

Javier Martinez Canillas (8):
  video/hdmi: Add common TMDS character rate constants
  drm/bridge: dw-hdmi: Use the common TMDS char rate constant
  drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
  drm/bridge: inno-hdmi: Use the common TMDS char rate constant
  drm/sti: hdmi: Use the common TMDS char rate constants
  drm/sun4i: hdmi: Use the common TMDS char rate constant
  drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY
  drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY

 drivers/gpu/drm/bridge/inno-hdmi.c           |  4 +---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-qp.c |  6 ++----
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c    | 10 ++++------
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8996.c     |  6 ++----
 drivers/gpu/drm/msm/hdmi/hdmi_phy_8998.c     |  6 ++----
 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c   |  6 ++++--
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c       |  4 ++--
 include/linux/hdmi.h                         |  6 ++++++
 8 files changed, 23 insertions(+), 25 deletions(-)
  

Comments

Maxime Ripard May 20, 2026, 4:28 p.m. UTC | #1
On Wed, 20 May 2026 16:43:36 +0200, Javier Martinez Canillas wrote:
> Several DRM drivers define their own local macros or use magic numbers for
> the standard HDMI TMDS character rate limits. Maxime Ripard suggested that
> instead these common rate constants could be included to a shared header.
> 
> This series introduces these constants to the <linux/hdmi.h> header and
> 
> [ ... ]

Reviewed-by: Maxime Ripard <mripard@kernel.org>

Thanks!
Maxime
  
Javier Martinez Canillas May 21, 2026, 9:59 a.m. UTC | #2
Javier Martinez Canillas <javierm@redhat.com> writes:

> Several DRM drivers define their own local macros or use magic numbers for
> the standard HDMI TMDS character rate limits. Maxime Ripard suggested that
> instead these common rate constants could be included to a shared header.
>
> This series introduces these constants to the <linux/hdmi.h> header and
> replaces the local defined constants or magic numbers in drivers.
>
> I split the changes as one patch per driver, so that these can be reviewed
> individually and merged at their own pace.
>
> This is a version 2 that addresses issues pointed out by Maxime Ripard and
> Dmitry Baryshkov.
>
> Changes in v2:
> - Change naming convention to HDMI_$SPEC_TMDS_CHAR_RATE_MAX_HZ (Maxime).
> - Define the constants in <linux/hdmi.h> (Dmitry).
>
> Javier Martinez Canillas (8):
>   video/hdmi: Add common TMDS character rate constants
>   drm/bridge: dw-hdmi: Use the common TMDS char rate constant
>   drm/bridge: dw-hdmi-qp: Use the common TMDS char rate constant
>   drm/bridge: inno-hdmi: Use the common TMDS char rate constant
>   drm/sti: hdmi: Use the common TMDS char rate constants
>   drm/sun4i: hdmi: Use the common TMDS char rate constant
>   drm/msm/hdmi: Use the common TMDS char rate constants in 8996 PHY
>   drm/msm/hdmi: Use the common TMDS char rate constants in 8998 PHY
>

Pushed to drm-misc (drm-misc-next). Thanks everyone for the feedback and review!