kernel/0074-img-gpu-kmd-use-arch_sync_dma_for_device-instead-of-.patch
2024-12-19 16:34:44 -05:00

36 lines
1.3 KiB
Diff

From e205a619c77cd02985ccc8311d02b6c50c5544b2 Mon Sep 17 00:00:00 2001
From: Sakura286 <sakura286@outlook.com>
Date: Wed, 10 Jul 2024 18:03:36 +0800
Subject: [PATCH 074/219] img gpu kmd: use arch_sync_dma_for_device() instead
of sifive_l2_flush64_range()
---
.../img/img-volcanic/services/system/eswin_cpu/sysconfig.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/img/img-volcanic/services/system/eswin_cpu/sysconfig.c b/drivers/gpu/drm/img/img-volcanic/services/system/eswin_cpu/sysconfig.c
index e6750e7b49a0..d94c76cc68b9 100644
--- a/drivers/gpu/drm/img/img-volcanic/services/system/eswin_cpu/sysconfig.c
+++ b/drivers/gpu/drm/img/img-volcanic/services/system/eswin_cpu/sysconfig.c
@@ -34,7 +34,7 @@
#include <linux/platform_device.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>
-#include <soc/sifive/sifive_l2_cache.h>
+#include <linux/dma-map-ops.h>
#include <linux/clk.h>
#include <linux/reset.h>
@@ -55,7 +55,7 @@ IMG_UINT64 *cpu_cache_flush_addr = NULL;
extern void eswin_l2_flush64(phys_addr_t addr, size_t size);
#else
void eswin_l2_flush64(phys_addr_t addr, size_t size) {
- sifive_l2_flush64_range(addr,size);
+ arch_sync_dma_for_device(addr, size, DMA_TO_DEVICE);
};
#endif
void riscv_invalidate_addr(phys_addr_t addr, size_t size,IMG_BOOL virtual) {
--
2.47.0