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 39787C43602 for ; Tue, 7 Jul 2026 15:12:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 918F810EDE1; Tue, 7 Jul 2026 15:12:37 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="MCHADKpD"; 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 0354C10EDE6 for ; Tue, 7 Jul 2026 15:12:35 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id DBEDC44014; Tue, 7 Jul 2026 15:12:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 468071F00A3D; Tue, 7 Jul 2026 15:12:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783437154; bh=XS6dAc+XxD92/vpzFnIpf8kCNrUKF0QRNI87i8dlI+I=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=MCHADKpD4aBDqCEIAC+4n5KWIOize6CmDVIEmV02nyi8o9sqJTNe9ogjfvDVQLy0O fj5JiVmHjHcA6LEfQ2fHNQazhI+djJy9NRanv0GT8qOxXBKmX0ccWQqv2Vz1Qn1Ux6 0VKNNJdbJiBdrOkiiIVuL5uGx/4MswlULXtyjt2XX28LgL0UaROUiYCgoRjnZr8xHb hQIRcNr/nQZWqV4cItF0S/9ACXRh62eTivOVwai0Fiwt/mp0dNPwl2zBvPxp7trNn0 oW2YoGcqKpUPZzo0b8pN+wHxW+ny1Oo9oKehJ9lyofjXX/gFnjIMTP2qslhxBEgCn7 94pl4dmiF+aLg== From: Maxime Ripard Date: Tue, 07 Jul 2026 17:11:34 +0200 Subject: [PATCH v2 27/37] drm/mcde: dsi: 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-27-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 , Linus Walleij X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=3807; i=mripard@kernel.org; h=from:subject:message-id; bh=7cwG9ApJTCCGUZBILIPBwP5Z0LuTfYgSE0GfUsL5MCE=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFm+4jIllQwTZ62Y+PT3mrfJHpbsmVff/zQN7Qx4syjsg eX3wP/hHVNZGIQ5GWTFFFmeyISdXt6+uMrBfuUPmDmsTCBDGLg4BWAiJvsZawV3pnzYd+SZ+/uL 8w65rU203/E+wyqm33+2i1+fUXj0J22DyoZZoQ+Kp3Ku3y/3TMB2KmPDgsj+n09N2gLSLry/EiE Yn1Qo/+oZ0770xZpnFdMOnQ1qa05corVEK7irvvPmk9dexScB 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 dsi 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) { ... } Acked-by: Linus Walleij Signed-off-by: Maxime Ripard --- To: Linus Walleij --- drivers/gpu/drm/mcde/mcde_dsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 47d45897ed06..5cf44ccb02cf 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -1061,10 +1061,13 @@ static int mcde_dsi_bridge_attach(struct drm_bridge *bridge, /* Attach the DSI bridge to the output (panel etc) bridge */ return drm_bridge_attach(encoder, d->bridge.next_bridge, bridge, flags); } static const struct drm_bridge_funcs mcde_dsi_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 = mcde_dsi_bridge_attach, .mode_set = mcde_dsi_bridge_mode_set, }; static int mcde_dsi_bind(struct device *dev, struct device *master, -- 2.54.0