dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Tvrtko Ursulin <tursulin@ursulin.net>,
	Jocelyn Falempe <jfalempe@redhat.com>,
	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
Subject: Re: [PATCH] drm/i915/dmabuf: Flush the cache in vmap
Date: Fri, 24 Oct 2025 14:40:47 +0200	[thread overview]
Message-ID: <d123d897-8e65-417b-ad3f-40fe5b49f2b1@suse.de> (raw)
In-Reply-To: <a1d6cf1f-02b6-4c89-84e2-4b2af39829ef@ursulin.net>

Hi

Am 24.10.25 um 13:53 schrieb Tvrtko Ursulin:
>
> 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?
>
> Wondering if some path is not calling dma_buf_begin/end_cpu_access().

Yes, ast doesn't call begin/end_cpu_access in [1].

Jocelyn, if that fixes the issue, feel free to send me a patch for review.

[1] 
https://elixir.bootlin.com/linux/v6.17.4/source/drivers/gpu/drm/ast/ast_mode.c

Best regards
Thomas

>
> 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
>

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



  reply	other threads:[~2025-10-24 12:40 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 [this message]
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

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=d123d897-8e65-417b-ad3f-40fe5b49f2b1@suse.de \
    --to=tzimmermann@suse.de \
    --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=jfalempe@redhat.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).