All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround
@ 2019-07-31  9:42 Peter Ujfalusi
  2019-07-31  9:42 ` [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() " Peter Ujfalusi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter Ujfalusi @ 2019-07-31  9:42 UTC (permalink / raw)
  To: tomi.valkeinen, laurent.pinchart; +Cc: airlied, jsarha, dri-devel

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(-)

-- 
Peter

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() for i878 workaround
  2019-07-31  9:42 [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Peter Ujfalusi
@ 2019-07-31  9:42 ` Peter Ujfalusi
  2019-08-04 12:38   ` Laurent Pinchart
  2019-07-31  9:42 ` [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call Peter Ujfalusi
  2020-02-11  7:31 ` [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Tomi Valkeinen
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Ujfalusi @ 2019-07-31  9:42 UTC (permalink / raw)
  To: tomi.valkeinen, laurent.pinchart; +Cc: airlied, jsarha, dri-devel

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

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 252f5ebb1acc..77728eaa1a6f 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -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;
-- 
Peter

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call
  2019-07-31  9:42 [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Peter Ujfalusi
  2019-07-31  9:42 ` [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() " Peter Ujfalusi
@ 2019-07-31  9:42 ` Peter Ujfalusi
  2019-08-04 12:39   ` Laurent Pinchart
  2020-02-11  7:31 ` [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Tomi Valkeinen
  2 siblings, 1 reply; 6+ messages in thread
From: Peter Ujfalusi @ 2019-07-31  9:42 UTC (permalink / raw)
  To: tomi.valkeinen, laurent.pinchart; +Cc: airlied, jsarha, dri-devel

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

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
index 77728eaa1a6f..42ec51bb7b1b 100644
--- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
+++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
@@ -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");
-- 
Peter

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() for i878 workaround
  2019-07-31  9:42 ` [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() " Peter Ujfalusi
@ 2019-08-04 12:38   ` Laurent Pinchart
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2019-08-04 12:38 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: airlied, jsarha, tomi.valkeinen, dri-devel

Hi Peter,

Thank you for the patch.

On Wed, Jul 31, 2019 at 12:42:32PM +0300, Peter Ujfalusi wrote:
> Instead of dma_dev->device_prep_dma_memcpy() use the existing macro to
> prepare the memcpy.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> index 252f5ebb1acc..77728eaa1a6f 100644
> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> @@ -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;

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call
  2019-07-31  9:42 ` [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call Peter Ujfalusi
@ 2019-08-04 12:39   ` Laurent Pinchart
  0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2019-08-04 12:39 UTC (permalink / raw)
  To: Peter Ujfalusi; +Cc: airlied, jsarha, tomi.valkeinen, dri-devel

Hi Peter,

Thank you for the patch.

On Wed, Jul 31, 2019 at 12:42:33PM +0300, Peter Ujfalusi wrote:
> dma_sync_wait() is calling it so no need to call it in the driver.
> 
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> index 77728eaa1a6f..42ec51bb7b1b 100644
> --- a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> +++ b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c
> @@ -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");

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround
  2019-07-31  9:42 [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Peter Ujfalusi
  2019-07-31  9:42 ` [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() " Peter Ujfalusi
  2019-07-31  9:42 ` [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call Peter Ujfalusi
@ 2020-02-11  7:31 ` Tomi Valkeinen
  2 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2020-02-11  7:31 UTC (permalink / raw)
  To: Peter Ujfalusi, laurent.pinchart; +Cc: airlied, jsarha, dri-devel

On 31/07/2019 12:42, Peter Ujfalusi wrote:
> 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(-)
> 

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

  Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-02-11  7:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31  9:42 [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Peter Ujfalusi
2019-07-31  9:42 ` [PATCH 1/2] drm/omap: dmm_tiler: Use dmaengine_prep_dma_memcpy() " Peter Ujfalusi
2019-08-04 12:38   ` Laurent Pinchart
2019-07-31  9:42 ` [PATCH 2/2] drm/omap: dmm_tiler: Remove the dma_async_issue_pending() call Peter Ujfalusi
2019-08-04 12:39   ` Laurent Pinchart
2020-02-11  7:31 ` [PATCH 0/2] drm/omap: dmm_tiler: Small fixes for i878 workaround Tomi Valkeinen

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.