Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D9D7C43458 for ; Tue, 7 Jul 2026 15:11:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 610E010EDB1; Tue, 7 Jul 2026 15:11:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="ma9H40bE"; dkim-atps=neutral Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id B441E10EDBC for ; Tue, 7 Jul 2026 15:11:41 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 38A406138B; Tue, 7 Jul 2026 15:11:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C0541F000E9; Tue, 7 Jul 2026 15:11:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783437100; bh=h/SaE7f2mccL+Do1PSVGZR3uUCaUMDi3hVjR4giFNb4=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=ma9H40bE1CbLK4MJFAXN5kmaVUZtznn+oRR2CoAMVcm9B3pREQQfwDPqN5U7dqPJI alhafd/Stu1ipo/4ugJC2a+bVSggYCxcscvHqnWjAAa9+fEJpXO62jhQKjCYd+iJSW a9A1oyPb55YOC8hube/e68FCXHNnzEPGGvPNLjg+G6/rnA+iXfnd6deW4srQAYDxDa UmhnnAh6de3LAso0S6T65uhegMTR4jrLePs375FMPbTv2wT416m45kywhKeBxVYogU FJXPNxMO/4g/EpTqgqIjxrJUt2Hpfl6SPNvz6H9oQlJ38cvq2hGGxLLVXsZjaCbOzi VU4IWAXJVsaXw== From: Maxime Ripard Date: Tue, 07 Jul 2026 17:11:11 +0200 Subject: [PATCH v2 04/37] drm/bridge: aux-bridge: Add atomic bridge state handlers MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260707-drm-all-atomic-bridges-v2-4-21d03cbca446@kernel.org> References: <20260707-drm-all-atomic-bridges-v2-0-21d03cbca446@kernel.org> In-Reply-To: <20260707-drm-all-atomic-bridges-v2-0-21d03cbca446@kernel.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , dri-devel@lists.freedesktop.org, Maxime Ripard X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3993; i=mripard@kernel.org; h=from:subject:message-id; bh=hy7tJQBS34T9sICQCfPHbNxKzmkGsAYXr/y10/NjxlI=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFm+4oKlfyZavNh/6sS9D+I8tcvsXFQ+Xc32V9mw9uXuz 7HKMz/M6pjKwiDMySArpsjyRCbs9PL2xVUO9it/wMxhZQIZwsDFKQATKWVjbDiQfzfjWNSKsrmc 4asEBEz3xnqUpUXW3YlNMZoTtC36SXHO15W7j+alKq9ba3N7dpBTE2NDxwub7xZuIU9V5ipMrEn t42o89G6dh9zbvs8dF6J2cV6fbXZTNM1N5PrODLv/QZpVlxUA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The aux-bridge bridge doesn't implement any enable or disable callbacks, but is still missing the atomic state handlers. In order to remove the legacy bridge callback support from the DRM bridge core, add them. Generated by the following Coccinelle script: @ is_bridge @ identifier funcs; @@ struct drm_bridge_funcs funcs = { ..., }; @ has_create_state depends on is_bridge @ identifier funcs, f; @@ struct drm_bridge_funcs funcs = { ..., .atomic_create_state = f, ..., }; @ update_struct depends on (is_bridge && !has_create_state) @ identifier is_bridge.funcs; identifier f; @@ struct drm_bridge_funcs funcs = { + .atomic_create_state = drm_atomic_helper_bridge_create_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, ..., }; @ update_pre_enable_struct depends on (is_bridge && !has_create_state) @ identifier is_bridge.funcs; identifier f; @@ struct drm_bridge_funcs funcs = { ..., - .pre_enable = f, + .atomic_pre_enable = f, ..., }; @ update_pre_enable_impl depends on update_pre_enable_struct @ identifier update_pre_enable_struct.f; identifier b; @@ -void f(struct drm_bridge *b) +void f(struct drm_bridge *b, struct drm_atomic_commit *commit) { ... } @ update_enable_struct depends on (is_bridge && !has_create_state) @ identifier is_bridge.funcs; identifier f; @@ struct drm_bridge_funcs funcs = { ..., - .enable = f, + .atomic_enable = f, ..., }; @ update_enable_impl depends on update_enable_struct @ identifier update_enable_struct.f; identifier b; @@ -void f(struct drm_bridge *b) +void f(struct drm_bridge *b, struct drm_atomic_commit *commit) { ... } @ update_disable_struct depends on (is_bridge && !has_create_state) @ identifier is_bridge.funcs; identifier f; @@ struct drm_bridge_funcs funcs = { ..., - .disable = f, + .atomic_disable = f, ..., }; @ update_disable_impl depends on update_disable_struct @ identifier update_disable_struct.f; identifier b; @@ -void f(struct drm_bridge *b) +void f(struct drm_bridge *b, struct drm_atomic_commit *commit) { ... } @ update_post_disable_struct depends on (is_bridge && !has_create_state) @ identifier is_bridge.funcs; identifier f; @@ struct drm_bridge_funcs funcs = { ..., - .post_disable = f, + .atomic_post_disable = f, ..., }; @ update_post_disable_impl depends on update_post_disable_struct @ identifier update_post_disable_struct.f; identifier b; @@ -void f(struct drm_bridge *b) +void f(struct drm_bridge *b, struct drm_atomic_commit *commit) { ... } Signed-off-by: Maxime Ripard --- drivers/gpu/drm/bridge/aux-bridge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/aux-bridge.c b/drivers/gpu/drm/bridge/aux-bridge.c index 1ed21a8713bf..169939d23310 100644 --- a/drivers/gpu/drm/bridge/aux-bridge.c +++ b/drivers/gpu/drm/bridge/aux-bridge.c @@ -7,10 +7,11 @@ #include #include #include #include +#include #include #include static DEFINE_IDA(drm_aux_bridge_ida); @@ -102,10 +103,13 @@ static int drm_aux_bridge_attach(struct drm_bridge *bridge, return drm_bridge_attach(encoder, data->next_bridge, bridge, DRM_BRIDGE_ATTACH_NO_CONNECTOR); } static const struct drm_bridge_funcs drm_aux_bridge_funcs = { + .atomic_create_state = drm_atomic_helper_bridge_create_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, .attach = drm_aux_bridge_attach, }; static int drm_aux_bridge_probe(struct auxiliary_device *auxdev, const struct auxiliary_device_id *id) -- 2.54.0