From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 0DCD13B8BDB for ; Tue, 28 Jul 2026 07:45:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785224748; cv=none; b=Phrds9D9H9m7yL5a7AkV0wkUSgnWLV4S9+U3ZoVzwqb97DTGj8BzcGK97oP3404TkPuE2zsPVQZ/VVnbVAfNBBcQk4e/QqZ+os1TCx+7XJx3hJ8nOw8BLQWk/dzjlu8dkQRqEFpZtg+OckX+33xlZMWSQ8k5Gc8ey16cmkIWN2Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785224748; c=relaxed/simple; bh=Qwwo+RjO5/E+/gdt7oUP1BpkpYefVSpeX8tj12d2Y98=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=MFsv4VghI0oZ2gRDnRAIzyHEJkjq8nTe7sR/fwurSHgsxHSv1digHeAnlmM2ywz1dhJpt4L0oL2o/L9UZEWYkdkeylkEKZwxjgBjv28OMl/znsZEq3tD9dCsNLMn92Ca/r8NA5RZb4mzofRj5taQmSjfqNMmFKSIB1tNPAPQ++s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=h0fJFTBR; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h0fJFTBR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1785224747; x=1816760747; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=Qwwo+RjO5/E+/gdt7oUP1BpkpYefVSpeX8tj12d2Y98=; b=h0fJFTBRwNMCprOp3SdVZ3I1behbyCI5Tef6v+AsucG3euTnu8wPj2Ti TrPsZ82WA9yQ0zBRzsqHWaSnJzVANoyXy0GYbWFjLfG33x/kphaayKPb/ KzFMZ1v9NMkAZeHdxiebICJqjONz+ODzAO22MZSfnmA1hUBqAsDOj7GQi 24hs2K4mZyYwUKn1WwlnNj479cSR8nm5c3nCSB1qv1EcbVE3lazIQwSTf KXyAEak2jGmMHJL8RdBgVCBMzX8nfZLUH5AZAfvIJV3tfS0GegydZuOEp viJg05o9eEXUrAQMTn2pxMxxviFrEWObn55Ok4AbIBzheIlTMv/KGBr3a g==; X-CSE-ConnectionGUID: sQjfHl/PT3GWrkUKE4zMAQ== X-CSE-MsgGUID: Su9uHWGlSsuLM8EYbVAynA== X-IronPort-AV: E=McAfee;i="6800,10657,11858"; a="85670787" X-IronPort-AV: E=Sophos;i="6.25,190,1779174000"; d="scan'208";a="85670787" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2026 00:45:45 -0700 X-CSE-ConnectionGUID: CzO3WoOrS4OdZoKto+PKIQ== X-CSE-MsgGUID: c46EBBmlTvuz1ZaGKmwAYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,190,1779174000"; d="scan'208";a="256292800" Received: from ncintean-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.244.76]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2026 00:45:39 -0700 From: Jani Nikula To: Nicolas Frattaroli , 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 , Chen-Yu Tsai , Samuel Holland , Dave Stevenson , =?utf-8?Q?Ma=C3=ADra?= Canal , Raspberry Pi Kernel Maintenance 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, Dmitry Baryshkov Subject: Re: [PATCH v9 0/5] Add SCDC information to connector debugfs In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland References: <20260724-scdc-link-health-v9-0-bdda406d016d@collabora.com> <1c9d3a50341129188242b1b2758fcee5eab243db@intel.com> Date: Tue, 28 Jul 2026 10:45:37 +0300 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, 27 Jul 2026, Nicolas Frattaroli = wrote: > On Monday, 27 July 2026 10:35:15 Central European Summer Time Jani Nikula= wrote: >> On Fri, 24 Jul 2026, 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 feli= ne >> > 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. >>=20 >> 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. Fair enough, thanks. BR, Jani. > >> 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. > >>=20 >>=20 >> BR, >> Jani. >>=20 >>=20 >>=20 >>=20 >>=20 >> > >> > --- >> > Changes in v9: >> > - Unlock mode_config.mutex on disconnected connector early exit >> > - Calculate and print Reed-Solomon error corrections counter on !=3D 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 separat= ed >> > 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 witho= ut >> > 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 t= he >> > 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 >> > To: Chen-Yu Tsai >> > To: Samuel Holland >> > To: Dave Stevenson >> > To: Ma=C3=ADra Canal >> > To: Raspberry Pi Kernel Maintenance >> > 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 (5): >> > drm/scdc-helper: Don't use ssize_t return type for scdc_read/wri= te >> > 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, >> > --=20=20 >> > Nicolas Frattaroli >> > >>=20 >>=20 > > > > --=20 Jani Nikula, Intel