* [PATCH] video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call
@ 2020-04-29 8:45 ` Christophe JAILLET
2020-06-01 13:25 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2020-04-29 8:45 UTC (permalink / raw)
To: b.zolnierkie, sumit.semwal, rafael.j.wysocki, corbet,
viresh.kumar, jani.nikula, mchehab+samsung, eric.miao
Cc: Christophe JAILLET, linux-fbdev, kernel-janitors, linux-kernel,
dri-devel
'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()'
not 'dma_free_wc()'.
The correct dma_free_ function is already used in the error handling path
of the probe function.
Fixes: 77e196752bdd ("[ARM] pxafb: allow video memory size to be configurable")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/video/fbdev/pxafb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 00b96a78676e..6f972bed410a 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -2417,8 +2417,8 @@ static int pxafb_remove(struct platform_device *dev)
free_pages_exact(fbi->video_mem, fbi->video_mem_size);
- dma_free_wc(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
- fbi->dma_buff_phys);
+ dma_free_coherent(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
+ fbi->dma_buff_phys);
return 0;
}
--
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call
2020-04-29 8:45 ` [PATCH] video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call Christophe JAILLET
@ 2020-06-01 13:25 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 2+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-06-01 13:25 UTC (permalink / raw)
To: Christophe JAILLET
Cc: linux-fbdev, corbet, jani.nikula, viresh.kumar, rafael.j.wysocki,
kernel-janitors, linux-kernel, dri-devel, eric.miao,
mchehab+samsung
On 4/29/20 10:45 AM, Christophe JAILLET wrote:
> 'dma_alloc_coherent()' must be balanced by a call to 'dma_free_coherent()'
> not 'dma_free_wc()'.
> The correct dma_free_ function is already used in the error handling path
> of the probe function.
>
> Fixes: 77e196752bdd ("[ARM] pxafb: allow video memory size to be configurable")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Applied to drm-misc-next tree (patch should show up in v5.9), thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
> ---
> drivers/video/fbdev/pxafb.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index 00b96a78676e..6f972bed410a 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -2417,8 +2417,8 @@ static int pxafb_remove(struct platform_device *dev)
>
> free_pages_exact(fbi->video_mem, fbi->video_mem_size);
>
> - dma_free_wc(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
> - fbi->dma_buff_phys);
> + dma_free_coherent(&dev->dev, fbi->dma_buff_size, fbi->dma_buff,
> + fbi->dma_buff_phys);
>
> return 0;
> }
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-01 13:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200429084519eucas1p2813ed7e76d573778607ac1270d8cb2e7@eucas1p2.samsung.com>
2020-04-29 8:45 ` [PATCH] video: pxafb: Fix the function used to balance a 'dma_alloc_coherent()' call Christophe JAILLET
2020-06-01 13:25 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).