| Message ID | 20260724-scdc-link-health-v9-0-bdda406d016d@collabora.com (mailing list archive) |
|---|---|
| Headers |
Return-Path: <linux-sunxi+bounces-24753-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 35F541C0537 for <noreply@patchwork.local>; Fri, 24 Jul 2026 16:28:38 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=collabora.com; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-24753-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-24753-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 60E6F30E848B for <noreply@patchwork.local>; Fri, 24 Jul 2026 14:23:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 25333433BB9; Fri, 24 Jul 2026 14:23:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="cbh1ER+4" X-Original-To: linux-sunxi@lists.linux.dev Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F9F743A7F3 for <linux-sunxi@lists.linux.dev>; Fri, 24 Jul 2026 14:23:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784903031; cv=pass; b=OEmDDnxOyng8LXUHX6UFChYVfOgY61r4xsadp9asaimDWm+Iz0k9u/+P5guAh9kvmmRywb4IMWr2Mk5EENhxOhcInn5mSXOoJl5mM6XCwk3S0mfVR9GVkZbTLzVGxIkglJ6MybSwnbQ3okYGLx+CXQd7FqaP4FDjeCnL82QPc5w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784903031; c=relaxed/simple; bh=V5B6V5P8NWvqb03ecAFUYGocPgu3IE+J3Fyoctd8REk=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Ylq7AOOTaq8kAZ7trEOP+yM50nHfwvhlkE2g040A1Dk6/zMEX5eivl3fHD8YyqZOhyIy4B5XzR9VfCE6WCcCLTU/S0WUo7CzgEccSeYwY583hC7djx0jXEdHRJIiyAL1ikR5XWdfiO1D32iW3nhYg6cdIaOyvhaldchpgsYmiDc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b=cbh1ER+4; arc=pass smtp.client-ip=136.143.188.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com ARC-Seal: i=1; a=rsa-sha256; t=1784902982; cv=none; d=zohomail.com; s=zohoarc; b=fqa4JviSFgVcy5kAGqKC0Oc7KqRKE6HGsDk/hxJ/tSI8epWIc7JEMAEVP6SKbcgy8HVA7KmREJa654g64ihofb+nZd4KvQ51jX/jeT02OrprSprby9gZ90E4rsw+dlB/QuJoqCzjR94BfPA9jk0pw7CNg7V6scL/ZGOwx86Imwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1784902982; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=+lCIrbZ134YaEQrfKjVf4P2/qfFEoPUp7GkSeHrd7gM=; b=JJkzsFXHSN/RX+pE/2wgCFwthc8zGoRW0WP44VuGHw8LkhMrXSzo8cY5vsz86hG9vmmNZTF2Sx4PFphpAXD7GNHYLiTwi7IXNJYz1KIFMTD5v1VWMB5ZOdwObyJ0aoTpzohvt4Fk3L04MS6epC3V62RP7s1SWAF3bUad1xsErUk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from=<nicolas.frattaroli@collabora.com> DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1784902982; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:Subject:Subject:Date:Date:Message-Id:Message-Id:MIME-Version:Content-Type:Content-Transfer-Encoding:To:To:Cc:Cc:Reply-To; bh=+lCIrbZ134YaEQrfKjVf4P2/qfFEoPUp7GkSeHrd7gM=; b=cbh1ER+4qwbRbHxBS1ItDhuI0OmuCake7a6SdJvwko4zZkK/K77xXXN6KCrp/yJ1 MfnIdi6ImOb555SDkc2JrR9SLLVHC/vwrhGsj6I1Ic0GbbBCbBCJhw1XI6HjaBELcZx MuB7EDls9R+txvimPyQb3W4qja3c1b8qPGFoQUNY= Received: by mx.zohomail.com with SMTPS id 178490298106412.815001569155925; Fri, 24 Jul 2026 07:23:01 -0700 (PDT) From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Subject: [PATCH v9 0/5] Add SCDC information to connector debugfs Date: Fri, 24 Jul 2026 16:22:35 +0200 Message-Id: <20260724-scdc-link-health-v9-0-bdda406d016d@collabora.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 X-B4-Tracking: v=1; b=H4sIAAAAAAAC/23QzU7DMAwH8FeZciYQJ81Hd+I9EAcncWmgW0fbV aBp707aTVolcoqs2D//5QsbaUg0sv3uwgaa05j6Yy7qpx0LLR4/iKeYayaFNKICxccQA+/S8Yu 3hN3Ucler/AUq1iawPHYaqEk/K/n2fqvHs/+kMC3OvWOg73PeNd3amMeReOgPhzTtd3E48CmdX u4vW5A2jVM//K4xZ1hn7on0/0QzcMEdWQXkHGEjXkPfdej7AZ/zkhWc5QPRUhQQmRENgA24EE3 lS4jaIqaAqAWpqcIKkTBCCam2iC0gVUaMlISVQGh0XUL0A8lXKSA6IwBglRcYVKQSYjYIQAExS xIlrLMajddFxD4QK0uIzUgtYwPeYNRNKCFui8gC4jISIkQM3jsd/93ker3+AZ3bIjLcAgAA X-Change-ID: 20260413-scdc-link-health-89326013d96c To: Jani Nikula <jani.nikula@linux.intel.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Luca Ceresoli <luca.ceresoli@bootlin.com>, Daniel Stone <daniel@fooishbar.org>, Hans Verkuil <hverkuil+cisco@kernel.org>, Chen-Yu Tsai <wens@kernel.org>, Samuel Holland <samuel@sholland.org>, Dave Stevenson <dave.stevenson@raspberrypi.com>, =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com>, Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com> Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Nicolas Frattaroli <nicolas.frattaroli@collabora.com>, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> X-Mailer: b4 0.15.2 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-2.16 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=2]; PRECEDENCE_BULK(0.00)[]; TAGGED_RCPT(0.00)[cisco]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; FROM_HAS_DN(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCPT_COUNT_TWELVE(0.00)[27]; FORGED_SENDER_MAILLIST(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; FROM_NEQ_ENVFROM(0.00)[nicolas.frattaroli@collabora.com,linux-sunxi@lists.linux.dev]; DMARC_POLICY_ALLOW(0.00)[collabora.com,none]; FREEMAIL_TO(0.00)[linux.intel.com,kernel.org,suse.de,gmail.com,ffwll.ch,intel.com,linaro.org,ideasonboard.com,kwiboo.se,bootlin.com,fooishbar.org,sholland.org,raspberrypi.com,igalia.com]; DKIM_TRACE(0.00)[collabora.com:+]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; R_DKIM_ALLOW(0.00)[collabora.com:s=zohomail]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; MIME_TRACE(0.00)[0:+]; TAGGED_FROM(0.00)[bounces-24753-noreply=patchwork.local]; MID_RHS_MATCH_FROM(0.00)[]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 35F541C0537 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= |
| Series |
Add SCDC information to connector debugfs
|
|
Message
Nicolas Frattaroli
July 24, 2026, 2:22 p.m. UTC
HDMI uses the DDC I2C bus for communicating various bits of link status
out of band with the actual HDMI video signal. This information can be
useful for debugging issues like questionable cables sabotaged by feline
teeth, Enthusiast Grade cables made of cow fencing wire, and other such
problems that ruin one's media viewing plans.
Consequently, this series exposes various bits of pertinent information
from the SCDC protocol in an HDMI connector's debugfs. To continually
poll the link status, userspace can poll the debugfs file.
---
Changes in v9:
- Unlock mode_config.mutex on disconnected connector early exit
- Calculate and print Reed-Solomon error corrections counter on != 4
lane FRL as well. Technically a functional change to an already
reviewed patch, but I kept the R-b because it's so minor.
- Link to v8: https://patch.msgid.link/20260722-scdc-link-health-v8-0-cd1dacbb85d9@collabora.com
Changes in v8:
- Acquire mode_config mutex in an interruptible way during
scdc_status_show to avoid racing connector state
- Remove scdc_debugfs_priv, use connector as debugfs entry priv instead
- Allocate and free state in scdc_status_show, since it doesn't need to
persist across debugfs reads
- Check for NULL ddc in drm_scdc_read_state in the unlikely event an
EDID with the SCDC flag was forced on a connector with no DDC
- Note: drm_connector_get() is omitted from drm_scdc_debugfs_init
because drm_scdc_debugfs_init is called on connector construction and
the debugfs is removed on connector destruction. Adding a redundant
reference increase here would necessitate introducing a destruction
callback to mirror the debugfs_init connector op for the sole purpose
of decreasing the counter again.
- Link to v7: https://patch.msgid.link/20260721-scdc-link-health-v7-0-92df1b6ad5fc@collabora.com
Changes in v7:
- Move HDMI debugfs registration to new state helper, fix up all users
(sun4i, vc4, bridge)
- Register scdc debugfs in new hdmi debugfs helper
- Link to v6: https://patch.msgid.link/20260611-scdc-link-health-v6-0-6307875a6b5e@collabora.com
Changes in v6:
- Fix off-by-one error in drm_scdc_read_state
- Link to v5: https://patch.msgid.link/20260604-scdc-link-health-v5-0-11173b0ac3de@collabora.com
Changes in v5:
- Read all SCDC data regardless of update flags
- Dump SCDC data as hex before the human-readable output. It's separated
with "\n----------------\n\n".
- No longer write 0 to read-only registers
- Add Reed-Solomon Corrections counter parsing
- Parsing has been kept. A desire was expressed to get this data without
any external userspace tooling, and the kernel will need to parse it
eventually anyway to set the link status.
- Functions have been made static as of right now, since external users
may do another pass over the function signatures anyway.
- Link to v4: https://patch.msgid.link/20260527-scdc-link-health-v4-0-622ea40a1f59@collabora.com
Changes in v4:
- Don't use C struct bitfields for parsing status flags. Switch to
bitwise AND for boolean flags, and FIELD_GET for multi-bit values.
- Drop the superfluous !! and parens
- Drop the __pure attributes on static functions
- Initialise stack local arrays with {}, not { 0 }.
- I've kept the print macros and %-30s format. Reason being that I don't
want to repeat the format specifier and str_yes_no(foo) a bunch, and I
like the %-30s format because it means all values are aligned with the
value of the longest field, which is 30 chars long.
- Link to v3: https://patch.msgid.link/20260526-scdc-link-health-v3-0-59e4a4aaead1@collabora.com
Changes in v3:
- Add patch to change return type of drm_scdc_read/write.
- Rework error counter reading to duplicate less code.
- Also check lane 3 counter valid flag when reading its error counter.
- Use memset to clear buf for error counters, rather than doing it in
the loop.
- Make read_error_counters not accept 0 as num_lanes; fix it up in the
caller instead.
- Link to v2: https://patch.msgid.link/20260520-scdc-link-health-v2-0-511af18cd64b@collabora.com
Changes in v2:
- Add HDMI 2.1 SCDC status reporting
- Link to v1: https://patch.msgid.link/20260415-scdc-link-health-v1-0-8e731e88eaf0@collabora.com
To: Jani Nikula <jani.nikula@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Maxime Ripard <mripard@kernel.org>
To: Thomas Zimmermann <tzimmermann@suse.de>
To: David Airlie <airlied@gmail.com>
To: Simona Vetter <simona@ffwll.ch>
To: Andrzej Hajda <andrzej.hajda@intel.com>
To: Neil Armstrong <neil.armstrong@linaro.org>
To: Robert Foss <rfoss@kernel.org>
To: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
To: Jonas Karlman <jonas@kwiboo.se>
To: Jernej Skrabec <jernej.skrabec@gmail.com>
To: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Daniel Stone <daniel@fooishbar.org>
To: Hans Verkuil <hverkuil+cisco@kernel.org>
To: Chen-Yu Tsai <wens@kernel.org>
To: Samuel Holland <samuel@sholland.org>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: Maíra Canal <mcanal@igalia.com>
To: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Cc: kernel@collabora.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-sunxi@lists.linux.dev
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
Nicolas Frattaroli (5):
drm/scdc-helper: Don't use ssize_t return type for scdc_read/write
drm/scdc-helper: Add scdc_status debugfs entry
drm/scdc-helper: Implement parsing and printing HDMI 2.1 fields
drm/debugfs: Move HDMI debugfs registration to state helper
drm/display: hdmi-state-helper: Init SCDC debugfs for HDMI
drivers/gpu/drm/display/drm_bridge_connector.c | 3 +
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 156 +++++++++++++
drivers/gpu/drm/display/drm_scdc_helper.c | 289 +++++++++++++++++++++++-
drivers/gpu/drm/drm_debugfs.c | 157 -------------
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 +
drivers/gpu/drm/vc4/vc4_hdmi.c | 1 +
include/drm/display/drm_hdmi_state_helper.h | 3 +
include/drm/display/drm_scdc.h | 21 +-
include/drm/display/drm_scdc_helper.h | 103 ++++++++-
9 files changed, 568 insertions(+), 166 deletions(-)
---
base-commit: b747a63003130bef1a3d5d6ba97c94d0cee36f55
change-id: 20260413-scdc-link-health-89326013d96c
Best regards,
--
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Comments
On Fri, 24 Jul 2026, Nicolas Frattaroli <nicolas.frattaroli@collabora.com> wrote: > HDMI uses the DDC I2C bus for communicating various bits of link status > out of band with the actual HDMI video signal. This information can be > useful for debugging issues like questionable cables sabotaged by feline > teeth, Enthusiast Grade cables made of cow fencing wire, and other such > problems that ruin one's media viewing plans. > > Consequently, this series exposes various bits of pertinent information > from the SCDC protocol in an HDMI connector's debugfs. To continually > poll the link status, userspace can poll the debugfs file. Is there a reason we can't add a character device node for this similar to DP AUX? See config DRM_DISPLAY_DP_AUX_CHARDEV. It's ultimately more generic than deciphering everything in kernel. BR, Jani. > > --- > Changes in v9: > - Unlock mode_config.mutex on disconnected connector early exit > - Calculate and print Reed-Solomon error corrections counter on != 4 > lane FRL as well. Technically a functional change to an already > reviewed patch, but I kept the R-b because it's so minor. > - Link to v8: https://patch.msgid.link/20260722-scdc-link-health-v8-0-cd1dacbb85d9@collabora.com > > Changes in v8: > - Acquire mode_config mutex in an interruptible way during > scdc_status_show to avoid racing connector state > - Remove scdc_debugfs_priv, use connector as debugfs entry priv instead > - Allocate and free state in scdc_status_show, since it doesn't need to > persist across debugfs reads > - Check for NULL ddc in drm_scdc_read_state in the unlikely event an > EDID with the SCDC flag was forced on a connector with no DDC > - Note: drm_connector_get() is omitted from drm_scdc_debugfs_init > because drm_scdc_debugfs_init is called on connector construction and > the debugfs is removed on connector destruction. Adding a redundant > reference increase here would necessitate introducing a destruction > callback to mirror the debugfs_init connector op for the sole purpose > of decreasing the counter again. > - Link to v7: https://patch.msgid.link/20260721-scdc-link-health-v7-0-92df1b6ad5fc@collabora.com > > Changes in v7: > - Move HDMI debugfs registration to new state helper, fix up all users > (sun4i, vc4, bridge) > - Register scdc debugfs in new hdmi debugfs helper > - Link to v6: https://patch.msgid.link/20260611-scdc-link-health-v6-0-6307875a6b5e@collabora.com > > Changes in v6: > - Fix off-by-one error in drm_scdc_read_state > - Link to v5: https://patch.msgid.link/20260604-scdc-link-health-v5-0-11173b0ac3de@collabora.com > > Changes in v5: > - Read all SCDC data regardless of update flags > - Dump SCDC data as hex before the human-readable output. It's separated > with "\n----------------\n\n". > - No longer write 0 to read-only registers > - Add Reed-Solomon Corrections counter parsing > - Parsing has been kept. A desire was expressed to get this data without > any external userspace tooling, and the kernel will need to parse it > eventually anyway to set the link status. > - Functions have been made static as of right now, since external users > may do another pass over the function signatures anyway. > - Link to v4: https://patch.msgid.link/20260527-scdc-link-health-v4-0-622ea40a1f59@collabora.com > > Changes in v4: > - Don't use C struct bitfields for parsing status flags. Switch to > bitwise AND for boolean flags, and FIELD_GET for multi-bit values. > - Drop the superfluous !! and parens > - Drop the __pure attributes on static functions > - Initialise stack local arrays with {}, not { 0 }. > - I've kept the print macros and %-30s format. Reason being that I don't > want to repeat the format specifier and str_yes_no(foo) a bunch, and I > like the %-30s format because it means all values are aligned with the > value of the longest field, which is 30 chars long. > - Link to v3: https://patch.msgid.link/20260526-scdc-link-health-v3-0-59e4a4aaead1@collabora.com > > Changes in v3: > - Add patch to change return type of drm_scdc_read/write. > - Rework error counter reading to duplicate less code. > - Also check lane 3 counter valid flag when reading its error counter. > - Use memset to clear buf for error counters, rather than doing it in > the loop. > - Make read_error_counters not accept 0 as num_lanes; fix it up in the > caller instead. > - Link to v2: https://patch.msgid.link/20260520-scdc-link-health-v2-0-511af18cd64b@collabora.com > > Changes in v2: > - Add HDMI 2.1 SCDC status reporting > - Link to v1: https://patch.msgid.link/20260415-scdc-link-health-v1-0-8e731e88eaf0@collabora.com > > To: Jani Nikula <jani.nikula@linux.intel.com> > To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > To: Maxime Ripard <mripard@kernel.org> > To: Thomas Zimmermann <tzimmermann@suse.de> > To: David Airlie <airlied@gmail.com> > To: Simona Vetter <simona@ffwll.ch> > To: Andrzej Hajda <andrzej.hajda@intel.com> > To: Neil Armstrong <neil.armstrong@linaro.org> > To: Robert Foss <rfoss@kernel.org> > To: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > To: Jonas Karlman <jonas@kwiboo.se> > To: Jernej Skrabec <jernej.skrabec@gmail.com> > To: Luca Ceresoli <luca.ceresoli@bootlin.com> > To: Daniel Stone <daniel@fooishbar.org> > To: Hans Verkuil <hverkuil+cisco@kernel.org> > To: Chen-Yu Tsai <wens@kernel.org> > To: Samuel Holland <samuel@sholland.org> > To: Dave Stevenson <dave.stevenson@raspberrypi.com> > To: Maíra Canal <mcanal@igalia.com> > To: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com> > Cc: dri-devel@lists.freedesktop.org > Cc: linux-kernel@vger.kernel.org > Cc: kernel@collabora.com > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-sunxi@lists.linux.dev > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> > > --- > Nicolas Frattaroli (5): > drm/scdc-helper: Don't use ssize_t return type for scdc_read/write > drm/scdc-helper: Add scdc_status debugfs entry > drm/scdc-helper: Implement parsing and printing HDMI 2.1 fields > drm/debugfs: Move HDMI debugfs registration to state helper > drm/display: hdmi-state-helper: Init SCDC debugfs for HDMI > > drivers/gpu/drm/display/drm_bridge_connector.c | 3 + > drivers/gpu/drm/display/drm_hdmi_state_helper.c | 156 +++++++++++++ > drivers/gpu/drm/display/drm_scdc_helper.c | 289 +++++++++++++++++++++++- > drivers/gpu/drm/drm_debugfs.c | 157 ------------- > drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 + > drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + > include/drm/display/drm_hdmi_state_helper.h | 3 + > include/drm/display/drm_scdc.h | 21 +- > include/drm/display/drm_scdc_helper.h | 103 ++++++++- > 9 files changed, 568 insertions(+), 166 deletions(-) > --- > base-commit: b747a63003130bef1a3d5d6ba97c94d0cee36f55 > change-id: 20260413-scdc-link-health-89326013d96c > > Best regards, > -- > Nicolas Frattaroli <nicolas.frattaroli@collabora.com> >
On Monday, 27 July 2026 10:35:15 Central European Summer Time Jani Nikula wrote: > On Fri, 24 Jul 2026, Nicolas Frattaroli <nicolas.frattaroli@collabora.com> wrote: > > HDMI uses the DDC I2C bus for communicating various bits of link status > > out of band with the actual HDMI video signal. This information can be > > useful for debugging issues like questionable cables sabotaged by feline > > teeth, Enthusiast Grade cables made of cow fencing wire, and other such > > problems that ruin one's media viewing plans. > > > > Consequently, this series exposes various bits of pertinent information > > from the SCDC protocol in an HDMI connector's debugfs. To continually > > poll the link status, userspace can poll the debugfs file. > > Is there a reason we can't add a character device node for this similar > to DP AUX? See config DRM_DISPLAY_DP_AUX_CHARDEV. You already can just point tools at the ddc symlink to the i2c dev. The idea here is to be able to read this out of debugfs without any additional external tooling needed. > It's ultimately more generic than deciphering everything in kernel. The kernel will need to decipher this in the future anyway for HDMI 2.x support, including so that it can set link status to bad when there's a glut of errors. > > > BR, > Jani. > > > > > > > > > --- > > Changes in v9: > > - Unlock mode_config.mutex on disconnected connector early exit > > - Calculate and print Reed-Solomon error corrections counter on != 4 > > lane FRL as well. Technically a functional change to an already > > reviewed patch, but I kept the R-b because it's so minor. > > - Link to v8: https://patch.msgid.link/20260722-scdc-link-health-v8-0-cd1dacbb85d9@collabora.com > > > > Changes in v8: > > - Acquire mode_config mutex in an interruptible way during > > scdc_status_show to avoid racing connector state > > - Remove scdc_debugfs_priv, use connector as debugfs entry priv instead > > - Allocate and free state in scdc_status_show, since it doesn't need to > > persist across debugfs reads > > - Check for NULL ddc in drm_scdc_read_state in the unlikely event an > > EDID with the SCDC flag was forced on a connector with no DDC > > - Note: drm_connector_get() is omitted from drm_scdc_debugfs_init > > because drm_scdc_debugfs_init is called on connector construction and > > the debugfs is removed on connector destruction. Adding a redundant > > reference increase here would necessitate introducing a destruction > > callback to mirror the debugfs_init connector op for the sole purpose > > of decreasing the counter again. > > - Link to v7: https://patch.msgid.link/20260721-scdc-link-health-v7-0-92df1b6ad5fc@collabora.com > > > > Changes in v7: > > - Move HDMI debugfs registration to new state helper, fix up all users > > (sun4i, vc4, bridge) > > - Register scdc debugfs in new hdmi debugfs helper > > - Link to v6: https://patch.msgid.link/20260611-scdc-link-health-v6-0-6307875a6b5e@collabora.com > > > > Changes in v6: > > - Fix off-by-one error in drm_scdc_read_state > > - Link to v5: https://patch.msgid.link/20260604-scdc-link-health-v5-0-11173b0ac3de@collabora.com > > > > Changes in v5: > > - Read all SCDC data regardless of update flags > > - Dump SCDC data as hex before the human-readable output. It's separated > > with "\n----------------\n\n". > > - No longer write 0 to read-only registers > > - Add Reed-Solomon Corrections counter parsing > > - Parsing has been kept. A desire was expressed to get this data without > > any external userspace tooling, and the kernel will need to parse it > > eventually anyway to set the link status. > > - Functions have been made static as of right now, since external users > > may do another pass over the function signatures anyway. > > - Link to v4: https://patch.msgid.link/20260527-scdc-link-health-v4-0-622ea40a1f59@collabora.com > > > > Changes in v4: > > - Don't use C struct bitfields for parsing status flags. Switch to > > bitwise AND for boolean flags, and FIELD_GET for multi-bit values. > > - Drop the superfluous !! and parens > > - Drop the __pure attributes on static functions > > - Initialise stack local arrays with {}, not { 0 }. > > - I've kept the print macros and %-30s format. Reason being that I don't > > want to repeat the format specifier and str_yes_no(foo) a bunch, and I > > like the %-30s format because it means all values are aligned with the > > value of the longest field, which is 30 chars long. > > - Link to v3: https://patch.msgid.link/20260526-scdc-link-health-v3-0-59e4a4aaead1@collabora.com > > > > Changes in v3: > > - Add patch to change return type of drm_scdc_read/write. > > - Rework error counter reading to duplicate less code. > > - Also check lane 3 counter valid flag when reading its error counter. > > - Use memset to clear buf for error counters, rather than doing it in > > the loop. > > - Make read_error_counters not accept 0 as num_lanes; fix it up in the > > caller instead. > > - Link to v2: https://patch.msgid.link/20260520-scdc-link-health-v2-0-511af18cd64b@collabora.com > > > > Changes in v2: > > - Add HDMI 2.1 SCDC status reporting > > - Link to v1: https://patch.msgid.link/20260415-scdc-link-health-v1-0-8e731e88eaf0@collabora.com > > > > To: Jani Nikula <jani.nikula@linux.intel.com> > > To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > To: Maxime Ripard <mripard@kernel.org> > > To: Thomas Zimmermann <tzimmermann@suse.de> > > To: David Airlie <airlied@gmail.com> > > To: Simona Vetter <simona@ffwll.ch> > > To: Andrzej Hajda <andrzej.hajda@intel.com> > > To: Neil Armstrong <neil.armstrong@linaro.org> > > To: Robert Foss <rfoss@kernel.org> > > To: Laurent Pinchart <Laurent.pinchart@ideasonboard.com> > > To: Jonas Karlman <jonas@kwiboo.se> > > To: Jernej Skrabec <jernej.skrabec@gmail.com> > > To: Luca Ceresoli <luca.ceresoli@bootlin.com> > > To: Daniel Stone <daniel@fooishbar.org> > > To: Hans Verkuil <hverkuil+cisco@kernel.org> > > To: Chen-Yu Tsai <wens@kernel.org> > > To: Samuel Holland <samuel@sholland.org> > > To: Dave Stevenson <dave.stevenson@raspberrypi.com> > > To: Maíra Canal <mcanal@igalia.com> > > To: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com> > > Cc: dri-devel@lists.freedesktop.org > > Cc: linux-kernel@vger.kernel.org > > Cc: kernel@collabora.com > > Cc: linux-arm-kernel@lists.infradead.org > > Cc: linux-sunxi@lists.linux.dev > > Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> > > > > --- > > Nicolas Frattaroli (5): > > drm/scdc-helper: Don't use ssize_t return type for scdc_read/write > > drm/scdc-helper: Add scdc_status debugfs entry > > drm/scdc-helper: Implement parsing and printing HDMI 2.1 fields > > drm/debugfs: Move HDMI debugfs registration to state helper > > drm/display: hdmi-state-helper: Init SCDC debugfs for HDMI > > > > drivers/gpu/drm/display/drm_bridge_connector.c | 3 + > > drivers/gpu/drm/display/drm_hdmi_state_helper.c | 156 +++++++++++++ > > drivers/gpu/drm/display/drm_scdc_helper.c | 289 +++++++++++++++++++++++- > > drivers/gpu/drm/drm_debugfs.c | 157 ------------- > > drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 1 + > > drivers/gpu/drm/vc4/vc4_hdmi.c | 1 + > > include/drm/display/drm_hdmi_state_helper.h | 3 + > > include/drm/display/drm_scdc.h | 21 +- > > include/drm/display/drm_scdc_helper.h | 103 ++++++++- > > 9 files changed, 568 insertions(+), 166 deletions(-) > > --- > > base-commit: b747a63003130bef1a3d5d6ba97c94d0cee36f55 > > change-id: 20260413-scdc-link-health-89326013d96c > > > > Best regards, > > -- > > Nicolas Frattaroli <nicolas.frattaroli@collabora.com> > > > >