Re: [PATCH v8 06/39] drm/display: scdc-helper: Add helper to set SCDC version information
From: Dmitry Baryshkov
Date: Wed Jul 22 2026 - 02:56:16 EST
On Thu, Jul 02, 2026 at 05:46:19PM +0300, Cristian Ciocaltea wrote:
> The HDMI 2.x specs mandate that compliant Sink devices report their SCDC
> version in the Sink Version register, which reads as 1 on any
> SCDC-capable sink.
>
> There is also a dedicated Source Version register. Writing it is not
> compulsory, but the spec advises that compliant Source devices do so, in
> which case the value must be 1.
>
> Add drm_scdc_set_source_version() to follow this recommendation. The
> Sink Version register is read first, both to log the advertised SCDC
> version and to guard against non-conformant devices: a sink reporting
> version 0 is either not SCDC-version-aware or broken, so writing the
> source version gains nothing and risks upsetting such hardware. In that
> case the write is skipped.
>
> The source version is passed as a parameter rather than hardcoded, as
> future spec revisions may define additional rules for the allowable
> version values. The written value is additionally clamped to the sink's
> reported version so the source never advertises a version the sink does
> not understand.
>
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
> ---
> drivers/gpu/drm/display/drm_scdc_helper.c | 46 ++++++++++++++++++++++++++++++-
> include/drm/display/drm_scdc_helper.h | 2 ++
> 2 files changed, 47 insertions(+), 1 deletion(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
--
With best wishes
Dmitry