From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 894C0CD6E4A for ; Thu, 4 Jun 2026 15:52:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF7F011A13E; Thu, 4 Jun 2026 15:52:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="lCfUohjy"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by gabe.freedesktop.org (Postfix) with ESMTPS id A872E11A13E for ; Thu, 4 Jun 2026 15:52:54 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1780588365; cv=none; d=zohomail.com; s=zohoarc; b=BuRrYBKFcMZexX7rPT2EQAD/92OQCJjnN74KRxLrM7ZAalRhGXkXouf1E6Ttwd0y0zURAeTebNhFthI+yQj3ziZOmfSXWZSNnYsjk1sccGNgYj/AEBLK/O+xm7stqLxi+Cz1nXsFYOH55ADoVfCd4I5RHwRHoVxvuhQw9dCxtH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1780588365; 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=Feg47ipETHWVkC3hW4GYR5vYBZ25MILyZs1Ou6jz0NM=; b=CBkuqypppXMLA0O2rjR+2OQ6r5o0kLs2Lpk5JPsxdaPAjYrlu7mIN2rjwodhOo12dX3XtunmO6/QZe/Nmmmqn5Qt801OYd7UIlEfTYELl+FkaMt/28I6BeFOCbYc1QGdbmEkIcF5KbBJhAAJm+bKR6bt97srk+H5a5mpxtsiIN0= 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= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1780588365; 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=Feg47ipETHWVkC3hW4GYR5vYBZ25MILyZs1Ou6jz0NM=; b=lCfUohjyYAAJw99tLFv0uLJxme+090eVOkSYE5+k2ISrB4BqCpXynR/1wWdoxK6h uAgxNRpMKj/xOAY6t/NhkcsUy7yAvMdV/8zMuHPVD8Tz4icRwxnYCHeEcRQoErtbfO/ 9e2L7BNvZo8vjku/EcvUPjSwZYGY1gRchpVpbTu8= Received: by mx.zohomail.com with SMTPS id 1780588363553915.4914911274832; Thu, 4 Jun 2026 08:52:43 -0700 (PDT) From: Nicolas Frattaroli Subject: [PATCH v5 0/4] Add SCDC information to connector debugfs Date: Thu, 04 Jun 2026 17:52:05 +0200 Message-Id: <20260604-scdc-link-health-v5-0-11173b0ac3de@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAAAAAAAC/23Oy27DIBAF0F+xWJeWl4mdVf+j6mIM45rWjxSIl Sjyvxc7lhq1rNAVM2fujQT0DgM5FjficXbBTWMK5VNBTAfjB1JnUyaCCc0UlzQYa2jvxi/aIfS xo1Ut0xeXttaGpLWTx9ZdNvLt/Z7DuflEE1dnn/D4fU634n2MNBCQmmkYXDwW1g80utPL/pIV6 VyIk79uNWe+7eyNyv+NZk4ZrfAgOVYVQstezdT30EwentORDZzFL1IKlkFEQkrOoeWVsVo1OUQ +IjqDyBWpUYECQLA8h6hH5JBBVEK0EAiKAW/L+i+yLMsPIp5SncgBAAA= X-Change-ID: 20260413-scdc-link-health-89326013d96c To: Jani Nikula , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Daniel Stone , Hans Verkuil Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Nicolas Frattaroli , Daniel Stone X-Mailer: b4 0.15.2 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 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 To: Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: Simona Vetter To: Andrzej Hajda To: Neil Armstrong To: Robert Foss To: Laurent Pinchart To: Jonas Karlman To: Jernej Skrabec To: Luca Ceresoli To: Daniel Stone To: Hans Verkuil Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: kernel@collabora.com Signed-off-by: Nicolas Frattaroli --- Nicolas Frattaroli (4): drm/scdc-helper: Don't use ssize_t return type for scdc_read/write drm/scdc-helper: Add scdc_status debugfs entry drm/display: bridge_connector: init scdc debugfs for HDMI drm/scdc-helper: Implement parsing and printing HDMI 2.1 fields drivers/gpu/drm/display/drm_bridge_connector.c | 4 + drivers/gpu/drm/display/drm_scdc_helper.c | 285 ++++++++++++++++++++++++- include/drm/display/drm_scdc.h | 21 +- include/drm/display/drm_scdc_helper.h | 103 ++++++++- 4 files changed, 404 insertions(+), 9 deletions(-) --- base-commit: 9dd27c9ba89acc30350aa57fe047b9a2fd0a5ee7 change-id: 20260413-scdc-link-health-89326013d96c Best regards, -- Nicolas Frattaroli