From patchwork Fri Jul 31 16:19:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 2861 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id 17DD61C22FA for ; Fri, 31 Jul 2026 18:41:01 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=collabora.com; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-24823-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-24823-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id B287330A73BB for ; Fri, 31 Jul 2026 16:22:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A79245A2A5; Fri, 31 Jul 2026 16:19:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="DdIo5jxi" 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 E3074239E7F for ; Fri, 31 Jul 2026 16:19:38 +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=1785514783; cv=none; b=teS8FRrJ1uJGxn9M0TKSvruhNU1i50iLgwTtwEh06NNDIKQRZdZW5WztKiiAAlFBiI6bqpoN2Q2taQLa/QOoQKmRkZFlEFx7AWuqfgIGTB2bweJkktDp2piG+xLRvhklu03X65OjYNaZT5m50+qt9DdHC4EanOIJCrFp7gRFENA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785514783; c=relaxed/simple; bh=q5EwAZk5tThfOFfPU3cHVXQvyZ71nTre7ie20f65OJw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O9gIF9WwqKy1Gmh82loWf0dU5ddtPmIOiWjiv6T13UHHQiyt6zwcuMy5XRoDYMSFq9MV0y4/pIbZGl+Yf7P6xlmyP1iAMokTZd6QFnXsySde/rOxTW/ZwJxhoiUaSNmeo2pOUk7KMmcYJq3RGtOEEaqmCAJnt2Ezaq3Xmnblcmc= 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=DdIo5jxi; 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=1785514765; bh=q5EwAZk5tThfOFfPU3cHVXQvyZ71nTre7ie20f65OJw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DdIo5jxi023NLYpqtZRc+FgL4egNHK4YDshSat0ZkcnE8BZMWXS5kz5DIFKNCMkRM wETpn+b+RqqvdMgvrM8bNWmVamSBGK6og61qWcM41uUEeiULeEh7wGm4B1XVVBwkkn smxJNatp+2kU5E7CscZ/bdYjNXJT6FYY3CYdLzwtQcPgmj3ahJzUeKiqbfqKPysBgs JooT8xb05zqhGXsvVE0sbat169whW1r7+ZAS01ygfxTO6Cyx8HK3iodjjkIMQPV/+i B8Dn3h80B3MzMXjiCjcrlnRiuYG0fpXOiL7CgJwaghx/UhYGw9XxSjeWiuFSkpozUt vcFHxhLyjSiHw== 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 8F15017E0936; Fri, 31 Jul 2026 18:19:25 +0200 (CEST) From: Cristian Ciocaltea Date: Fri, 31 Jul 2026 19:19:22 +0300 Subject: [PATCH v10 15/69] drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20260731-dw-hdmi-qp-scramb-v10-15-294364b2cf15@collabora.com> References: <20260731-dw-hdmi-qp-scramb-v10-0-294364b2cf15@collabora.com> In-Reply-To: <20260731-dw-hdmi-qp-scramb-v10-0-294364b2cf15@collabora.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chen-Yu Tsai , Samuel Holland , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Algea Cao , Daniel Stone , Liu Ying , Phong LE 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 X-Mailer: b4 0.15.2 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?= 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 Signed-off-by: Cristian Ciocaltea --- include/drm/drm_bridge.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 5a5a25995471..77b3ffe69230 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: *