qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh
@ 2025-02-06 22:53 dongwon.kim
  2025-02-14 14:06 ` Alex Bennée
  2025-02-14 17:08 ` [PATCH v2] " dongwon.kim
  0 siblings, 2 replies; 6+ messages in thread
From: dongwon.kim @ 2025-02-06 22:53 UTC (permalink / raw)
  To: qemu-devel

From: Dongwon Kim <dongwon.kim@intel.com>

This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
which causes some guest display corruption when gtk-gl-area
is used for GTK rendering (e.g. Wayland Compositor) possibly due to
simulataneous accesses on the guest frame buffer by host compositor
and the guest.

Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
 ui/gtk-gl-area.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 2c9a0db425..9f7dc697f2 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -129,7 +129,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
 
     if (vc->gfx.guest_fb.dmabuf &&
         qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
-        gd_gl_area_draw(vc);
         return;
     }
 
-- 
2.34.1



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

* Re: [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh
  2025-02-06 22:53 [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh dongwon.kim
@ 2025-02-14 14:06 ` Alex Bennée
  2025-02-14 15:26   ` Dmitry Osipenko
  2025-02-14 17:08 ` [PATCH v2] " dongwon.kim
  1 sibling, 1 reply; 6+ messages in thread
From: Alex Bennée @ 2025-02-14 14:06 UTC (permalink / raw)
  To: Dongwon Kim; +Cc: qemu-devel, Dmitry Osipenko

dongwon.kim@intel.com writes:

> From: Dongwon Kim <dongwon.kim@intel.com>
>
> This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
> which causes some guest display corruption when gtk-gl-area
> is used for GTK rendering (e.g. Wayland Compositor) possibly due to
> simulataneous accesses on the guest frame buffer by host compositor
> and the guest.
>
> Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>

This certainly fixes the corruption I was seeing while testing Dimitry's
native context patches and doesn't seem to affect the venus test modes.

So:

Tested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> ---
>  ui/gtk-gl-area.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
> index 2c9a0db425..9f7dc697f2 100644
> --- a/ui/gtk-gl-area.c
> +++ b/ui/gtk-gl-area.c
> @@ -129,7 +129,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
>  
>      if (vc->gfx.guest_fb.dmabuf &&
>          qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
> -        gd_gl_area_draw(vc);
>          return;
>      }

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

* Re: [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh
  2025-02-14 14:06 ` Alex Bennée
@ 2025-02-14 15:26   ` Dmitry Osipenko
  2025-02-14 16:41     ` Dmitry Osipenko
  0 siblings, 1 reply; 6+ messages in thread
From: Dmitry Osipenko @ 2025-02-14 15:26 UTC (permalink / raw)
  To: Alex Bennée, Dongwon Kim; +Cc: qemu-devel

On 2/14/25 17:06, Alex Bennée wrote:
> dongwon.kim@intel.com writes:
> 
>> From: Dongwon Kim <dongwon.kim@intel.com>
>>
>> This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
>> which causes some guest display corruption when gtk-gl-area
>> is used for GTK rendering (e.g. Wayland Compositor) possibly due to
>> simulataneous accesses on the guest frame buffer by host compositor
>> and the guest.
>>
>> Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
>> Reported-by: Alex Bennée <alex.bennee@linaro.org>
>> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
>> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> 
> This certainly fixes the corruption I was seeing while testing Dimitry's
> native context patches and doesn't seem to affect the venus test modes.
> 
> So:
> 
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> 
>> ---
>>  ui/gtk-gl-area.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
>> index 2c9a0db425..9f7dc697f2 100644
>> --- a/ui/gtk-gl-area.c
>> +++ b/ui/gtk-gl-area.c
>> @@ -129,7 +129,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
>>  
>>      if (vc->gfx.guest_fb.dmabuf &&
>>          qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
>> -        gd_gl_area_draw(vc);
>>          return;
>>      }
> 

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

-- 
Best regards,
Dmitry


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

* Re: [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh
  2025-02-14 15:26   ` Dmitry Osipenko
@ 2025-02-14 16:41     ` Dmitry Osipenko
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2025-02-14 16:41 UTC (permalink / raw)
  To: Alex Bennée, Dongwon Kim; +Cc: qemu-devel

On 2/14/25 18:26, Dmitry Osipenko wrote:
> On 2/14/25 17:06, Alex Bennée wrote:
>> dongwon.kim@intel.com writes:
>>
>>> From: Dongwon Kim <dongwon.kim@intel.com>
>>>
>>> This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
>>> which causes some guest display corruption when gtk-gl-area
>>> is used for GTK rendering (e.g. Wayland Compositor) possibly due to
>>> simulataneous accesses on the guest frame buffer by host compositor
>>> and the guest.
>>>
>>> Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
>>> Reported-by: Alex Bennée <alex.bennee@linaro.org>
>>> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
>>> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
>>> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
>>
>> This certainly fixes the corruption I was seeing while testing Dimitry's
>> native context patches and doesn't seem to affect the venus test modes.
>>
>> So:
>>
>> Tested-by: Alex Bennée <alex.bennee@linaro.org>
>> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
>>
>>> ---
>>>  ui/gtk-gl-area.c | 1 -
>>>  1 file changed, 1 deletion(-)
>>>
>>> diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
>>> index 2c9a0db425..9f7dc697f2 100644
>>> --- a/ui/gtk-gl-area.c
>>> +++ b/ui/gtk-gl-area.c
>>> @@ -129,7 +129,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
>>>  
>>>      if (vc->gfx.guest_fb.dmabuf &&
>>>          qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
>>> -        gd_gl_area_draw(vc);
>>>          return;
>>>      }
>>
> 
> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

I now noticed that the fixes tag is missing in the commit message. It
should be added as described in [1]. Also, use the get_maintainers.pl
script to CC all interested people. Submitting patches to QEMU works
same like in Linux kernel.

[1] https://www.qemu.org/docs/master/devel/submitting-a-patch.html

-- 
Best regards,
Dmitry


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

* [PATCH v2] ui/gtk-gl-area: Remove extra draw call in refresh
  2025-02-06 22:53 [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh dongwon.kim
  2025-02-14 14:06 ` Alex Bennée
@ 2025-02-14 17:08 ` dongwon.kim
  2025-05-06 10:59   ` Alex Bennée
  1 sibling, 1 reply; 6+ messages in thread
From: dongwon.kim @ 2025-02-14 17:08 UTC (permalink / raw)
  To: qemu-devel

From: Dongwon Kim <dongwon.kim@intel.com>

This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
which causes some guest display corruption when gtk-gl-area
is used for GTK rendering (e.g. Wayland Compositor) possibly due to
simulataneous accesses on the guest frame buffer by host compositor
and the guest.

v2: Added "Fixes" tag

Fixes: 77bf310084 ("ui/gtk: Draw guest frame at refresh cycle")
Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
 ui/gtk-gl-area.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 2c9a0db425..9f7dc697f2 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -129,7 +129,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
 
     if (vc->gfx.guest_fb.dmabuf &&
         qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
-        gd_gl_area_draw(vc);
         return;
     }
 
-- 
2.34.1



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

* Re: [PATCH v2] ui/gtk-gl-area: Remove extra draw call in refresh
  2025-02-14 17:08 ` [PATCH v2] " dongwon.kim
@ 2025-05-06 10:59   ` Alex Bennée
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2025-05-06 10:59 UTC (permalink / raw)
  To: dongwon.kim; +Cc: qemu-devel

dongwon.kim@intel.com writes:

> From: Dongwon Kim <dongwon.kim@intel.com>
>
> This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
> which causes some guest display corruption when gtk-gl-area
> is used for GTK rendering (e.g. Wayland Compositor) possibly due to
> simulataneous accesses on the guest frame buffer by host compositor
> and the guest.
>

btw in future keep v2 etc bellow the --- so the tooling can prune it
when applying.

> v2: Added "Fixes" tag

Queued to virtio-gpu/next, thanks.

>
> Fixes: 77bf310084 ("ui/gtk: Draw guest frame at refresh cycle")
> Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> Reported-by: Alex Bennée <alex.bennee@linaro.org>
> Tested-by: Alex Bennée <alex.bennee@linaro.org>
> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
> ---
>  ui/gtk-gl-area.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
> index 2c9a0db425..9f7dc697f2 100644
> --- a/ui/gtk-gl-area.c
> +++ b/ui/gtk-gl-area.c
> @@ -129,7 +129,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
>  
>      if (vc->gfx.guest_fb.dmabuf &&
>          qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
> -        gd_gl_area_draw(vc);
>          return;
>      }

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


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

end of thread, other threads:[~2025-05-06 10:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 22:53 [PATCH] ui/gtk-gl-area: Remove extra draw call in refresh dongwon.kim
2025-02-14 14:06 ` Alex Bennée
2025-02-14 15:26   ` Dmitry Osipenko
2025-02-14 16:41     ` Dmitry Osipenko
2025-02-14 17:08 ` [PATCH v2] " dongwon.kim
2025-05-06 10:59   ` Alex Bennée

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