dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/i915/dmabuf: Flush the cache in vmap
@ 2025-10-24 11:04 Jocelyn Falempe
  2025-10-24 11:53 ` Tvrtko Ursulin
  0 siblings, 1 reply; 18+ messages in thread
From: Jocelyn Falempe @ 2025-10-24 11:04 UTC (permalink / raw)
  To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin,
	David Airlie, Simona Vetter, Christian Brauner, Andi Shyti,
	intel-gfx, dri-devel
  Cc: Jocelyn Falempe

On a lenovo se100 server, when using i915 GPU for rendering, and the
ast driver for display, the graphic output is corrupted, and almost
unusable.

Adding a clflush call in the vmap function fixes this issue
completely.

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
index f4f1c979d1b9..f6a8c1cbe4d1 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c
@@ -77,6 +77,7 @@ static int i915_gem_dmabuf_vmap(struct dma_buf *dma_buf,
 		return PTR_ERR(vaddr);
 
 	iosys_map_set_vaddr(map, vaddr);
+	drm_clflush_virt_range(vaddr, dma_buf->size);
 
 	return 0;
 }

base-commit: 0790925dadad0997580df6e32cdccd54316807f2
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-10-31 16:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 11:04 [PATCH] drm/i915/dmabuf: Flush the cache in vmap Jocelyn Falempe
2025-10-24 11:53 ` Tvrtko Ursulin
2025-10-24 12:40   ` Thomas Zimmermann
2025-10-24 13:33     ` Jocelyn Falempe
2025-10-24 15:18       ` Thomas Zimmermann
2025-10-24 15:55         ` Tvrtko Ursulin
2025-10-24 16:28           ` Jocelyn Falempe
2025-10-27  9:46           ` Jocelyn Falempe
2025-10-27 10:26             ` Thomas Zimmermann
2025-10-31 13:12               ` Tvrtko Ursulin
2025-10-31 15:04                 ` Jocelyn Falempe
2025-10-31 16:50                   ` Thomas Zimmermann
2025-10-31 16:48                 ` Thomas Zimmermann
2025-10-24 12:48   ` Jocelyn Falempe
2025-10-24 15:18     ` Tvrtko Ursulin
2025-10-24 16:32       ` Jocelyn Falempe
2025-10-24 16:49     ` Michel Dänzer
2025-10-27 10:23       ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).