Skip to contentSkip to conversation

drm/omap: dmm_tiler: Small fixes for i878 workaround

PATCH In review Peter Ujfalusi 3 participants 6 messages Jul 31, 2019 – Feb 11, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover drm/omap: dmm_tiler: Small fixes for i878 workaround

Hi,

two small correction on the use of DMAengine API, no functional changes
- Use dmaengine_prep_dma_memcpy() to prepare the memcpy
- do not call dma_async_issue_pending() as it is redundant

Regards,
Peter
---
Peter Ujfalusi (2):
drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() for i878
workaround
drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call

 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Signature · 9 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 1/2 drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() for i878 workaround

Instead of dma_dev->device_prep_dma_memcpy() use the existing macro to prepare the memcpy.

---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1 -2
index 252f5ebb1acc..77728eaa1a6f 100644
@@ -82,12 +82,11 @@ static const u32 reg[][4] = {
 
 static int dmm_dma_copy(struct dmm *dmm, dma_addr_t src, dma_addr_t dst)
 {
-	struct dma_device *dma_dev = dmm->wa_dma_chan->device;
 	struct dma_async_tx_descriptor *tx;
 	enum dma_status status;
 	dma_cookie_t cookie;
 
-	tx = dma_dev->device_prep_dma_memcpy(dmm->wa_dma_chan, dst, src, 4, 0);
+	tx = dmaengine_prep_dma_memcpy(dmm->wa_dma_chan, dst, src, 4, 0);
 	if (!tx) {
 		dev_err(dmm->dev, "Failed to prepare DMA memcpy\n");
 		return -EIO;
Signature · 9 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() for i878 workaround

Hi Peter,

Thank you for the patch.

Quoted 4 lines · Peter Ujfalusi

Instead of dma_dev->device_prep_dma_memcpy() use the existing macro to prepare the memcpy.

Quoted 22 lines
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +1 -2
index 252f5ebb1acc..77728eaa1a6f 100644
@@ -82,12 +82,11 @@ static const u32 reg[][4] = {
 
 static int dmm_dma_copy(struct dmm *dmm, dma_addr_t src, dma_addr_t dst)
 {
-	struct dma_device *dma_dev = dmm->wa_dma_chan->device;
 	struct dma_async_tx_descriptor *tx;
 	enum dma_status status;
 	dma_cookie_t cookie;
 
-	tx = dma_dev->device_prep_dma_memcpy(dmm->wa_dma_chan, dst, src, 4, 0);
+	tx = dmaengine_prep_dma_memcpy(dmm->wa_dma_chan, dst, src, 4, 0);
 	if (!tx) {
 		dev_err(dmm->dev, "Failed to prepare DMA memcpy\n");
 		return -EIO;
Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw

PATCH 2/2 drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call

In reply to Peter Ujfalusi

dma_sync_wait() is calling it so no need to call it in the driver.

---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +0 -1
index 77728eaa1a6f..42ec51bb7b1b 100644
@@ -98,7 +98,6 @@ static int dmm_dma_copy(struct dmm *dmm, dma_addr_t src, dma_addr_t dst)
 		return -EIO;
 	}
 
-	dma_async_issue_pending(dmm->wa_dma_chan);
 	status = dma_sync_wait(dmm->wa_dma_chan, cookie);
 	if (status != DMA_COMPLETE)
 		dev_err(dmm->dev, "i878 wa DMA copy failure\n");
Signature · 9 lines
Peter

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call

Hi Peter,

Thank you for the patch.

Quoted 3 lines · Peter Ujfalusi

dma_sync_wait() is calling it so no need to call it in the driver.

Quoted 16 lines
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c +0 -1
index 77728eaa1a6f..42ec51bb7b1b 100644
@@ -98,7 +98,6 @@ static int dmm_dma_copy(struct dmm *dmm, dma_addr_t src, dma_addr_t dst)
 		return -EIO;
 	}
 
-	dma_async_issue_pending(dmm->wa_dma_chan);
 	status = dma_sync_wait(dmm->wa_dma_chan, cookie);
 	if (status != DMA_COMPLETE)
 		dev_err(dmm->dev, "i878 wa DMA copy failure\n");
Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#5 lore raw
In reply to Peter Ujfalusi
Quoted 14 lines · Peter Ujfalusi

Hi,

two small correction on the use of DMAengine API, no functional changes
- Use dmaengine_prep_dma_memcpy() to prepare the memcpy
- do not call dma_async_issue_pending() as it is redundant

Regards,
Peter
---
Peter Ujfalusi (2):
drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() for i878
workaround
drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call

Quoted 3 lines
  drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

Sorry, missed these two... Picked them up now.

Tomi

Signature · 6 lines
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel