All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: dw-mipi-dsi: Switch to atomic operations
@ 2021-11-12  6:17 Jagan Teki
  2022-01-13 19:43 ` Jagan Teki
  0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2021-11-12  6:17 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Sam Ravnborg, Heiko Stubner, Yannick Fertre
  Cc: linux-amarula, linux-stm32, dri-devel, Jagan Teki

Replace atomic version of the enable/disable operations to
continue the transition to the atomic API.

Also added default drm atomic operations for duplicate, destroy
and reset state API's in order to have smooth transition on
atomic API's.

Tested on Engicam i.Core STM32MP1 SoM.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
index e44e18a0112a..ff0db96dfcd5 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
@@ -871,7 +871,8 @@ static void dw_mipi_dsi_clear_err(struct dw_mipi_dsi *dsi)
 	dsi_write(dsi, DSI_INT_MSK1, 0);
 }
 
-static void dw_mipi_dsi_bridge_post_disable(struct drm_bridge *bridge)
+static void dw_mipi_dsi_bridge_post_atomic_disable(struct drm_bridge *bridge,
+						   struct drm_bridge_state *old_bridge_state)
 {
 	struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
 	const struct dw_mipi_dsi_phy_ops *phy_ops = dsi->plat_data->phy_ops;
@@ -978,7 +979,8 @@ static void dw_mipi_dsi_bridge_mode_set(struct drm_bridge *bridge,
 		dw_mipi_dsi_mode_set(dsi->slave, adjusted_mode);
 }
 
-static void dw_mipi_dsi_bridge_enable(struct drm_bridge *bridge)
+static void dw_mipi_dsi_bridge_atomic_enable(struct drm_bridge *bridge,
+					     struct drm_bridge_state *old_bridge_state)
 {
 	struct dw_mipi_dsi *dsi = bridge_to_dsi(bridge);
 
@@ -1032,11 +1034,14 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge,
 }
 
 static const struct drm_bridge_funcs dw_mipi_dsi_bridge_funcs = {
-	.mode_set     = dw_mipi_dsi_bridge_mode_set,
-	.enable	      = dw_mipi_dsi_bridge_enable,
-	.post_disable = dw_mipi_dsi_bridge_post_disable,
-	.mode_valid   = dw_mipi_dsi_bridge_mode_valid,
-	.attach	      = dw_mipi_dsi_bridge_attach,
+	.atomic_duplicate_state	= drm_atomic_helper_bridge_duplicate_state,
+	.atomic_destroy_state	= drm_atomic_helper_bridge_destroy_state,
+	.atomic_reset		= drm_atomic_helper_bridge_reset,
+	.atomic_enable		= dw_mipi_dsi_bridge_atomic_enable,
+	.atomic_post_disable	= dw_mipi_dsi_bridge_post_atomic_disable,
+	.mode_set		= dw_mipi_dsi_bridge_mode_set,
+	.mode_valid		= dw_mipi_dsi_bridge_mode_valid,
+	.attach			= dw_mipi_dsi_bridge_attach,
 };
 
 #ifdef CONFIG_DEBUG_FS
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/bridge: dw-mipi-dsi: Switch to atomic operations
  2021-11-12  6:17 [PATCH] drm/bridge: dw-mipi-dsi: Switch to atomic operations Jagan Teki
@ 2022-01-13 19:43 ` Jagan Teki
  2022-01-13 22:29   ` Robert Foss
  0 siblings, 1 reply; 3+ messages in thread
From: Jagan Teki @ 2022-01-13 19:43 UTC (permalink / raw)
  To: Andrzej Hajda, Neil Armstrong, Robert Foss, Laurent Pinchart,
	Sam Ravnborg, Heiko Stubner, Yannick Fertre
  Cc: linux-amarula, linux-stm32, dri-devel

On Fri, Nov 12, 2021 at 11:47 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Replace atomic version of the enable/disable operations to
> continue the transition to the atomic API.
>
> Also added default drm atomic operations for duplicate, destroy
> and reset state API's in order to have smooth transition on
> atomic API's.
>
> Tested on Engicam i.Core STM32MP1 SoM.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---

Gentle ping!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/bridge: dw-mipi-dsi: Switch to atomic operations
  2022-01-13 19:43 ` Jagan Teki
@ 2022-01-13 22:29   ` Robert Foss
  0 siblings, 0 replies; 3+ messages in thread
From: Robert Foss @ 2022-01-13 22:29 UTC (permalink / raw)
  To: Jagan Teki
  Cc: Neil Armstrong, linux-amarula, Yannick Fertre, dri-devel,
	Andrzej Hajda, Laurent Pinchart, Sam Ravnborg, linux-stm32

Reviewed-by: Robert Foss <robert.foss@linaro.org>

Applied to drm-misc-next.

On Thu, 13 Jan 2022 at 20:43, Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> On Fri, Nov 12, 2021 at 11:47 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > Replace atomic version of the enable/disable operations to
> > continue the transition to the atomic API.
> >
> > Also added default drm atomic operations for duplicate, destroy
> > and reset state API's in order to have smooth transition on
> > atomic API's.
> >
> > Tested on Engicam i.Core STM32MP1 SoM.
> >
> > Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> > ---
>
> Gentle ping!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-13 22:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-12  6:17 [PATCH] drm/bridge: dw-mipi-dsi: Switch to atomic operations Jagan Teki
2022-01-13 19:43 ` Jagan Teki
2022-01-13 22:29   ` Robert Foss

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.