Re: [PATCH v8 06/39] drm/display: scdc-helper: Add helper to set SCDC version information
Dmitry Baryshkov <[email protected]>
| Newsgroups | org.infradead.lists.linux-rockchip,org.freedesktop.lists.dri-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <4aznbqeel6jld6qaulbpj2jeelqyppftxnpgmxlqyg5byb5bli@6qd2lxjzhj4z> |
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 <[email protected]> > --- > 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 <[email protected]> -- With best wishes Dmitry _______________________________________________ Linux-rockchip mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-rockchip