[PATCH v8 06/39] drm/display: scdc-helper: Add helper to set SCDC version information

Dmitry Baryshkov dmitry.baryshkov at oss.qualcomm.com
Tue Jul 21 23:53:30 PDT 2026


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 at collabora.com>
> ---
>  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 at oss.qualcomm.com>


-- 
With best wishes
Dmitry



More information about the Linux-rockchip mailing list