| Message ID | 20260723-dw-hdmi-qp-scramb-v9-11-4fb12ea22ac9@collabora.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-24653-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 602281C2B5B for <noreply@patchwork.local>; Thu, 23 Jul 2026 03:38:54 +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-24653-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-24653-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 011DE30BBA14 for <noreply@patchwork.local>; Thu, 23 Jul 2026 01:35:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 417E630F534; Thu, 23 Jul 2026 01:35:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="PHsSOtCJ" X-Original-To: linux-sunxi@lists.linux.dev Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (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 D4712305677 for <linux-sunxi@lists.linux.dev>; Thu, 23 Jul 2026 01:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784770516; cv=none; b=Y37IRxht2qVEOZCoSr/L06vTbMDP09dJ8yRgPaCD4+O4bxPRQ8OHLhOetEto7agK6YaOocrf5bvxGSBpiYlFDzDnI7qhkVI+KRLhnQ9noWO4ijoqe9JfEMuJ+4TzqAByOkWXAxKtCU0RUa/YErE54lJJHbelvt2iZWFq7b8NAK0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784770516; c=relaxed/simple; bh=4qfctTxWdvGpdKCYBW0HrvVdkpvsSeML8SODR4sseog=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Sau3gyl+OksO34btWf8wbvMeqrfgxYdWNw2zXo23QSoApEcIY7yl8E1wILjp+yHOjGa8YavYO0sG/dSWjkl/dd9rQkWJ1lXuQoZ87BImP9cCZuW/sRjSCyWpBcaZ7YkHaUZo8UFFN45l2EGKJdJILfv+KXaTp/kYaR/AVwimNso= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=PHsSOtCJ; arc=none smtp.client-ip=148.251.105.195 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1784770509; bh=4qfctTxWdvGpdKCYBW0HrvVdkpvsSeML8SODR4sseog=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=PHsSOtCJjeV+Bjsip7ggBI0mUCOTshL9Izgpq/MYNpawXllth0q9NL+hgTEWocW3W F6qfCNuxeO9w+Omzqaax9RKSjiQVYgCoxVBV/WyOxPSzB/FST1AHMVPJ1Cv0ujOs/D IO6NTYnaZcykXmwQbyj9nUtlQxaR2Cj4yGP2WhPk+0Kb8T1mQn5kIE4VFungf7APN5 yKHWTjMt5AMkrQnqFd8lHLkgNmPvyBdyhyaVDwelA4A/4B/1s9ZA39Q41myUdrTd5O shiTbl314RAWOA2gut9B5pIUMNteFSjFGEUDBRmZgktCmW/tLJ+f5T2RheEN0hOeDA xqelZ4bpZCQRg== Received: from localhost (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange secp256r1 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id B3B4D17E023C; Thu, 23 Jul 2026 03:35:09 +0200 (CEST) From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Date: Thu, 23 Jul 2026 04:35:00 +0300 Subject: [PATCH v9 11/61] drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling 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: 7bit Message-Id: <20260723-dw-hdmi-qp-scramb-v9-11-4fb12ea22ac9@collabora.com> References: <20260723-dw-hdmi-qp-scramb-v9-0-4fb12ea22ac9@collabora.com> In-Reply-To: <20260723-dw-hdmi-qp-scramb-v9-0-4fb12ea22ac9@collabora.com> To: 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>, 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>, 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>, Sandy Huang <hjc@rock-chips.com>, =?utf-8?q?Heiko_St=C3=BCbner?= <heiko@sntech.de>, Andy Yan <andy.yan@rock-chips.com>, Algea Cao <algea.cao@rock-chips.com>, Daniel Stone <daniels@collabora.com>, Liu Ying <victor.liu@nxp.com>, Phong LE <ple@baylibre.com> Cc: kernel@collabora.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-rockchip@lists.infradead.org, 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=1]; PRECEDENCE_BULK(0.00)[]; TAGGED_RCPT(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[collabora.com:email,collabora.com:dkim,qualcomm.com:email,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)[31]; RCVD_COUNT_FIVE(0.00)[5]; R_DKIM_ALLOW(0.00)[collabora.com:s=mail]; FROM_NEQ_ENVFROM(0.00)[cristian.ciocaltea@collabora.com,linux-sunxi@lists.linux.dev]; DMARC_POLICY_ALLOW(0.00)[collabora.com,none]; FREEMAIL_TO(0.00)[intel.com,linaro.org,kernel.org,ideasonboard.com,kwiboo.se,gmail.com,bootlin.com,linux.intel.com,suse.de,ffwll.ch,sholland.org,raspberrypi.com,igalia.com,rock-chips.com,sntech.de,collabora.com,nxp.com,baylibre.com]; DKIM_TRACE(0.00)[collabora.com:+]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; FORGED_SENDER_MAILLIST(0.00)[]; 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-24653-noreply=patchwork.local]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 602281C2B5B 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 HDMI 2.0 support to DW HDMI QP TX
|
|
Commit Message
Cristian Ciocaltea
July 23, 2026, 1:35 a.m. UTC
Bridges advertising HDMI 2.0 must be able to enable and disable
source-side scrambling and the high TMDS clock ratio when the configured
mode exceeds 340 MHz.
Add .hdmi_scrambler_{enable|disable}() callbacks covering the
source-side programming only; sink-side SCDC negotiation remains the job
of the HDMI connector helpers.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
include/drm/drm_bridge.h | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
Comments
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] Missing implementation of HDMI 2.0 scrambler callbacks in drm_bridge_connector causes initialization failure -- --- Patch [11]: [PATCH v9 11/61] drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling --- commit 449aac531f177fb10d98b7aac7653c2b23b627e6 Author: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling This commit adds hdmi_scrambler_enable and hdmi_scrambler_disable callbacks to drm_bridge_funcs. This enables bridges advertising HDMI 2.0 to configure source-side scrambling for modes exceeding 340 MHz. > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h > index 727eeb94119a5..348ddbe41dec5 100644 > --- a/include/drm/drm_bridge.h > +++ b/include/drm/drm_bridge.h > @@ -561,6 +561,41 @@ struct drm_bridge_funcs { > const struct drm_display_mode *mode, > unsigned long long tmds_rate); > > + /** > + * @hdmi_scrambler_enable: > + * > + * Enable source-side scrambling and the high TMDS clock ratio for the > + * mode currently being applied. > + * > + * This only programs the source side. Sink-side SCDC configuration is > + * handled by the HDMI connector helpers. > + * > + * Mandatory for bridges that set the DRM_BRIDGE_OP_HDMI flag in their > + * &drm_bridge->ops and advertise HDMI_VERSION_2_0 or later via > + * &drm_bridge->supported_hdmi_ver; unused otherwise. > + * > + * Returns: > + * 0 on success, a negative error code otherwise. > + */ > + int (*hdmi_scrambler_enable)(struct drm_bridge *bridge); > + > + /** > + * @hdmi_scrambler_disable: [Severity: High] Will bridge drivers adopting these new callbacks fail to probe? Looking at drm_bridge_connector_init(), the wrapper fails to map these newly added bridge callbacks to the connector's hdmi_funcs before calling drmm_connector_hdmi_init(): ret = drmm_connector_hdmi_init(drm, connector, &drm_bridge_connector_funcs, &bridge_connector->hdmi_funcs, connector_type, ddc); Because these new bridge ops are not mapped over to bridge_connector->hdmi_funcs, the core DRM HDMI initialization in drmm_connector_hdmi_init() will see them as missing and unconditionally fail with -EINVAL for HDMI 2.0+ devices: if (hdmi_funcs->supported_hdmi_ver >= HDMI_VERSION_2_0) { if (!hdmi_funcs->scrambler_enable || !hdmi_funcs->scrambler_disable) { drm_err(dev, "Scrambler callbacks missing for HDMI 2.x\n"); return -EINVAL; } } Should drm_bridge_connector_init() be updated to populate .scrambler_enable and .scrambler_disable from these new bridge ops to prevent initialization failures? > + * > + * Disable source-side scrambling and the high TMDS clock ratio. > + * > + * This only programs the source side. Sink-side SCDC configuration is > + * handled by the HDMI connector helpers. > + * > + * Mandatory for bridges that set the DRM_BRIDGE_OP_HDMI flag in their > + * &drm_bridge->ops and advertise HDMI_VERSION_2_0 or later via > + * &drm_bridge->supported_hdmi_ver; unused otherwise. > + * > + * Returns: > + * 0 on success, a negative error code otherwise. > + */ > + int (*hdmi_scrambler_disable)(struct drm_bridge *bridge); > + > /** > * @hdmi_clear_avi_infoframe: > *
diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 727eeb94119a..348ddbe41dec 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -561,6 +561,41 @@ struct drm_bridge_funcs { const struct drm_display_mode *mode, unsigned long long tmds_rate); + /** + * @hdmi_scrambler_enable: + * + * Enable source-side scrambling and the high TMDS clock ratio for the + * mode currently being applied. + * + * This only programs the source side. Sink-side SCDC configuration is + * handled by the HDMI connector helpers. + * + * Mandatory for bridges that set the DRM_BRIDGE_OP_HDMI flag in their + * &drm_bridge->ops and advertise HDMI_VERSION_2_0 or later via + * &drm_bridge->supported_hdmi_ver; unused otherwise. + * + * Returns: + * 0 on success, a negative error code otherwise. + */ + int (*hdmi_scrambler_enable)(struct drm_bridge *bridge); + + /** + * @hdmi_scrambler_disable: + * + * Disable source-side scrambling and the high TMDS clock ratio. + * + * This only programs the source side. Sink-side SCDC configuration is + * handled by the HDMI connector helpers. + * + * Mandatory for bridges that set the DRM_BRIDGE_OP_HDMI flag in their + * &drm_bridge->ops and advertise HDMI_VERSION_2_0 or later via + * &drm_bridge->supported_hdmi_ver; unused otherwise. + * + * Returns: + * 0 on success, a negative error code otherwise. + */ + int (*hdmi_scrambler_disable)(struct drm_bridge *bridge); + /** * @hdmi_clear_avi_infoframe: *