[PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true

2023-12-04 Thread Dongwon Kim
the current scanout render pipeline before the run state is changed to make sure the guest receives the response for the current frame submission. Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 12 1 file changed, 12 insertions(+) diff --git a/ui/gtk.c

[PATCH] ui/gtk-egl: apply scale factor when calculating window's dimension

2023-10-12 Thread Dongwon Kim
Scale factor needs to be applied when calculating width/height of the GTK windows. Cc: Marc-André Lureau Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index a1060fd80f..45c7544337

[PATCH] ui/gtk: full-screening all detached windows

2023-10-12 Thread Dongwon Kim
When turning on or off full-screen menu, all detached windows should be full-screened or un-full-screened altogether. Cc: Marc-André Lureau Signed-off-by: Dongwon Kim --- ui/gtk.c | 44 ++-- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git

[PATCH] ui/gtk: set scanout mode in gd_egl/gd_gl_area_scanout_texture

2023-07-24 Thread Dongwon Kim
rted-by: Volker Rümelin Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 1 + ui/gtk-gl-area.c | 1 + 2 files changed, 2 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 4c29ac10d0..a1060fd80f 100644 --- a/ui/gtk-egl

[PATCH] virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties

2023-07-12 Thread Dongwon Kim
Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf.c | 12 ++-- include/ui/console.h| 4 ++-- ui/dbus-listener.c | 8 ui/egl-helpers.c| 8 ui/gtk-egl.c| 8 ui/gtk

[RFC PATCH v2 6/9] ui/gtk: Add a new parameter to assign connectors/monitors to GFX VCs

2023-07-10 Thread Dongwon Kim
d Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Signed-off-by: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/gtk.h | 1 + qapi/ui.json | 26 - qemu-options.hx | 5 +- ui/gtk.c

[PATCH] ui/gtk: set scanout-mode right before scheduling draw

2023-07-06 Thread Dongwon Kim
: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 2 +- ui/gtk-gl-area.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index d59b8cd7d7..b0356d1969 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -238,7 +238,6 @@ void

[PATCH] ui/gtk: skip refresh if new dmabuf has been submitted

2023-07-06 Thread Dongwon Kim
Skip refresh if a new dmabuf (guest scanout frame) has already been submitted and ready to be drawn because the scanout will be updated with new frame anyway. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 ui/gtk-gl

[PATCH] virtio-gpu-udmabuf: replacing scanout_width/height with backing_width/height

2023-07-05 Thread Dongwon Kim
-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf.c | 8 include/ui/console.h| 4 ++-- ui/dbus-listener.c | 4 ++-- ui/egl-helpers.c| 4 ++-- ui/gtk-egl.c| 4 ++-- ui/gtk-gl-area.c| 4 ++-- 6 files changed, 14 insertions

[PATCH] ui/gtk: Make sure the right EGL context is currently bound

2023-06-28 Thread Dongwon Kim
Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 ui/gtk-gl-area.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 19130041bc..79f9f334f2 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -31,6 +31,8 @@ static void

[PATCH] ui/gtk: skip refresh if new dmabuf is submitted

2023-06-28 Thread Dongwon Kim
in dpy_gl_scanout_texture by any asynchronouse dpy_refresh call, which eventually cancels the drawing of the guest scanout texture. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 6 +- ui/gtk-gl-area.c | 6 +- 2 files changed, 10

[PATCH] virtio-gpu: replace the surface with null surface when resetting

2023-06-27 Thread Dongwon Kim
ULL. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 5 + ui/console.c| 11 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c in

[PATCH] virtio-gpu: do not replace surface when scanout is disabled

2023-06-27 Thread Dongwon Kim
scanout resource before sending out a new scanout resource. So it is better to leave the current scanout image until there is a new one flushed by the guest. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 1 - 1 file

[PATCH v2] ui/gtk: making dmabuf NULL when it's released.

2023-06-26 Thread Dongwon Kim
Set vc->gfx.guest_fb.dmabuf to NULL to prevent any further access to it after the dmabuf is released. v2: move declaration of vc inside ifdef Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 5 + 1 file changed, 5 insertions(+) d

[PATCH v2] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf

2023-06-26 Thread Dongwon Kim
Respond with VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY if it fails to create an udmabuf for the blob resource. v2: consolidated return statments and removed an unnecessary style change Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c

[PATCH] virtio-gpu-udmabuf: create udmabuf for blob even when iov_cnt == 1

2023-06-21 Thread Dongwon Kim
, which is at least bigger than one page size. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu

[PATCH] ui/gtk: making dmabuf NULL when it's released.

2023-06-21 Thread Dongwon Kim
Set vc->gfx.guest_fb.dmabuf to NULL to prevent any further access to it after the dmabuf is released. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c in

[PATCH] ui/gtk: set the area of the scanout texture correctly

2023-06-21 Thread Dongwon Kim
x and y offsets and width and height of the scanout texture is not correctly configured in case guest scanout frame is dmabuf. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 3 ++- ui/gtk-gl-area.c | 3 ++- 2 files changed, 4

[PATCH] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf

2023-06-21 Thread Dongwon Kim
Respond with VIRTIO_GPU_RESP_ERR_OUT_OF_MEMORY if it fails to create an udmabuf for the blob resource. Cc: Gerd Hoffmann Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw

[RFC PATCH 6/9] ui/gtk: Add a new parameter to assign connectors/monitors to GFX VCs

2023-06-20 Thread Dongwon Kim
pe Mathieu-Daudé Cc: Marc-André Lureau Signed-off-by: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/gtk.h | 1 + qapi/ui.json | 11 +- qemu-options.hx | 5 +- ui/gtk.c | 271 +++ 4 files changed, 263 insertions(+), 25

[RFC PATCH 4/9] ui/gtk: Disable the scanout when a detached tab is closed

2023-06-20 Thread Dongwon Kim
: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Signed-off-by: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 3 +++ ui/gtk-gl-area.c | 2 ++ ui/gtk.c | 1 + 3 files changed, 6 insertions(+) diff --git

[RFC PATCH 2/9] ui/gtk: set the ui size to 0 when invisible

2023-06-20 Thread Dongwon Kim
-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 84c50d835e..ff4a5c58ea 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1352,10 +1352,12 @@ static void

[RFC PATCH 1/9] ui/gtk: skip drawing guest scanout when associated VC is invisible

2023-06-20 Thread Dongwon Kim
alse' when the window is inactivated or closed. When invisible, QEMU will skip any of draw events. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- include/ui/gtk.h | 1 + ui/gtk-egl.

[RFC PATCH 7/9] ui/gtk: unblock gl if draw submitted already or fence is not yet signaled

2023-06-20 Thread Dongwon Kim
-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index f4c71454a3..e4ef1f7173 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -598,10 +598,21 @@ void

[RFC PATCH 9/9] ui/gtk: skip refresh/rendering if VC is invisible

2023-06-20 Thread Dongwon Kim
Skip any drawing activities if VC is invisible because it can't be finished. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 ui/gtk-gl-area.c | 4

[RFC PATCH 0/9] ui: guest displays multiple connectors suppport and hotplug in

2023-06-20 Thread Dongwon Kim
isplay gtk,gl=on,connector.0=eDP-1,connector.1=DP-1. Dongwon Kim (6): ui/gtk: skip drawing guest scanout when associated VC is invisible ui/gtk: set the ui size to 0 when invisible ui/gtk: reset visible flag when window is minimized ui/gtk: unblock gl if draw submitted already or fence

[RFC PATCH 8/9] ui/gtk: skip drawing if any of ctx/surface/image don't exist

2023-06-20 Thread Dongwon Kim
Rendering of scanout could be skipped if ctx/surface/image don't exist due to an asynchronous event such as monitors being disconnected. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon

[RFC PATCH 5/9] ui/gtk: Factor out tab window creation into a separate function

2023-06-20 Thread Dongwon Kim
: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Signed-off-by: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 71 +++- 1 file changed, 39 insertions(+), 32 deletions(-) diff --git a/ui

[RFC PATCH 3/9] ui/gtk: reset visible flag when window is minimized

2023-06-20 Thread Dongwon Kim
cks the pipeline to prevent a permanent lockup. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 37 + 1 file changed, 37 inserti

[RFC PATCH 3/3] ui/gtk: reset visible flag when window is minimized

2022-10-26 Thread Dongwon Kim
Add a callback for window-state-event that resets vc->gfx.visible when associated window is minimized and vice versa. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Thomas Huth Cc: Vivek Kasireddy Signed-off-by: Dong

[RFC PATCH 1/3] ui/gtk: skip drawing guest scanout when associated VC is invisible

2022-10-26 Thread Dongwon Kim
nactivated or untabified window is closed. If set to 'false', QEMU will stop scheduling render events until it is visible again. Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Thomas Huth Cc: Vivek Kasireddy Signed-off-by: D

[RFC PATCH 0/3] ui/gtk: no render event when vc is invisible

2022-10-26 Thread Dongwon Kim
er vc->gfx was added to indicate the visibilty status of VC for the mechanism. And resizing VC to 0 was used to inactivate the scanout , which eventually makes the guest display shown as disconnected on the guest's side. Dongwon Kim (3): ui/gtk: skip drawing guest scanout when associated VC is i

[RFC PATCH 2/3] ui/gtk: set the ui size to 0 when invisible

2022-10-26 Thread Dongwon Kim
: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Marc-André Lureau Cc: Thomas Huth Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index a1fb42f34d

[PATCH] ui/gtk: prevent ui lock up when dpy_gl_update called again before current draw event occurs

2022-10-21 Thread Dongwon Kim
uld not schedule any redundant draw event in case draw_submitted is already set in gd_egl_fluch/gd_gl_area_scanout_flush. Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 2 +- ui/gtk-gl-area.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) dif

[PATCH] ui/gtk-egl: egl context needs to be unbound in the end of gd_egl_switch

2022-09-28 Thread Dongwon Kim
Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index b5bffbab25..35f917ceb1 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -195,6 +195,9 @@ void gd_egl_switch(DisplayChangeListener *dcl, if (resized

[PATCH] virtio-gpu: update scanout if there is any area covered by the rect

2022-09-08 Thread Dongwon Kim
The scanout is currently updated only if the whole rect is inside the scanout space. This is not a correct condition because the scanout should be updated even a small area in the scanout space is covered by the rect. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 7

Re: [PATCH] virtio-gpu: update done only on the scanout associated with rect

2022-07-19 Thread Dongwon Kim
On Tue, Jul 19, 2022 at 01:15:26PM +0200, Gerd Hoffmann wrote: > On Fri, May 06, 2022 at 10:09:30AM -0700, Dongwon Kim wrote: > > On Fri, May 06, 2022 at 11:53:22AM +0400, Marc-André Lureau wrote: > > > Hi > > > > > > On Fri, May 6, 2022 at 1:46 AM Dongwon Kim

[PATCH v5 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-18 Thread Dongwon Kim
in the region of corresponding monitors. Usage: -display gtk,monitor.=,.. ex)-display gtk,monitor.0=1,monitor.1=0 Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json

[PATCH v5 1/2] ui/gtk: detach VCs for additional guest displays

2022-07-18 Thread Dongwon Kim
Signed-off-by: Dongwon Kim --- ui/gtk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 2a791dd2aa..e6878c3209 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1361,6 +1361,11 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque

[PATCH v5 0/2] handling guest multiple displays

2022-07-18 Thread Dongwon Kim
because the first virtual console (vc[0]) is always in graphic mode so we can simply detach all other graphic mode virtual consoles. - making sure detached window's size same as original surface size Dongwon Kim (2): ui/gtk: detach VCs for additional guest displays ui/gtk: a new a

Re: [PATCH v4 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-13 Thread Dongwon Kim
On Tue, Jul 12, 2022 at 08:11:08AM +0200, Markus Armbruster wrote: > Dongwon Kim writes: > > > New integer array parameter, 'monitor' is for specifying the target > > monitors where individual GTK windows are placed upon launching. > > > > Monitor numbers in the arr

[PATCH v4 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-11 Thread Dongwon Kim
in the region of corresponding monitors. Usage: -display gtk,monitor.=,.. ex)-display gtk,monitor.0=1,monitor.1=0 Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json

[PATCH v4 1/2] ui/gtk: detach VCs for additional guest displays

2022-07-11 Thread Dongwon Kim
Signed-off-by: Dongwon Kim --- ui/gtk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 2a791dd2aa..e6878c3209 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1361,6 +1361,11 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque

[PATCH v4 0/2] handling guest multiple displays

2022-07-11 Thread Dongwon Kim
making sure detached window's size same as original surface size Dongwon Kim (2): ui/gtk: detach VCS for additional guest displays (v4) ui/gtk: a new array param monitor to specify the target displays (v4) qapi/ui.json| 9 - qemu-options.hx | 3 ++- ui/gtk.c| 41 ++

Re: [PATCH v3 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-05 Thread Dongwon Kim
On Thu, Jun 30, 2022 at 05:19:26PM +0200, Markus Armbruster wrote: > Dongwon Kim writes: > > > New integer array parameter, 'monitor' is for specifying the target > > monitors where individual GTK windows are placed upon launching. > > > > Monitor numbers in the arr

Re: [PATCH v3 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-07-05 Thread Dongwon Kim
Thanks, yeah, I will remove '-' and resubmitt the patch. On Fri, Jul 01, 2022 at 11:58:48AM +0200, Gerd Hoffmann wrote: > Hi, > > > > +# @monitor: Array of numbers, each of which represents physical > > > +# monitor where GTK window containing a given VC will be > > > +#

[PATCH v3 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-06-29 Thread Dongwon Kim
: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json| 9 - qemu-options.hx | 3 ++- ui/gtk.c| 31 +-- 3 files changed, 39

[PATCH v3 1/3] ui/gtk: detach VCs for additional guest displays

2022-06-29 Thread Dongwon Kim
-by: Dongwon Kim --- ui/gtk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 2a791dd2aa..e6878c3209 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1361,6 +1361,11 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque

[PATCH v3 0/2] handling guest multiple displays

2022-06-29 Thread Dongwon Kim
d Hoffmann) - making sure detached window's size same as original surface size (Daniel P. Berrangé) Dongwon Kim (2): ui/gtk: detach VCS for additional guest displays (v3) ui/gtk: a new array param monitor to specify the target displays (v3) qapi/ui.json| 7 ++- qemu-options.hx |

Re: [PATCH v2 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-06-21 Thread Dongwon Kim
Hi Markus, On Mon, Jun 20, 2022 at 09:07:04AM +0200, Markus Armbruster wrote: > Dongwon Kim writes: > > > New integer array parameter, 'monitor' is for specifying the target > > displays where individual QEMU windows are placed upon launching. > > > > The arra

[PATCH v2 1/2] ui/gtk: detach VCS for additional guest displays

2022-06-15 Thread Dongwon Kim
-off-by: Dongwon Kim --- ui/gtk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 2a791dd2aa..e6878c3209 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1361,6 +1361,11 @@ static void gd_menu_untabify(GtkMenuItem *item, void *opaque

[PATCH v2 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-06-15 Thread Dongwon Kim
detached window, 2nd detached window, Main window] Usage example: -display gtk,monitor.0=0,monitor.1=1. Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json| 7

[PATCH v2 0/2] handling guest multiple displays

2022-06-15 Thread Dongwon Kim
mary guest display so we won't need n_gfx_vcs (Gerd Hoffmann) - making sure detached window's size same as original surface size (Daniel P. Berrangé) Dongwon Kim (2): ui/gtk: detach VCS for additional guest displays (v2) ui/gtk: a new array param monitor to specify the target displays (

Re: [PATCH 0/3] ui/gtk: new options, monitor and detach-all

2022-05-31 Thread Dongwon Kim
Dropping this. New series with suggested changes from reviewers can be found at https://lists.nongnu.org/archive/html/qemu-devel/2022-05/msg06245.html On Thu, Apr 28, 2022 at 04:13:01PM -0700, Dongwon Kim wrote: > This patch series introduces two new gtk optional parameters, monitor > and

[PATCH 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-05-31 Thread Dongwon Kim
detached window, 2nd detached window, Main window] Usage example: -display gtk,monitor.0=0,monitor.1=1. Cc: Daniel P. Berrangé Cc: Markus Armbruster Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json| 7

[PATCH 0/2] handling guest multiple displays

2022-05-31 Thread Dongwon Kim
hich would be useful if someone wants to directly full-screen individual guest scanouts to host's physical displays. Dongwon Kim (2): ui/gtk: detach VCS for additional guest displays ui/gtk: a new array param monitor to specify the target displays qapi/ui.json| 7 ++- qemu-options.hx |

[PATCH 1/2] ui/gtk: detach VCS for additional guest displays

2022-05-31 Thread Dongwon Kim
Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index c57c36749e..abfcf48547 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2304,6 +2304,8 @@ static void gtk_display_init(DisplayState *ds, DisplayOptions

Re: [PATCH 1/3] ui/gtk: new param monitor to specify target monitor for launching QEMU

2022-05-09 Thread Dongwon Kim
but it keeps getting error saying Invalid parameter type, expected 'array'. Do you know how to pass this arg? Thanks, DW On Tue, May 03, 2022 at 10:15:13AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 04:13:02PM -0700, Dongwon Kim wrote: > > Introducing a new integer

Re: [PATCH] virtio-gpu: update done only on the scanout associated with rect

2022-05-06 Thread Dongwon Kim
On Fri, May 06, 2022 at 11:53:22AM +0400, Marc-André Lureau wrote: > Hi > > On Fri, May 6, 2022 at 1:46 AM Dongwon Kim wrote: > > > It only needs to update the scanouts containing the rect area > > coming with the resource-flush request from the guest. > > > >

Re: [PATCH 3/3] ui/gtk: specify detached window's size and location

2022-05-06 Thread Dongwon Kim
On Fri, May 06, 2022 at 05:34:21PM +0100, Daniel P. Berrangé wrote: > On Tue, May 03, 2022 at 04:33:48PM -0700, Dongwon Kim wrote: > > I saw windows, especially, third and fourth ones are 1/4 size of > > the first when detached regardless of resolutions. > > > > And

[PATCH] virtio-gpu: update done only on the scanout associated with rect

2022-05-05 Thread Dongwon Kim
It only needs to update the scanouts containing the rect area coming with the resource-flush request from the guest. Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw

Re: [PATCH 1/3] ui/gtk: new param monitor to specify target monitor for launching QEMU

2022-05-03 Thread Dongwon Kim
On Tue, May 03, 2022 at 10:15:13AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 04:13:02PM -0700, Dongwon Kim wrote: > > Introducing a new integer parameter to specify the monitor where the > > Qemu window is placed upon launching. > > > > Monitor

Re: [PATCH 3/3] ui/gtk: specify detached window's size and location

2022-05-03 Thread Dongwon Kim
and make sure all detached windows are not overlapped each other. On Tue, May 03, 2022 at 10:17:46AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 04:13:04PM -0700, Dongwon Kim wrote: > > Specify location and size of detached window based on top level > > window's locatio

Re: [PATCH 2/3] ui/gtk: detach_all option for making all VCs detached upon starting

2022-05-03 Thread Dongwon Kim
On Tue, May 03, 2022 at 10:12:43AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 28, 2022 at 04:13:03PM -0700, Dongwon Kim wrote: > > With "detach-all=on" for display, QEMU starts with all VC windows > > detached automatically. > > > > If used with "ful

[PATCH 2/3] ui/gtk: detach_all option for making all VCs detached upon starting

2022-04-28 Thread Dongwon Kim
ened on monitor 0.) v2: update Since version to 7.1 Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json | 5 - ui/gtk.c | 47 --- 2 files changed, 48 insertions(+

[PATCH 3/3] ui/gtk: specify detached window's size and location

2022-04-28 Thread Dongwon Kim
Specify location and size of detached window based on top level window's location and size info when detachment happens. Cc: Philippe Mathieu-Daudé Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 13 + 1 file changed, 13

[PATCH 0/3] ui/gtk: new options, monitor and detach-all

2022-04-28 Thread Dongwon Kim
en multiple displays (max_output = n) are assigned to the guest os and each guest display needs to be full-screened to certain physical monitor. This can be achieved when these new parameters are properly configured together with existing full-screen option set to true. Dongwon Kim (3): ui/gt

[PATCH 1/3] ui/gtk: new param monitor to specify target monitor for launching QEMU

2022-04-28 Thread Dongwon Kim
: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- qapi/ui.json| 6 +- qemu-options.hx | 2 +- ui/gtk.c| 8 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index 059302a5ef..ddcea7349b 100644 --- a/qapi/ui.json

[PATCH 1/5] ui/gtk: new param monitor to specify target monitor for launching QEMU

2022-02-07 Thread Dongwon Kim
: sweeaun Cc: Khairul Anuar Romli Signed-off-by: Dongwon Kim --- qapi/ui.json| 6 +- qemu-options.hx | 2 +- ui/gtk.c| 8 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index d7567ac866..c2c677bb1c 100644 --- a/qapi/ui.json

[PATCH] ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd

2021-11-21 Thread Dongwon Kim
closing fence_fd for the current dmabuf. Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/gtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 7abe1a69d8..2a3a9db13f 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -589,11 +589,11

[PATCH v2] ui/gtk: new param monitor to specify target monitor for launching QEMU

2021-11-19 Thread Dongwon Kim
: Khairul Anuar Romli Signed-off-by: Dongwon Kim --- qapi/ui.json| 6 +- qemu-options.hx | 2 +- ui/gtk.c| 8 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/qapi/ui.json b/qapi/ui.json index d7567ac866..9dc1ad284f 100644 --- a/qapi/ui.json +++ b/qapi/ui.json

[PATCH] ui/gtk: mon_num parameter to specify target monitor for launching Qemu

2021-11-18 Thread Dongwon Kim
will make the Qemu window full-screened on the targetted monitor. Cc: Gerd Hoffmann Cc: Vivek Kasireddy Cc: sweeaun Cc: Khairul Anuar Romli Signed-off-by: Dongwon Kim --- qapi/ui.json| 7 ++- qemu-options.hx | 2 +- ui/gtk.c| 10 ++ 3 files changed, 17 insertions(+), 2

[PATCH] edid: Added support for 4k@60 Hz monitor

2021-11-16 Thread Dongwon Kim
From: Satyeshwar Singh Previously, the large modes (>1080p) that were generated by Qemu in its EDID were all 50 Hz. If we provide them to a Guest OS and the user selects one of these modes, then the OS by default only gets 50 FPS. This is especially true for Windows OS. With this patch, we are

[PATCH v3 5/6] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-11-04 Thread Dongwon Kim
width and height v3: updating stub function of virtio_gpu_update_dmabuf to match the type Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++- hw/display/virtio-gpu-udmabuf.c | 22 ++ hw/display/virtio

Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-11-04 Thread Dongwon Kim
021 at 05:41:10PM -0700, Dongwon Kim wrote: > > I double-checked the patch and also tried to build with --disable-opengl > > but couldn't find any issue. Can you please give me some hint? Like > > build errors you saw. What are changed by the patch are pretty much > > limi

[PATCH 4/6] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound

2021-11-04 Thread Dongwon Kim
gd_draw_event shouldn't try to repaint if surface does not exist for the VC. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 8da673c18c..d2892ea6b4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -778,6 +778,9

[PATCH v2 6/6] ui/gtk-egl: blitting partial guest fb to the proper scanout surface

2021-11-04 Thread Dongwon Kim
(previously position/size parameters were given to egl_fb_blit separately) (Vivek Kasireddy) changed the commit message as there is no interface change to egl_fb_blit Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/egl-helpers.c | 25

[PATCH v2 1/6] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context

2021-11-04 Thread Dongwon Kim
An old esurface should be destroyed and set to be NULL when doing un-tab and re-tab so that a new esurface an context can be created for the window widget that those will be bound to. v2: enabling opengl specific routines only when CONFIG_OPENGL is set Cc: Gerd Hoffmann Signed-off-by: Dongwon

[PATCH 2/6] ui/gtk-egl: make sure the right context is set as the current

2021-11-04 Thread Dongwon Kim
Making the vc->gfx.ectx current before handling texture associated with it Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index e912b20075..2164995098 100644 --- a/ui/gtk-egl.c +++ b/ui/

[PATCH v2 3/6] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl

2021-11-04 Thread Dongwon Kim
ure (Vivek Kasireddy) Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 2164995098..f2026e4b5c 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -155,6 +155,10 @@ void gd_egl_refr

Re: [PATCH v2 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-11-02 Thread Dongwon Kim
ue, Nov 02, 2021 at 02:51:54PM +0100, Gerd Hoffmann wrote: > On Mon, Jul 26, 2021 at 02:59:49PM -0700, Dongwon Kim wrote: > > When guest is running Linux/X11 with extended multiple displays mode > > enabled, > > the guest shares one scanout resource each time containing whole

[PATCH 3/4] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl

2021-11-02 Thread Dongwon Kim
ure (Vivek Kasireddy) Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 7c9629d6cc..8c55ed18fb 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -142,6 +142,10 @@ void gd_egl_refr

[PATCH v2 1/4] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context

2021-11-02 Thread Dongwon Kim
An old esurface should be destroyed and set to be NULL when doing un-tab and re-tab so that a new esurface an context can be created for the window widget that those will be bound to. v2: enabling opengl specific routines only when CONFIG_OPENGL is set Cc: Gerd Hoffmann Signed-off-by: Dongwon

[PATCH 4/4] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound

2021-11-02 Thread Dongwon Kim
gd_draw_event shouldn't try to repaint if surface does not exist for the VC. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 8da673c18c..d2892ea6b4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -778,6 +778,9

[PATCH 2/4] ui/gtk-egl: make sure the right context is set as the current

2021-11-02 Thread Dongwon Kim
Making the vc->gfx.ectx current before handling texture associated with it Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 72ce5e1f8f..7c9629d6cc 100644 --- a/ui/gtk-egl.c +++ b/ui/

[PATCH v2] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-24 Thread Dongwon Kim
msg Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf.c | 2 +- include/ui/console.h| 1 + ui/gtk-egl.c| 40 ++- ui/gtk-gl-area.c| 49 - 4

Re: [PATCH] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-23 Thread Dongwon Kim
On Fri, Sep 17, 2021 at 12:02:02PM +0200, Gerd Hoffmann wrote: > Hi, > > > +bool draw_submitted; > > +QemuMutex mutex; > > Why the mutex? I think all the code runs while holding the BQL so it > should be serialized. Gerd, I did more experiment and verified mutex is actually not

[PATCH 1/2] virtio-gpu: splitting one extended mode guest fb into n-scanouts

2021-09-17 Thread Dongwon Kim
width and height Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf.c | 22 ++ hw/display/virtio-gpu.c | 4 ++-- include/hw/virtio/virtio-gpu.h | 5 +++-- include/ui/console.h| 4 4 files changed

[PATCH 2/2] ui/gtk-egl: blitting partial guest fb to the proper scanout surface

2021-09-17 Thread Dongwon Kim
Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- ui/egl-helpers.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/ui/egl-helpers.c b/ui/egl-helpers.c index 385a3fa752..3a88245b67 100644 --- a/ui

Re: [PATCH] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-17 Thread Dongwon Kim
On Fri, Sep 17, 2021 at 12:02:02PM +0200, Gerd Hoffmann wrote: > Hi, > > > +bool draw_submitted; > > +QemuMutex mutex; > > Why the mutex? I think all the code runs while holding the BQL so it > should be serialized. Guest drawing process using blob is serialized

[PATCH 3/4] ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound

2021-09-16 Thread Dongwon Kim
gd_draw_event shouldn't try to repaint if surface does not exist for the VC. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/gtk.c b/ui/gtk.c index 92df3d4c5c..5346c331f4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -778,6 +778,9

[PATCH 4/4] ui/gtk-egl: guest fb texture needs to be regenerated when reinitializing egl

2021-09-16 Thread Dongwon Kim
ure (Vivek Kasireddy) Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 4 1 file changed, 4 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 7c9629d6cc..8c55ed18fb 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -142,6 +142,10 @@ void gd_egl_refr

[PATCH 0/4] ui/gtk-egl: fix for untab/tab problem

2021-09-16 Thread Dongwon Kim
This series fixes several problems happening while doing VC untab/tab. Dongwon Kim (4): ui/gtk-egl: un-tab and re-tab should destroy egl surface and context ui/gtk-egl: make sure the right context is set as the current ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound ui

[PATCH 2/4] ui/gtk-egl: make sure the right context is set as the current

2021-09-16 Thread Dongwon Kim
Making the vc->gfx.ectx current before handling texture associated with it Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 72ce5e1f8f..7c9629d6cc 100644 --- a/ui/gtk-egl.c +++ b/ui/

[PATCH 1/4] ui/gtk-egl: un-tab and re-tab should destroy egl surface and context

2021-09-16 Thread Dongwon Kim
An old esurface should be destroyed and set to be NULL when doing un-tab and re-tab so that a new esurface an context can be created for the window widget that those will be bound to. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim Signed-off-by: Khairul Anuar Romli --- ui/gtk.c | 16

[PATCH] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-16 Thread Dongwon Kim
iteration and the flag. Cc: Gerd Hoffmann Cc: Vivek Kasireddy Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu-udmabuf.c | 3 ++ include/ui/console.h| 3 ++ ui/gtk-egl.c| 44 +++ ui/gtk-gl-area.c| 53

[PATCH] virtio-gpu: no point of checking res->iov

2021-08-30 Thread Dongwon Kim
The code should check the opposite condition of res->iov because it will be null if virtio_gpu_create_mapping_iov fails and actually this checking is not even required because checking on ret covers all failing cases. Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 2 +- 1 file chan

Re: [PATCH 1/3] ui/gtk: adds status bar for expressing ups and fps

2021-07-27 Thread Dongwon Kim
. Berrangé wrote: > On Mon, Jul 26, 2021 at 03:25:49PM -0700, Dongwon Kim wrote: > > With a display option, "show-fps=on", qemu adds a status bar and print > > following performance numbers on the bar, > > > > ups = update per seconds - the rate the guest scanout is

[PATCH 3/3] virtio-gpu: call dpy_gl_frame_counter at every guest scanout flush

2021-07-26 Thread Dongwon Kim
dpy_gl_frame_counter needs to be called for guest scanout frame count to calculate and display the performance figure - ups, the guest FB update per seconds. Signed-off-by: Dongwon Kim --- hw/display/virtio-gpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/display/virtio-gpu.c b/hw

[PATCH 2/3] ui/gtk: calling gd_gl_frame_counter at every draw/swap

2021-07-26 Thread Dongwon Kim
For FPS calculation, gd_gl_frame_counter is called at every draw(gtk-gl-area) or swap(gtk-egl) activity. Signed-off-by: Dongwon Kim --- ui/gtk-egl.c | 2 ++ ui/gtk-gl-area.c | 1 + 2 files changed, 3 insertions(+) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index 2a2e6d3a17..ac56f5b9f4 100644

<    1   2   3   >