All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Maxime Ripard <mripard@kernel.org>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	dri-devel@lists.freedesktop.org,
	Manikandan Muralidharan <manikandan.m@microchip.com>,
	Dharma Balasubiramani <dharma.b@microchip.com>
Subject: Re: [PATCH 13/37] drm/bridge: microchip-lvds: Switch to atomic bridge callbacks
Date: Thu, 25 Jun 2026 09:59:14 +0200	[thread overview]
Message-ID: <8dbb4729-5178-44e7-9fee-ef230dd149f2@suse.de> (raw)
In-Reply-To: <20260617-drm-all-atomic-bridges-v1-13-b63e6316166b@kernel.org>



Am 17.06.26 um 12:14 schrieb Maxime Ripard:
> The microchip-lvds bridge still uses the deprecated non-atomic bridge
> callbacks.
>
> Switch to their atomic counterparts, adding the bridge state
> handlers if not already present.
>
> 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 <mripard@kernel.org>
>
> ---
> To: Manikandan Muralidharan <manikandan.m@microchip.com>
> To: Dharma Balasubiramani <dharma.b@microchip.com>
> ---
>   drivers/gpu/drm/bridge/microchip-lvds.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/bridge/microchip-lvds.c b/drivers/gpu/drm/bridge/microchip-lvds.c
> index 5fb8633f43c5..dd4ffc9f4df3 100644
> --- a/drivers/gpu/drm/bridge/microchip-lvds.c
> +++ b/drivers/gpu/drm/bridge/microchip-lvds.c
> @@ -165,10 +165,13 @@ static void mchp_lvds_atomic_disable(struct drm_bridge *bridge,
>   	pm_runtime_put(lvds->dev);
>   	clk_disable_unprepare(lvds->pclk);
>   }
>   
>   static const struct drm_bridge_funcs mchp_lvds_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 = mchp_lvds_attach,
>   	.atomic_enable = mchp_lvds_atomic_enable,
>   	.atomic_disable = mchp_lvds_atomic_disable,

This driver uses atomic callbacks, but apparently didn't maintain atomic 
state. Surprisingly it worked.

>   };
>   
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



  parent reply	other threads:[~2026-06-25  7:59 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-17 10:14 [PATCH 00/37] drm/bridge: Convert all bridges to atomic Maxime Ripard
2026-06-17 10:14 ` [PATCH 01/37] drm/adp: mipi: Switch to atomic bridge callbacks Maxime Ripard
2026-06-18  1:13   ` Joshua Peisach
2026-06-17 10:14 ` [PATCH 02/37] drm/bridge: analogix-anx6345: " Maxime Ripard
2026-06-25  8:08   ` Thomas Zimmermann
2026-06-26 13:30     ` Maxime Ripard
2026-06-17 10:14 ` [PATCH 03/37] drm/bridge: analogix-anx78xx: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 04/37] drm/bridge: aux-bridge: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 05/37] drm/bridge: aux-hpd-bridge: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 06/37] drm/bridge: chrontel-ch7033: " Maxime Ripard
2026-06-25  7:55   ` Thomas Zimmermann
2026-06-26  8:13     ` Maxime Ripard
2026-06-17 10:14 ` [PATCH 07/37] drm/bridge: cros-ec-anx7688: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 08/37] drm/bridge: lontium-lt8713sx: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 09/37] drm/bridge: lontium-lt8912b: " Maxime Ripard
2026-06-22 11:34   ` Francesco Dolcini
2026-06-17 10:14 ` [PATCH 10/37] drm/bridge: lontium-lt9611uxc: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 11/37] drm/bridge: lvds-codec: " Maxime Ripard
2026-06-22 11:31   ` Laurent Pinchart
2026-06-17 10:14 ` [PATCH 12/37] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: " Maxime Ripard
2026-07-01  6:02   ` Ian Ray
2026-06-17 10:14 ` [PATCH 13/37] drm/bridge: microchip-lvds: " Maxime Ripard
2026-06-22  9:00   ` Manikandan.M
2026-06-25  7:59   ` Thomas Zimmermann [this message]
2026-06-17 10:14 ` [PATCH 14/37] drm/bridge: nxp-ptn3460: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 15/37] drm/bridge: of-display-mode-bridge: " Maxime Ripard
2026-06-22 11:33   ` Laurent Pinchart
2026-06-17 10:14 ` [PATCH 16/37] drm/bridge: parade-ps8622: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 17/37] drm/bridge: sii9234: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 18/37] drm/bridge: sil-sii8620: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 19/37] drm/bridge: simple-bridge: " Maxime Ripard
2026-06-22 11:34   ` Laurent Pinchart
2026-06-17 10:14 ` [PATCH 20/37] drm/bridge: tc358764: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 21/37] drm/bridge: tda998x: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 22/37] drm/bridge: ti-tfp410: " Maxime Ripard
2026-06-22 11:38   ` Laurent Pinchart
2026-06-17 10:14 ` [PATCH 23/37] drm/bridge: ti-tpd12s015: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 24/37] drm/bridge: thc63lvd1024: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 25/37] drm/bridge: waveshare-dsi: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 26/37] drm/exynos: mic: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 27/37] drm/mcde: dsi: " Maxime Ripard
2026-06-17 11:58   ` Linus Walleij
2026-06-17 10:14 ` [PATCH 28/37] drm/mediatek: dpi: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 29/37] drm/msm: dsi: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 30/37] drm/omap: dpi: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 31/37] drm/omap: dsi: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 32/37] drm/omap: sdi: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 33/37] drm/omap: venc: " Maxime Ripard
2026-06-17 10:14 ` [PATCH 34/37] drm/sti: dvo: " Maxime Ripard
2026-06-17 10:15 ` [PATCH 35/37] drm/sti: hda: " Maxime Ripard
2026-06-17 10:15 ` [PATCH 36/37] drm/sti: hdmi: " Maxime Ripard
2026-06-17 10:15 ` [PATCH 37/37] drm/bridge: Remove legacy bridge callback support Maxime Ripard
2026-06-22 11:43   ` Laurent Pinchart
2026-06-24 12:18 ` [PATCH 00/37] drm/bridge: Convert all bridges to atomic Luca Ceresoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8dbb4729-5178-44e7-9fee-ef230dd149f2@suse.de \
    --to=tzimmermann@suse.de \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dharma.b@microchip.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=manikandan.m@microchip.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.