From: Jocelyn Falempe <jfalempe@redhat.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>,
	Tvrtko Ursulin <tursulin@ursulin.net>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Christian Brauner <brauner@kernel.org>,
	Andi Shyti <andi.shyti@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Subject: [PATCH] drm/i915/dmabuf: Flush the cache in vmap
Date: Fri, 24 Oct 2025 13:04:15 +0200	[thread overview]
Message-ID: <20251024110432.1313391-1-jfalempe@redhat.com> (raw)
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
next             reply	other threads:[~2025-10-24 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24 11:04 Jocelyn Falempe [this message]
2025-10-24 11:53 ` [PATCH] drm/i915/dmabuf: Flush the cache in vmap 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-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=20251024110432.1313391-1-jfalempe@redhat.com \
    --to=jfalempe@redhat.com \
    --cc=airlied@gmail.com \
    --cc=andi.shyti@linux.intel.com \
    --cc=brauner@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=tursulin@ursulin.net \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
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).