dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Maxime Ripard <mripard@kernel.org>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 11/37] drm/bridge: lvds-codec: Switch to atomic bridge callbacks
Date: Mon, 22 Jun 2026 14:31:02 +0300	[thread overview]
Message-ID: <20260622113102.GC3872967@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20260617-drm-all-atomic-bridges-v1-11-b63e6316166b@kernel.org>

On Wed, Jun 17, 2026 at 12:14:36PM +0200, Maxime Ripard wrote:
> The lvds-codec bridge still uses the deprecated non-atomic bridge
> callbacks.
> 
> Switch to their atomic counterparts.
> 
> 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 @
> 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 @
> 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 @
> 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 @
> 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>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
>  drivers/gpu/drm/bridge/lvds-codec.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/lvds-codec.c b/drivers/gpu/drm/bridge/lvds-codec.c
> index d1135dc3b99f..a82ea0c944eb 100644
> --- a/drivers/gpu/drm/bridge/lvds-codec.c
> +++ b/drivers/gpu/drm/bridge/lvds-codec.c
> @@ -41,11 +41,12 @@ static int lvds_codec_attach(struct drm_bridge *bridge,
>  
>  	return drm_bridge_attach(encoder, lvds_codec->panel_bridge,
>  				 bridge, flags);
>  }
>  
> -static void lvds_codec_enable(struct drm_bridge *bridge)
> +static void lvds_codec_enable(struct drm_bridge *bridge,
> +			      struct drm_atomic_commit *commit)
>  {
>  	struct lvds_codec *lvds_codec = to_lvds_codec(bridge);
>  	int ret;
>  
>  	ret = regulator_enable(lvds_codec->vcc);
> @@ -57,11 +58,12 @@ static void lvds_codec_enable(struct drm_bridge *bridge)
>  
>  	if (lvds_codec->powerdown_gpio)
>  		gpiod_set_value_cansleep(lvds_codec->powerdown_gpio, 0);
>  }
>  
> -static void lvds_codec_disable(struct drm_bridge *bridge)
> +static void lvds_codec_disable(struct drm_bridge *bridge,
> +			       struct drm_atomic_commit *commit)
>  {
>  	struct lvds_codec *lvds_codec = to_lvds_codec(bridge);
>  	int ret;
>  
>  	if (lvds_codec->powerdown_gpio)
> @@ -98,12 +100,12 @@ lvds_codec_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
>  	return input_fmts;
>  }
>  
>  static const struct drm_bridge_funcs funcs = {
>  	.attach = lvds_codec_attach,
> -	.enable = lvds_codec_enable,
> -	.disable = lvds_codec_disable,
> +	.atomic_enable = lvds_codec_enable,
> +	.atomic_disable = lvds_codec_disable,
>  	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
>  	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
>  	.atomic_create_state = drm_atomic_helper_bridge_create_state,
>  	.atomic_get_input_bus_fmts = lvds_codec_atomic_get_input_bus_fmts,
>  };

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2026-06-22 11:31 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 [this message]
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
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=20260622113102.GC3872967@killaraus.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.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=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox