dma_alloc_coherent() allocates the DMA buffer with the device's
addressing limitation in mind; the DMA core picks the zone from the
device's coherent DMA mask and ignores GFP_DMA passed by the caller.
Remove the redundant GFP_DMA flag.

Cc: [email protected]
Signed-off-by: Baoquan He <[email protected]>
---
 drivers/gpu/ipu-v3/ipu-image-convert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c 
b/drivers/gpu/ipu-v3/ipu-image-convert.c
index 29b6d36c9bb6..493be4d4b091 100644
--- a/drivers/gpu/ipu-v3/ipu-image-convert.c
+++ b/drivers/gpu/ipu-v3/ipu-image-convert.c
@@ -371,7 +371,7 @@ static int alloc_dma_buf(struct ipu_image_convert_priv 
*priv,
 {
        buf->len = PAGE_ALIGN(size);
        buf->virt = dma_alloc_coherent(priv->ipu->dev, buf->len, &buf->phys,
-                                      GFP_DMA | GFP_KERNEL);
+                                      GFP_KERNEL);
        if (!buf->virt) {
                dev_err(priv->ipu->dev, "failed to alloc dma buffer\n");
                return -ENOMEM;
-- 
2.54.0

Reply via email to