Hi Maxime,

Thank you for the patch.

On Wed, Jun 17, 2026 at 12:14:47PM +0200, Maxime Ripard wrote:
> The ti-tfp410 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 <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
>  drivers/gpu/drm/bridge/ti-tfp410.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c 
> b/drivers/gpu/drm/bridge/ti-tfp410.c
> index 6f06f7b4e992..f0a14f52aaac 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -172,18 +172,20 @@ static void tfp410_detach(struct drm_bridge *bridge)
>               drm_bridge_hpd_disable(dvi->bridge.next_bridge);
>               cancel_delayed_work_sync(&dvi->hpd_work);
>       }
>  }
>  
> -static void tfp410_enable(struct drm_bridge *bridge)
> +static void tfp410_enable(struct drm_bridge *bridge,
> +                       struct drm_atomic_commit *commit)
>  {
>       struct tfp410 *dvi = drm_bridge_to_tfp410(bridge);
>  
>       gpiod_set_value_cansleep(dvi->powerdown, 0);
>  }
>  
> -static void tfp410_disable(struct drm_bridge *bridge)
> +static void tfp410_disable(struct drm_bridge *bridge,
> +                        struct drm_atomic_commit *commit)
>  {
>       struct tfp410 *dvi = drm_bridge_to_tfp410(bridge);
>  
>       gpiod_set_value_cansleep(dvi->powerdown, 1);
>  }
> @@ -240,12 +242,12 @@ static int tfp410_atomic_check(struct drm_bridge 
> *bridge,
>  }
>  
>  static const struct drm_bridge_funcs tfp410_bridge_funcs = {
>       .attach         = tfp410_attach,
>       .detach         = tfp410_detach,
> -     .enable         = tfp410_enable,
> -     .disable        = tfp410_disable,
> +     .atomic_enable = tfp410_enable,
> +     .atomic_disable = tfp410_disable,
>       .mode_valid     = tfp410_mode_valid,
>       .atomic_create_state = drm_atomic_helper_bridge_create_state,
>       .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
>       .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
>       .atomic_get_input_bus_fmts = tfp410_get_input_bus_fmts,

-- 
Regards,

Laurent Pinchart

Reply via email to