From mboxrd@z Thu Jan 1 00:00:00 1970 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 C2B8F37A82A for ; Thu, 2 Jul 2026 14:46:42 +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=1783003604; cv=none; b=V7AU8XK2Wtql951aKNOHjIkBlm8ouZBE/3hPsmig18gU9MyOpPAQUmaBi4cUS3o+nCDuGnH24vGmTad8+pIsWjN362H1Sd1N2nDN853ALXCyUIl1VFDZzzfgkHtEeGdQPFhp0IKOy4c7lwnvD6zbbt61hC0tEPQx7KOewQ98/So= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783003604; c=relaxed/simple; bh=/HfR6FepCYbvF9Dsn0hey9A/MfNDZWpVYqTWyKppwFg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=J93aJwXcfkTI0FduuIGXTZ/fCYImfVB0nlSdHiApVcD1vHAy6GaxYk63slu6leHQ45kVxroVj1ek0eK1ua6F/o9H9BM9RBjzhChQItkDVyyRX6veDicN9P96lhAByrxIaMozXmH3Wk8QzmbaundKu1geTFGoOPUeiPYjvngjKiQ= 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=YYfZz9Uz; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="YYfZz9Uz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1783003601; bh=/HfR6FepCYbvF9Dsn0hey9A/MfNDZWpVYqTWyKppwFg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YYfZz9UzzNd7DOd1uOUDSxOtuMe9c6CNgI08jJ2Hzwbq+Nz6dxyU3MjY95F2NqHG6 Dgk1Qg+ZUC+wNl0FNvUDmV4kXZOA00LD1l0+5z1Cu9kroz4dNq1N2/Uerp+qeOmYty CsXesCYJvXEnu+so2L78gS9qTkUYYAoXEYNcsJOutmJ/UcTME8DRao3gJ0+HjpWTBV qDO9ZGO+DsFLs9qzUX1yRfjx0rJoO/N3PYTbKerrxWa1G2Ma7+NowIGIDUr00TwadR R+dgD3asCtz/vgrVVfcgp7f6/BJ79jxcHILoMwIVP3JMr7ee/3mUZklkT8z0qKoKl1 0hxhwfDl8KMkw== Received: from localhost (unknown [100.64.0.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by bali.collaboradmins.com (Postfix) with ESMTPSA id 2DF5E17E35DB; Thu, 2 Jul 2026 16:46:41 +0200 (CEST) From: Cristian Ciocaltea Date: Thu, 02 Jul 2026 17:46:26 +0300 Subject: [PATCH v8 13/39] drm/bridge: Add bridge ops for source-side HDMI 2.0 scrambling 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: 7bit Message-Id: <20260702-dw-hdmi-qp-scramb-v8-13-d79890d00b6a@collabora.com> References: <20260702-dw-hdmi-qp-scramb-v8-0-d79890d00b6a@collabora.com> In-Reply-To: <20260702-dw-hdmi-qp-scramb-v8-0-d79890d00b6a@collabora.com> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Daniel Stone , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org X-Mailer: b4 0.15.2 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. 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 2d8b5e4c64ba..236d1cabe669 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -656,6 +656,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: * -- 2.54.0