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 C5510C44501 for ; Tue, 7 Jul 2026 15:12:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3FE510EDE5; Tue, 7 Jul 2026 15:12:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="YjP9w8wH"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9B02310EDE5 for ; Tue, 7 Jul 2026 15:12:25 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 7FEFD4335E; Tue, 7 Jul 2026 15:12:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE20D1F000E9; Tue, 7 Jul 2026 15:12:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783437145; bh=WoytRDBLpGy4PZQrllohYElP+eOFsHS8RyEQdZsQjWA=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=YjP9w8wHPMyl0gkV5P6P1rDSov4CROW/mXDXFUaeRLXIA7wQo5KZigUR9LXeScfsy nDC7At/+8qH07AZri26b1JbWzptdZqeKSkamG2Mdp6H50ZLnEOFIpoy2CNht2WqgVV YYI6ybp2IOJMJH9lhCIwS+KXGuuPlUi6qinw3gxK/Aa/uANwSRS2kKJBh5K22uyxLj ZLTlXtnryodplK1ztTI7K652N4t/kXZJzvxJ45Go5f4x4YRor4EcAnWc87p3u8rYy8 RqEWYw6/kyBLyZXlODgj3t6SFQ2pTISFecy6WQdNgI7WAA9/qCQO+RCZZbnhVtLmhO 7gYrKYkrHUs1w== From: Maxime Ripard Date: Tue, 07 Jul 2026 17:11:30 +0200 Subject: [PATCH v2 23/37] drm/bridge: ti-tpd12s015: 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-23-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=3981; i=mripard@kernel.org; h=from:subject:message-id; bh=Elk8CR+fvvlUbF7aPFc5oxySqTH/0Vn7Mf/PszWLBW0=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFm+4lJ+k0Kz6qK9TL5tnCb+2v+e7c+kXx3uDJv+XW+9O kHmzvVXHVNZGIQ5GWTFFFmeyISdXt6+uMrBfuUPmDmsTCBDGLg4BWAib5kYG1acZZ1+erGsSdLW awlHp0ufD733rYvx67mpR3suGZ++U/RTL+zUw++l/+f/+u4z7/I11m7GhgsbCzx7Dx6cfHRHzHn Gdx6JK1Y0aV2NF7vBpZ1hveRn9oVVa21SdrQ9FZsiUhG4bOeKfwA= 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 ti-tpd12s015 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/ti-tpd12s015.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/bridge/ti-tpd12s015.c b/drivers/gpu/drm/bridge/ti-tpd12s015.c index 136e47ad1a10..e7b172ab7f55 100644 --- a/drivers/gpu/drm/bridge/ti-tpd12s015.c +++ b/drivers/gpu/drm/bridge/ti-tpd12s015.c @@ -17,10 +17,11 @@ #include #include #include #include +#include #include struct tpd12s015_device { struct drm_bridge bridge; @@ -94,10 +95,13 @@ static void tpd12s015_hpd_disable(struct drm_bridge *bridge) gpiod_set_value_cansleep(tpd->ct_cp_hpd_gpio, 0); } static const struct drm_bridge_funcs tpd12s015_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 = tpd12s015_attach, .detach = tpd12s015_detach, .detect = tpd12s015_bridge_detect, .hpd_enable = tpd12s015_hpd_enable, .hpd_disable = tpd12s015_hpd_disable, -- 2.54.0