From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 476A730ACE6 for ; Sat, 13 Jun 2026 06:57:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781333856; cv=none; b=fjxC5/J621Ywd3Bat+u8we9o2mSQixXuwM64kCesE/uTJj9ZWEdjM27AXeE5t9Xg/tViBKsW3Cevjvw2PXzUWMBKiNxs6b9qQqdQC1vcujy3ly6Zr1h346Xu4TTZEnV0LCskIs9SICIIrKqFgsRr7X6LoPq2DY7Z+yj1HJKKamI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781333856; c=relaxed/simple; bh=5smTRzeFXkUvNHsDqOIR7orww0mNgxWDbEPI9pBKgsc=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=mjc3WMtUQkMU6zoGAPoBo6X6sbB+4hcYERQKWBIFloTye4Toq+ks3c6SYF6gjdZJURh2eoe2qJIskU/prxWbHI2KbtVaczp4UdX7vnn4W4ngLDYbVK+N3e1WU4ybUIckTn5M1Xo0GrKA+zbVPxQCNVWMz08129hPjVIr1hX0a8E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WIt6qvl0; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WIt6qvl0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D62021F000E9; Sat, 13 Jun 2026 06:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1781333854; bh=HXMcWqVL4rhJfUtDNL48hP6X+JRWPZSdVUk8u3ls2X8=; h=Date:From:Subject:To:Cc:References:In-Reply-To; b=WIt6qvl05fIvYc3Qdl5NzbES/rxVeJrSgg4T2FN+o2m93f8SfFl6ZcPZlBcqUfQR1 LCxXdyaSR2Mk5+QQ/GkgYzQJ2CpVgM6JBHOyyPYR06YQ963Sp9+BQbV1znj42uTrLf HKb3V3kvpdWHIwXnIG7mvsFmxs2XCzz8qeW/wWjZ598rvxI4YiYd3DaM7kScMG+hgh Qrc2/QEio8TYkbw+t1EaYnzQq+D+57kU1wuBwieY12QtQ8vLdPqn1U5hJjNUhGwN9p lnrWQJfKfAsifvfxW8jtJetAi6ZBrVzxim5vGrXGXi2Xr/NZc69VlhhShnKCRf9g7K CBwNYySCGv+xA== Message-ID: Date: Sat, 13 Jun 2026 08:57:29 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Hans Verkuil Subject: Re: [PATCH v6 0/4] Add SCDC information to connector debugfs To: Nicolas Frattaroli , 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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Daniel Stone References: <20260611-scdc-link-health-v6-0-6307875a6b5e@collabora.com> Content-Language: en-US, nl In-Reply-To: <20260611-scdc-link-health-v6-0-6307875a6b5e@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Nicolas, On 11/06/2026 14:57, Nicolas Frattaroli 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. Something is not quite right: I've been testing this series with my i915 based laptop with HDMI connector, and I never see the scdc_status file. And that's because CONFIG_DRM_BRIDGE_CONNECTOR is not set for my configuration. So I think you are creating the debugfs entry in the wrong place. I can read the SCDC from the display using edid-decode with the right /dev/i2c-X device, so it's definitely there. Regards, Hans > > --- > 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 > 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: 4fdfaadba04dc0f2f2490dbc91922caa290463a5 > change-id: 20260413-scdc-link-health-89326013d96c > > Best regards, > -- > Nicolas Frattaroli >