summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBaoquan He <hebaoquan@kylinos.cn>2026-09-03 19:18:25 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-10-24 01:55:58 -0700
commita856d82102a52d3250cf08e09c68d39a4fdbfefb (patch)
tree5c2509e44fe555a5217ae98d2afb1c6bcfb2998c /drivers
parent89073077600b7cb3734d53f0fe535b302b01e859 (diff)
drm/sti: don't use GFP_DMA when calling dma_alloc_wc()
dma_alloc_wc() 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. Link: https://lore.kernel.org/20260903111836.1777265-3-hebaoquan@kylinos.cn Signed-off-by: Baoquan He <hebaoquan@kylinos.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Christoph Hellwig <hch@lst.de> Cc: Harry Yoo <harry@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/sti/sti_cursor.c4
-rw-r--r--drivers/gpu/drm/sti/sti_hqvdp.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/sti/sti_cursor.c b/drivers/gpu/drm/sti/sti_cursor.c
index d0b89b28e50c..a0ec671477fd 100644
--- a/drivers/gpu/drm/sti/sti_cursor.c
+++ b/drivers/gpu/drm/sti/sti_cursor.c
@@ -240,7 +240,7 @@ static int sti_cursor_atomic_check(struct drm_plane *drm_plane,
cursor->pixmap.base = dma_alloc_wc(cursor->dev,
cursor->pixmap.size,
&cursor->pixmap.paddr,
- GFP_KERNEL | GFP_DMA);
+ GFP_KERNEL);
if (!cursor->pixmap.base) {
DRM_ERROR("Failed to allocate memory for pixmap\n");
return -EINVAL;
@@ -380,7 +380,7 @@ struct drm_plane *sti_cursor_create(struct drm_device *drm_dev,
/* Allocate clut buffer */
size = 0x100 * sizeof(unsigned short);
cursor->clut = dma_alloc_wc(dev, size, &cursor->clut_paddr,
- GFP_KERNEL | GFP_DMA);
+ GFP_KERNEL);
if (!cursor->clut) {
DRM_ERROR("Failed to allocate memory for cursor clut\n");
diff --git a/drivers/gpu/drm/sti/sti_hqvdp.c b/drivers/gpu/drm/sti/sti_hqvdp.c
index cf1ed8a33b8e..b0d66834bcbe 100644
--- a/drivers/gpu/drm/sti/sti_hqvdp.c
+++ b/drivers/gpu/drm/sti/sti_hqvdp.c
@@ -860,7 +860,7 @@ static void sti_hqvdp_init(struct sti_hqvdp *hqvdp)
size = NB_VDP_CMD * sizeof(struct sti_hqvdp_cmd);
hqvdp->hqvdp_cmd = dma_alloc_wc(hqvdp->dev, size,
&dma_addr,
- GFP_KERNEL | GFP_DMA);
+ GFP_KERNEL);
if (!hqvdp->hqvdp_cmd) {
DRM_ERROR("Failed to allocate memory for VDP cmd\n");
return;