drm: use dmaengine API instead of raw function pointers
Subsystems (5)
PATCH 1/1 drm: use dmaengine API instead of raw function pointers
From: Frank Li <[email protected]>
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 <[email protected]>
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +- drivers/gpu/drm/vc4/vc4_dsi.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1 -1
@@ -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 ;
drivers/gpu/drm/vc4/vc4_dsi.c +3 -5
@@ -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);
Signature · 1 line
2.43.0
Hi Frank,
Quoted 8 lines · On 02/10/26 17:06, [email protected] wrote:
From: Frank Li <[email protected]>
Replace direct calls through
dma_async_tx_descriptoranddma_devicefunction pointers with the proper dmaengine API wrappers invc4_dsiandomap_dmm_tiler.Assisted-by LLMSigned-off-by Frank Li <[email protected]>
For VC4:
Reviewed-by Maíra Canal <[email protected]>
Best regards,
- Maíra
Quoted 42 lines
--- drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 2 +- drivers/gpu/drm/vc4/vc4_dsi.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-)drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1
-1@@ -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 ;drivers/gpu/drm/vc4/vc4_dsi.c +3
-5@@ -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);