From mboxrd@z Thu Jan 1 00:00:00 1970 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 C5ACACD98F2 for ; Mon, 22 Jun 2026 11:38:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 088E610E64E; Mon, 22 Jun 2026 11:38:43 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ViWn+enl"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0FB2B10E64E for ; Mon, 22 Jun 2026 11:38:41 +0000 (UTC) Received: from killaraus.ideasonboard.com (2001-14ba-70f3-e800--a06.rev.dnainternet.fi [IPv6:2001:14ba:70f3:e800::a06]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E38FD18E5; Mon, 22 Jun 2026 13:38:01 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1782128282; bh=q/oqGCzqqLSDA0mxIT6/SQyCg3ELN0z1DGFRfZbT8r8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ViWn+enlBKmkbyuxQlyehmsyRrN/F/cZuXLlI9KPZZ3KM+TQCRzHtEE6twKWyTkmt F4K/xChPYviSXuMLqcJu4UWTlElBpKU8UjOXmssBLBmSOz/XKbaAO1rgxjUuppUfC0 WBd9DEgeauaYCZsjGDp96VEHxMXBcOpl7BUnFhfI= Date: Mon, 22 Jun 2026 14:38:38 +0300 From: Laurent Pinchart To: Maxime Ripard Cc: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Jonas Karlman , Jernej Skrabec , Luca Ceresoli , dri-devel@lists.freedesktop.org Subject: Re: [PATCH 22/37] drm/bridge: ti-tfp410: Switch to atomic bridge callbacks Message-ID: <20260622113838.GF3872967@killaraus.ideasonboard.com> References: <20260617-drm-all-atomic-bridges-v1-0-b63e6316166b@kernel.org> <20260617-drm-all-atomic-bridges-v1-22-b63e6316166b@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260617-drm-all-atomic-bridges-v1-22-b63e6316166b@kernel.org> 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" 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 Reviewed-by: Laurent Pinchart > --- > 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