[PATCH 09/12] drm/xe: Handle DPT in system memory
Tvrtko Ursulin
tvrtko.ursulin at igalia.com
Fri Feb 21 10:17:28 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 8f559b19e8ab..a32f3603751a 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 "intel_display_types.h"
@@ -205,6 +206,8 @@ static int __xe_pin_fb_vma_dpt(const struct intel_framebuffer *fb,
if (dpt->vmap.is_iomem)
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