dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Jocelyn Falempe <jfalempe@redhat.com>
To: "Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"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,
	"Michel Dänzer" <mdaenzer@redhat.com>
Subject: Re: [PATCH] drm/i915/dmabuf: Flush the cache in vmap
Date: Fri, 24 Oct 2025 14:48:15 +0200	[thread overview]
Message-ID: <6757f62e-0b10-4fc5-a9cb-16006c723459@redhat.com> (raw)
In-Reply-To: <a1d6cf1f-02b6-4c89-84e2-4b2af39829ef@ursulin.net>

On 24/10/2025 13:53, Tvrtko Ursulin wrote:
> 
> On 24/10/2025 12:04, Jocelyn Falempe wrote:
>> 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.
> 
> AST is importing i915 allocated buffer in this use case, or how exactly 
> is the relationship?

I think it's mutter/gnome-shell who copy the buffer from i915 to ast, 
here is the logs:

gnome-shell[2079]: Failed to initialize accelerated iGPU/dGPU 
framebuffer sharing: Do not want to use software renderer (llvmpipe 
(LLVM 19.1.7, 256 bits)), falling back to CPU copy path
gnome-shell[1533]: Created gbm renderer for '/dev/dri/card0'
gnome-shell[1533]: GPU /dev/dri/card1 selected as primary

card0 is ast and card1 is i915

Do you think there is something missing in mutter?

(Added Michel Dänzer that may know more about mutter).

-- 

Jocelyn


> 
> Wondering if some path is not calling dma_buf_begin/end_cpu_access().
> 
> Regards,
> 
> Tvrtko
> 
>>
>> 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
> 


  parent reply	other threads:[~2025-10-24 12:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=6757f62e-0b10-4fc5-a9cb-16006c723459@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=mdaenzer@redhat.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).