[PATCH v3 5/8] drm/xe: Handle DPT in system memory
Tvrtko Ursulin
tvrtko.ursulin at igalia.com
Tue Mar 18 16:22:20 UTC 2025
If DPT is allocated from system memory it will be created in the default
write-back cached mode. This means we need to flush it after populating
otherwise nothing works.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at igalia.com>
---
drivers/gpu/drm/xe/display/xe_fb_pin.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/xe/display/xe_fb_pin.c b/drivers/gpu/drm/xe/display/xe_fb_pin.c
index bf47ba38e1e5..d11a003880dc 100644
--- a/drivers/gpu/drm/xe/display/xe_fb_pin.c
+++ b/drivers/gpu/drm/xe/display/xe_fb_pin.c
@@ -3,6 +3,7 @@
* Copyright © 2021 Intel Corporation
*/
+#include <drm/drm_cache.h>
#include <drm/ttm/ttm_bo.h>
#include "i915_vma.h"
@@ -206,6 +207,8 @@ static int __xe_pin_fb_vma_dpt(const struct intel_framebuffer *fb,
if (dpt->vmap.is_iomem && !xe_bo_is_vram(bo))
ggtt_flush_writes(tile0->mem.ggtt);
+ else if (!xe_bo_is_vram(dpt) && !xe_bo_is_stolen(dpt))
+ drm_clflush_virt_range(dpt->vmap.vaddr, dpt_size);
vma->dpt = dpt;
vma->node = dpt->ggtt_node[tile0->id];
--
2.48.0
More information about the Intel-xe
mailing list