mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] drm: use dmaengine API instead of raw function pointers
@ 2026-10-02 20:06 Frank.Li
  2026-10-06 18:47 ` Maíra Canal
  0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-10-02 20:06 UTC (permalink / raw)
  To: Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Dave Stevenson,
	Maíra Canal, Raspberry Pi Kernel Maintenance,
	open list:DRM DRIVERS FOR TI OMAP, open list
  Cc: vkoul, imx, Frank Li

From: Frank Li <Frank.Li@nxp.com>

Replace direct calls through dma_async_tx_descriptor and
dma_device function pointers with the proper dmaengine API
wrappers in vc4_dsi and omap_dmm_tiler.

Assisted-by: LLM
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +-
 drivers/gpu/drm/vc4/vc4_dsi.c            | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index a2c702b831a7c..c5dd350f937f4 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -87,7 +87,7 @@ static int dmm_dma_copy(struct dmm *dmm, dma_addr_t src, dma_addr_t dst)
 		return -EIO;
 	}
 
-	cookie = tx->tx_submit(tx);
+	cookie = dmaengine_submit(tx);
 	if (dma_submit_error(cookie)) {
 		dev_err(dmm->dev, "Failed to do DMA tx_submit\n");
 		return -EIO;
diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
index 0148f2befed14..b1626c2d3a582 100644
--- a/drivers/gpu/drm/vc4/vc4_dsi.c
+++ b/drivers/gpu/drm/vc4/vc4_dsi.c
@@ -628,16 +628,14 @@ dsi_dma_workaround_write(struct vc4_dsi *dsi, u32 offset, u32 val)
 
 	*dsi->reg_dma_mem = val;
 
-	tx = chan->device->device_prep_dma_memcpy(chan,
-						  dsi->reg_paddr + offset,
-						  dsi->reg_dma_paddr,
-						  4, 0);
+	tx = dmaengine_prep_dma_memcpy(chan, dsi->reg_paddr + offset,
+				       dsi->reg_dma_paddr, 4, 0);
 	if (!tx) {
 		drm_err(drm, "Failed to set up DMA register write\n");
 		return;
 	}
 
-	cookie = tx->tx_submit(tx);
+	cookie = dmaengine_submit(tx);
 	ret = dma_submit_error(cookie);
 	if (ret) {
 		drm_err(drm, "Failed to submit DMA: %d\n", ret);
-- 
2.43.0


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

* Re: [PATCH 1/1] drm: use dmaengine API instead of raw function pointers
  2026-10-02 20:06 [PATCH 1/1] drm: use dmaengine API instead of raw function pointers Frank.Li
@ 2026-10-06 18:47 ` Maíra Canal
  0 siblings, 0 replies; 2+ messages in thread
From: Maíra Canal @ 2026-10-06 18:47 UTC (permalink / raw)
  To: Frank.Li, Tomi Valkeinen, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Dave Stevenson,
	Raspberry Pi Kernel Maintenance,
	open list:DRM DRIVERS FOR TI OMAP, open list
  Cc: vkoul, imx, Frank Li

Hi Frank,

On 02/10/26 17:06, Frank.Li@oss.nxp.com wrote:
> From: Frank Li <Frank.Li@nxp.com>
> 
> Replace direct calls through dma_async_tx_descriptor and
> dma_device function pointers with the proper dmaengine API
> wrappers in vc4_dsi and omap_dmm_tiler.
> 
> Assisted-by: LLM
> Signed-off-by: Frank Li <Frank.Li@nxp.com>

For VC4:

Reviewed-by: Maíra Canal <mcanal@igalia.com>

Best regards,
- Maíra
> ---
>   drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +-
>   drivers/gpu/drm/vc4/vc4_dsi.c            | 8 +++-----
>   2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> index a2c702b831a7c..c5dd350f937f4 100644
> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> @@ -87,7 +87,7 @@ static int dmm_dma_copy(struct dmm *dmm, dma_addr_t src, dma_addr_t dst)
>   		return -EIO;
>   	}
>   
> -	cookie = tx->tx_submit(tx);
> +	cookie = dmaengine_submit(tx);
>   	if (dma_submit_error(cookie)) {
>   		dev_err(dmm->dev, "Failed to do DMA tx_submit\n");
>   		return -EIO;
> diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c
> index 0148f2befed14..b1626c2d3a582 100644
> --- a/drivers/gpu/drm/vc4/vc4_dsi.c
> +++ b/drivers/gpu/drm/vc4/vc4_dsi.c
> @@ -628,16 +628,14 @@ dsi_dma_workaround_write(struct vc4_dsi *dsi, u32 offset, u32 val)
>   
>   	*dsi->reg_dma_mem = val;
>   
> -	tx = chan->device->device_prep_dma_memcpy(chan,
> -						  dsi->reg_paddr + offset,
> -						  dsi->reg_dma_paddr,
> -						  4, 0);
> +	tx = dmaengine_prep_dma_memcpy(chan, dsi->reg_paddr + offset,
> +				       dsi->reg_dma_paddr, 4, 0);
>   	if (!tx) {
>   		drm_err(drm, "Failed to set up DMA register write\n");
>   		return;
>   	}
>   
> -	cookie = tx->tx_submit(tx);
> +	cookie = dmaengine_submit(tx);
>   	ret = dma_submit_error(cookie);
>   	if (ret) {
>   		drm_err(drm, "Failed to submit DMA: %d\n", ret);


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

end of thread, other threads:[~2026-10-06 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-02 20:06 [PATCH 1/1] drm: use dmaengine API instead of raw function pointers Frank.Li
2026-10-06 18:47 ` Maíra Canal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®