Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 D8D5737A4BA for ; Tue, 7 Jul 2026 15:11:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783437095; cv=none; b=cRr3GGIycfLeRqy47usmXGnsMA5pzuRMLbY3RlDCvDicrPXGpeZN5BzEhj8Dzyh9dgnx8Zv+LW5zvGliVbRUiqCzgsmutRxLIZzm5ifdqo4tOCa0jklhdmgtCetvRmhpQOst/8k972lyjqcxhTJYQ2Aqd24PA8nGz4ea0OkVOKI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783437095; c=relaxed/simple; bh=+nhqY/LWx2IsqXCg0BmBhXKkyh+8SWcxWidi7+2EbV0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XvOQcPh3YiA1K6HcNYVVnl/vY6BUf5e1PPbAjfDaCiWqSebt2Smpm5hnwUVWu/TumRGWd7vM2LN3rJg7o6mTmRDTZo5U7QWeFjNS6ctV5GFh3DKkGENYha5EJBLw8Ej8XYqs5zXCqtxPhK6nsdxdh4xyCuiAKkVESqlUb3/EUrY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=c/g803Sl; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="c/g803Sl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDCAD1F000E9; Tue, 7 Jul 2026 15:11:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783437093; bh=bNnY3o4bpJKNjE/Pa/DEiRez3VL3L1EDXfn5ZiFKjV4=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=c/g803Sl+ttGkEp1mnxdGOonhFz3i02oYN0tyVmobjIUVgxB2tVY8pjMN0Sc8b4PN rMBPcrXd+5gZfMIemhI/HkyuSywGERUcqTEb3M9Nqkt6vTH69k9HWVNoZ8cBHIP3V1 XOLUemggJwGrRKzYAsbQ3jHPMH9eS+O/aAN4pX8Hzf8rKxgup2a6PtQ09B9vK2OAbm T5TBOVEL9e1DE9d+rfRXbEDmncI722iBFr5MgL/ZCGp8wcUEnDJmwitCdZH36rQB2q KYG74TntLwuv3Gqr5qEqdhicOuHtGzXtttd/qNkfTC//nNA/Q3qCQNRGftXJ+dgU2g 7dubayX7LVP+A== From: Maxime Ripard Date: Tue, 07 Jul 2026 17:11:08 +0200 Subject: [PATCH v2 01/37] drm/adp: mipi: Add atomic bridge state handlers Precedence: bulk X-Mailing-List: asahi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260707-drm-all-atomic-bridges-v2-1-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 , Joshua Peisach , Sasha Finkelstein , Janne Grunau , asahi@lists.linux.dev X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4099; i=mripard@kernel.org; h=from:subject:message-id; bh=+nhqY/LWx2IsqXCg0BmBhXKkyh+8SWcxWidi7+2EbV0=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFm+4gJv5tmWPy/PeT2jNEO9cl+BhGrX+it/r3rsqhF5I qtxq0mxYyoLgzAng6yYIssTmbDTy9sXVznYr/wBM4eVCWQIAxenAEwk9Bxjwy4GJaXjynOsuOdX 1jtPKhLdc1ae+WKpyo+rPG297v/7D1TVzZpRH+ayxfJ12faHR9xmMDZ8XjS7eMLf6IbJi+RczT+ Z1rxd+qRbwCrocU3enStSsTebr/ff4mBNtuUWFPRy801KbgYA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D The mipi 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) { ... } Reviewed-by: Joshua Peisach Signed-off-by: Maxime Ripard --- To: Sasha Finkelstein Cc: Janne Grunau Cc: dri-devel@lists.freedesktop.org Cc: asahi@lists.linux.dev --- drivers/gpu/drm/adp/adp-mipi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/adp/adp-mipi.c b/drivers/gpu/drm/adp/adp-mipi.c index cba7d32150a9..232bb9539423 100644 --- a/drivers/gpu/drm/adp/adp-mipi.c +++ b/drivers/gpu/drm/adp/adp-mipi.c @@ -3,10 +3,11 @@ #include #include #include #include +#include #include #include #define DSI_GEN_HDR 0x6c #define DSI_GEN_PLD_DATA 0x70 @@ -220,10 +221,13 @@ static int adp_dsi_bridge_attach(struct drm_bridge *bridge, return drm_bridge_attach(encoder, adp->next_bridge, bridge, flags); } static const struct drm_bridge_funcs adp_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 = adp_dsi_bridge_attach, }; static int adp_mipi_probe(struct platform_device *pdev) { -- 2.54.0