summaryrefslogtreecommitdiffstats
path: root/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu
diff options
context:
space:
mode:
Diffstat (limited to 'meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu')
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu.inc2
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0001-Remove-some-rvgpu-command-options.patch31
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0002-Add-agl-shell-desktop-and-xdg-shell-support.patch482
-rw-r--r--meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu_git.bb1
4 files changed, 17 insertions, 499 deletions
diff --git a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu.inc b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu.inc
index 4a8e5357..ef5762f4 100644
--- a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu.inc
+++ b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu.inc
@@ -1,5 +1,5 @@
PV = "0.0+git${SRCPV}"
-SRCREV = "4b1f508003a7bf36256d5cc81986ef733e4cc79b"
+SRCREV = "cd79224421fb2e3a0109c8e765264f5f39af9ef3"
BRANCH ?= "main"
SRC_URI = " \
git://github.com/unified-hmi/remote-virtio-gpu.git;protocol=https;branch=${BRANCH} \
diff --git a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0001-Remove-some-rvgpu-command-options.patch b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0001-Remove-some-rvgpu-command-options.patch
index 4548c53f..044c8420 100644
--- a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0001-Remove-some-rvgpu-command-options.patch
+++ b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0001-Remove-some-rvgpu-command-options.patch
@@ -1,7 +1,7 @@
-From 0fc1cf03f76d21cec5b859ff46bee146cd4e52f7 Mon Sep 17 00:00:00 2001
-From: murakami <murakami.kenta002@jp.panasonic.jp>
-Date: Fri, 28 Jul 2023 12:09:35 +0900
-Subject: [PATCH 1/2] Remove some rvgpu command options
+From fb9d1134906356b20ac698fca64a3c7de0dd111c Mon Sep 17 00:00:00 2001
+From: Fumiya Kohzu <kohzu.fumiya@jp.panasonic.com>
+Date: Mon, 20 Nov 2023 19:28:19 +0900
+Subject: [PATCH] Remove some rvgpu command options
Remove vsync and card_index option supports from remote-virtio-gpu,
because the kernel needs to be patched to run those options in
@@ -16,7 +16,7 @@ Upstream-Status: Inappropriate [embedded specific]
4 files changed, 5 insertions(+), 36 deletions(-)
diff --git a/include/rvgpu-proxy/gpu/rvgpu-gpu-device.h b/include/rvgpu-proxy/gpu/rvgpu-gpu-device.h
-index eb34b6a..76d747a 100644
+index 72adb07..29dc157 100644
--- a/include/rvgpu-proxy/gpu/rvgpu-gpu-device.h
+++ b/include/rvgpu-proxy/gpu/rvgpu-gpu-device.h
@@ -35,7 +35,6 @@ struct gpu_device;
@@ -28,10 +28,10 @@ index eb34b6a..76d747a 100644
unsigned int mem_limit;
unsigned long framerate;
diff --git a/src/rvgpu-proxy/gpu/rvgpu-gpu-device.c b/src/rvgpu-proxy/gpu/rvgpu-gpu-device.c
-index 947e81a..71f62ca 100644
+index 0db2d7f..6b84a0a 100644
--- a/src/rvgpu-proxy/gpu/rvgpu-gpu-device.c
+++ b/src/rvgpu-proxy/gpu/rvgpu-gpu-device.c
-@@ -528,7 +528,6 @@ struct gpu_device *gpu_device_init(int lo_fd, int efd, uint32_t cidx,
+@@ -655,7 +655,6 @@ struct gpu_device *gpu_device_init(int lo_fd, int efd, int capset,
if (capset != -1)
gpu_capset_init(g, capset);
@@ -39,7 +39,7 @@ index 947e81a..71f62ca 100644
info.config = (__u8 *)&g->config;
info.config_kick = g->config_fd;
-@@ -939,8 +938,6 @@ static void gpu_device_trigger_vsync(struct gpu_device *g,
+@@ -1013,8 +1012,6 @@ static void gpu_device_trigger_vsync(struct gpu_device *g,
return;
hdr->flags |= VIRTIO_GPU_FLAG_VSYNC;
@@ -49,7 +49,7 @@ index 947e81a..71f62ca 100644
if ((!vsync_ts.tv_sec) && (!vsync_ts.tv_nsec)) {
diff --git a/src/rvgpu-proxy/rvgpu-proxy.c b/src/rvgpu-proxy/rvgpu-proxy.c
-index 6ff4e19..d082b72 100644
+index b9958b8..b78ed1c 100644
--- a/src/rvgpu-proxy/rvgpu-proxy.c
+++ b/src/rvgpu-proxy/rvgpu-proxy.c
@@ -47,7 +47,6 @@ static void usage(void)
@@ -110,10 +110,10 @@ index 6ff4e19..d082b72 100644
params.mem_limit = (unsigned int)sanity_strtonum(
optarg, VMEM_MIN_MB, VMEM_MAX_MB, &errstr);
diff --git a/src/rvgpu-renderer/rvgpu-renderer.c b/src/rvgpu-renderer/rvgpu-renderer.c
-index 7166fb9..3e74289 100644
+index 2757827..b21a168 100644
--- a/src/rvgpu-renderer/rvgpu-renderer.c
+++ b/src/rvgpu-renderer/rvgpu-renderer.c
-@@ -52,7 +52,6 @@ static void usage(void)
+@@ -53,7 +53,6 @@ static void usage(void)
info("\t-f\t\tRun in fullscreen mode\n");
info("\t-p port\t\tport for listening (default: %u)\n",
RVGPU_DEFAULT_PORT);
@@ -121,7 +121,7 @@ index 7166fb9..3e74289 100644
info("\t-h\t\tShow this message\n");
info("\nNote:\n");
-@@ -185,12 +184,12 @@ int main(int argc, char **argv)
+@@ -186,13 +185,13 @@ int main(int argc, char **argv)
unsigned int res_id, scanout;
uint16_t port_nr = RVGPU_DEFAULT_PORT;
FILE *input_stream = stdout;
@@ -130,13 +130,14 @@ index 7166fb9..3e74289 100644
user_specified_scanouts = false;
memset(sp, 0, sizeof(sp));
+ memset(&pp, 0, sizeof(pp));
- while ((opt = getopt(argc, argv, "afhvi:c:s:S:b:B:p:g:")) != -1) {
+ while ((opt = getopt(argc, argv, "afhi:c:s:S:b:B:p:g:")) != -1) {
switch (opt) {
case 'a':
translucent = true;
-@@ -269,9 +268,6 @@ int main(int argc, char **argv)
+@@ -271,9 +270,6 @@ int main(int argc, char **argv)
errstr);
}
break;
@@ -146,7 +147,7 @@ index 7166fb9..3e74289 100644
case 'h':
usage();
exit(EXIT_SUCCESS);
-@@ -309,7 +305,7 @@ int main(int argc, char **argv)
+@@ -311,7 +307,7 @@ int main(int argc, char **argv)
}
while ((res_id = rvgpu_pr_dispatch(pr))) {
@@ -156,5 +157,5 @@ index 7166fb9..3e74289 100644
if (pp.capset)
--
-2.17.1
+2.25.1
diff --git a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0002-Add-agl-shell-desktop-and-xdg-shell-support.patch b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0002-Add-agl-shell-desktop-and-xdg-shell-support.patch
deleted file mode 100644
index db5a6922..00000000
--- a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu/0002-Add-agl-shell-desktop-and-xdg-shell-support.patch
+++ /dev/null
@@ -1,482 +0,0 @@
-From b60e0a361d29723643fe81b47bff8f86d5200258 Mon Sep 17 00:00:00 2001
-From: Kenta <murakami.kenta002@jp.panasonic.com>
-Date: Wed, 6 Sep 2023 18:44:22 +0900
-Subject: [PATCH] Add agl-shell-desktop and xdg-shell supports
-
----
- CMakeLists.txt | 25 +++
- include/rvgpu-renderer/renderer/rvgpu-egl.h | 9 +-
- src/rvgpu-renderer/CMakeLists.txt | 3 +
- src/rvgpu-renderer/backend/rvgpu-gbm.c | 2 +
- src/rvgpu-renderer/backend/rvgpu-wayland.c | 192 +++++++++++++++++---
- src/rvgpu-renderer/renderer/rvgpu-egl.c | 3 +
- src/rvgpu-renderer/rvgpu-renderer.c | 11 +-
- 7 files changed, 220 insertions(+), 25 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index f569ca2..85c875a 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -20,6 +20,31 @@ cmake_minimum_required(VERSION 3.2)
- project(rvgpu C)
- set(CMAKE_C_STANDARD 11)
-
-+find_program(WAYLAND_SCANNER_EXECUTABLE wayland-scanner)
-+
-+message("generating agl-shell-desktop client files from: agl-shell-desktop.xml")
-+
-+execute_process ( COMMAND mkdir ${CMAKE_BINARY_DIR}/protocol)
-+
-+execute_process ( COMMAND ${WAYLAND_SCANNER_EXECUTABLE} private-code
-+ ${CMAKE_SYSROOT}/usr/share/agl-compositor/protocols/agl-shell-desktop.xml
-+ ${CMAKE_BINARY_DIR}/protocol/agl-shell-desktop-protocol.c)
-+
-+execute_process ( COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
-+ ${CMAKE_SYSROOT}/usr/share/agl-compositor/protocols/agl-shell-desktop.xml
-+ ${CMAKE_BINARY_DIR}/protocol/agl-shell-desktop-protocol.h)
-+
-+message("generating agl-shell-desktop client files from: xdg-shell.xml")
-+
-+execute_process ( COMMAND ${WAYLAND_SCANNER_EXECUTABLE} private-code
-+ ${CMAKE_SYSROOT}/usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml
-+ ${CMAKE_BINARY_DIR}/protocol/xdg-shell-protocol.c)
-+
-+execute_process ( COMMAND ${WAYLAND_SCANNER_EXECUTABLE} client-header
-+ ${CMAKE_SYSROOT}/usr/share/wayland-protocols/stable/xdg-shell/xdg-shell.xml
-+ ${CMAKE_BINARY_DIR}/protocol/xdg-shell-protocol.h)
-+
-+
- if (CMAKE_SYSROOT AND NOT ENV{PKG_CONFIG_LIBDIR})
- set(ENV{PKG_CONFIG_DIR} "")
- set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_SYSROOT}/usr/lib/pkgconfig:${CMAKE_SYSROOT}/usr/share/pkgconfig")
-diff --git a/include/rvgpu-renderer/renderer/rvgpu-egl.h b/include/rvgpu-renderer/renderer/rvgpu-egl.h
-index ebd2bd2..dcff36a 100644
---- a/include/rvgpu-renderer/renderer/rvgpu-egl.h
-+++ b/include/rvgpu-renderer/renderer/rvgpu-egl.h
-@@ -59,6 +59,9 @@ struct rvgpu_scanout_params {
- uint32_t id; /**< ID for scanout window (i.e. IVI id)*/
- bool enabled; /**< enable/disable scanout */
- bool boxed; /**< box is set by user */
-+ struct rvgpu_box agl_win; /** Window position & limit on AGL */
-+ bool agl_win_set;
-+
- };
-
- struct rvgpu_scanout {
-@@ -118,6 +121,8 @@ struct rvgpu_egl_state {
- bool spawn_support;
-
- bool use_scissors;
-+
-+ bool user_specified_scanouts;
- };
-
- /** Initialize main context */
-@@ -150,11 +155,11 @@ void rvgpu_egl_destroy_scanout(struct rvgpu_egl_state *e,
-
- /** Draw Virgl output on the surface */
- void rvgpu_egl_draw(struct rvgpu_egl_state *e, struct rvgpu_scanout *s,
-- bool vsync);
-+ bool vsync);
-
- /** Redraw all scanouts with given resource id */
- void rvgpu_egl_drawall(struct rvgpu_egl_state *e, unsigned int res_id,
-- bool vsync);
-+ bool vsync);
-
- /* Async event handling */
- /** Call before polling */
-diff --git a/src/rvgpu-renderer/CMakeLists.txt b/src/rvgpu-renderer/CMakeLists.txt
-index dc5f5b0..c8a8c34 100644
---- a/src/rvgpu-renderer/CMakeLists.txt
-+++ b/src/rvgpu-renderer/CMakeLists.txt
-@@ -17,6 +17,8 @@
-
-
- add_executable(rvgpu-renderer
-+ ${CMAKE_BINARY_DIR}/protocol/agl-shell-desktop-protocol.c
-+ ${CMAKE_BINARY_DIR}/protocol/xdg-shell-protocol.c
- backend/rvgpu-wayland.c
- backend/rvgpu-gbm.c
- renderer/rvgpu-egl.c
-@@ -28,6 +30,7 @@ add_executable(rvgpu-renderer
- target_include_directories(rvgpu-renderer
- PRIVATE
- ${PROJECT_SOURCE_DIR}/include
-+ ${CMAKE_BINARY_DIR}/protocol
- ${extlibs_INCLUDE_DIRS}
- )
- target_compile_definitions(rvgpu-renderer PRIVATE _GNU_SOURCE)
-diff --git a/src/rvgpu-renderer/backend/rvgpu-gbm.c b/src/rvgpu-renderer/backend/rvgpu-gbm.c
-index 4194b0d..b2b3ed3 100644
---- a/src/rvgpu-renderer/backend/rvgpu-gbm.c
-+++ b/src/rvgpu-renderer/backend/rvgpu-gbm.c
-@@ -259,6 +259,8 @@ static void rvgpu_gbm_create_scanout(struct rvgpu_egl_state *e,
-
- eglMakeCurrent(e->dpy, s->surface, s->surface, e->context);
- glGenFramebuffers(1, &s->fb);
-+
-+ rvgpu_egl_draw(e, s, false);
- }
-
- static void rvgpu_gbm_page_flip_handler(int fd, unsigned int sequence,
-diff --git a/src/rvgpu-renderer/backend/rvgpu-wayland.c b/src/rvgpu-renderer/backend/rvgpu-wayland.c
-index 0aaeaa7..c00ff00 100644
---- a/src/rvgpu-renderer/backend/rvgpu-wayland.c
-+++ b/src/rvgpu-renderer/backend/rvgpu-wayland.c
-@@ -39,12 +39,18 @@
- #include <rvgpu-renderer/renderer/rvgpu-egl.h>
- #include <rvgpu-renderer/renderer/rvgpu-input.h>
-
-+#include "agl-shell-desktop-protocol.h"
-+#include "xdg-shell-protocol.h"
-+
- struct rvgpu_native {
- /* Window structures */
- struct wl_surface *surface;
- struct wl_shell_surface *shell_surface;
- struct wl_egl_window *egl_window;
- struct ivi_surface *ivi_surface;
-+ struct xdg_surface *xdg_surface;
-+ struct xdg_toplevel *xdg_toplevel;
-+ bool wait_for_configure;
- };
-
- struct rvgpu_wl_state {
-@@ -58,6 +64,9 @@ struct rvgpu_wl_state {
- struct wl_keyboard *keyboard;
- struct wl_shell *shell;
- struct ivi_application *ivi_app;
-+ struct xdg_wm_base *wm_base;
-+ struct agl_shell_desktop *agl_shell_desktop;
-+ struct wl_output *output;
-
- /* EGL structures */
- struct rvgpu_egl_state egl;
-@@ -78,6 +87,16 @@ static inline struct rvgpu_wl_state *to_wl(struct rvgpu_egl_state *e)
- return rvgpu_container_of(e, struct rvgpu_wl_state, egl);
- }
-
-+static void xdg_wm_base_ping(void *data, struct xdg_wm_base *shell,
-+ uint32_t serial)
-+{
-+ xdg_wm_base_pong(shell, serial);
-+}
-+
-+static const struct xdg_wm_base_listener xdg_wm_base_listener = {
-+ xdg_wm_base_ping,
-+};
-+
- static struct wl_seat_listener seat_listener;
-
- static void registry_add_object(void *data, struct wl_registry *registry,
-@@ -98,8 +117,17 @@ static void registry_add_object(void *data, struct wl_registry *registry,
- wl_registry_bind(registry, name, &wl_seat_interface, 1);
- wl_seat_add_listener(r->seat, &seat_listener, r);
- } else if (!strcmp(interface, "ivi_application")) {
-- r->ivi_app = wl_registry_bind(registry, name,
-- &ivi_application_interface, 1);
-+ r->ivi_app = wl_registry_bind(registry, name, &ivi_application_interface, 1);
-+ } else if (strcmp(interface, "xdg_wm_base") == 0) {
-+ r->wm_base = wl_registry_bind(registry, name,
-+ &xdg_wm_base_interface, 1);
-+ xdg_wm_base_add_listener(r->wm_base, &xdg_wm_base_listener, r);
-+ } else if (strcmp(interface, "agl_shell_desktop") == 0) {
-+ r->agl_shell_desktop = wl_registry_bind(registry, name,
-+ &agl_shell_desktop_interface, 1);
-+ } else if (strcmp(interface, "wl_output") == 0) {
-+ r->output = wl_registry_bind(registry, name,
-+ &wl_output_interface, 1);
- }
- }
-
-@@ -157,6 +185,57 @@ static const struct ivi_surface_listener ivi_surface_listener = {
- handle_ivi_surface_configure,
- };
-
-+static void handle_xdg_toplevel_configure(void *data,
-+ struct xdg_toplevel *xdg_toplevel,
-+ int32_t width, int32_t height, struct wl_array *states)
-+{
-+ (void)xdg_toplevel;
-+ struct rvgpu_scanout *s = data;
-+
-+ s->window.w = (unsigned int)width;
-+ s->window.h = (unsigned int)height;
-+
-+ wl_egl_window_resize(s->native->egl_window, width, height, 0, 0);
-+}
-+
-+static const struct xdg_toplevel_listener xdg_toplevel_listener = {
-+ handle_xdg_toplevel_configure,
-+};
-+
-+static struct config_param {
-+ struct rvgpu_egl_state *egl_state;
-+ struct rvgpu_scanout *scanout;
-+};
-+
-+static void handle_xdg_surface_configure(void *data,
-+ struct xdg_surface *surface, uint32_t serial)
-+{
-+ struct config_param *cp = data;
-+ struct rvgpu_scanout *s = cp->scanout;
-+ struct rvgpu_egl_state *egl = cp->egl_state;
-+
-+ if (surface == NULL)
-+ return;
-+
-+ xdg_surface_ack_configure(surface, serial);
-+ if (s->native->wait_for_configure) {
-+ if (egl->user_specified_scanouts){
-+ for (unsigned int i = 0; i < VIRTIO_GPU_MAX_SCANOUTS; i++) {
-+ if (egl->scanouts[i].params.enabled) {
-+ rvgpu_egl_draw(egl, &egl->scanouts[i], false);
-+ }
-+ }
-+ } else {
-+ rvgpu_egl_draw(egl, &egl->scanouts[0], false);
-+ }
-+ s->native->wait_for_configure = false;
-+ }
-+}
-+
-+static const struct xdg_surface_listener xdg_surface_listener = {
-+ handle_xdg_surface_configure,
-+};
-+
- static void pointer_handle_enter(void *data, struct wl_pointer *pointer,
- uint32_t serial, struct wl_surface *surface,
- wl_fixed_t sx, wl_fixed_t sy)
-@@ -493,6 +572,12 @@ static void rvgpu_wl_destroy_scanout(struct rvgpu_egl_state *e,
- if (s->native->ivi_surface)
- ivi_surface_destroy(s->native->ivi_surface);
-
-+ if (s->native->xdg_toplevel)
-+ xdg_toplevel_destroy(s->native->xdg_toplevel);
-+
-+ if (s->native->xdg_surface)
-+ xdg_surface_destroy(s->native->xdg_surface);
-+
- wl_surface_destroy(s->native->surface);
- free(s->native);
- }
-@@ -510,6 +595,12 @@ static void rvgpu_wl_free(struct rvgpu_egl_state *e)
- if (r->shell)
- wl_shell_destroy(r->shell);
-
-+ if (r->wm_base)
-+ xdg_wm_base_destroy(r->wm_base);
-+
-+ if (r->agl_shell_desktop)
-+ agl_shell_desktop_destroy(r->agl_shell_desktop);
-+
- wl_seat_destroy(r->seat);
- if (r->pointer)
- wl_pointer_destroy(r->pointer);
-@@ -564,6 +655,21 @@ static void rvgpu_wl_process_events(struct rvgpu_egl_state *e, const void *ev,
- }
- }
-
-+static void create_opaque_region(struct rvgpu_egl_state *e,
-+ struct rvgpu_scanout *s)
-+{
-+ struct rvgpu_wl_state *r = to_wl(e);
-+ struct wl_region *region =
-+ wl_compositor_create_region(r->comp);
-+ assert(region);
-+ wl_region_add(region, 0, 0, (int)s->window.w,
-+ (int)s->window.h);
-+ wl_surface_set_opaque_region(s->native->surface,
-+ region);
-+ wl_region_destroy(region);
-+}
-+
-+
- static void rvgpu_wl_set_scanout(struct rvgpu_egl_state *e,
- struct rvgpu_scanout *s)
- {
-@@ -572,15 +678,9 @@ static void rvgpu_wl_set_scanout(struct rvgpu_egl_state *e,
- if (!r->fullscreen) {
- s->window = s->virgl.box;
- if (s->native) {
-- if (!r->translucent) {
-- struct wl_region *region =
-- wl_compositor_create_region(r->comp);
-- wl_region_add(region, 0, 0, (int)s->window.w,
-- (int)s->window.h);
-- wl_surface_set_opaque_region(s->native->surface,
-- region);
-- wl_region_destroy(region);
-- }
-+ if (!r->translucent)
-+ create_opaque_region(e, s);
-+
- wl_egl_window_resize(s->native->egl_window,
- (int)s->window.w, (int)s->window.h,
- 0, 0);
-@@ -629,6 +729,59 @@ static void rvgpu_wl_create_scanout(struct rvgpu_egl_state *e,
- assert(n->ivi_surface);
- ivi_surface_add_listener(n->ivi_surface, &ivi_surface_listener,
- s);
-+
-+ } else if (r->wm_base) {
-+ if (r->agl_shell_desktop){
-+ /* Default create window at the center of the AGL homescreen */
-+ unsigned int agl_x = 0;
-+ unsigned int agl_y = 215;
-+ unsigned int agl_w = 1080;
-+ unsigned int agl_h = 1500;
-+ if (sp && sp->agl_win_set) {
-+ agl_x = sp->agl_win.x;
-+ agl_y = sp->agl_win.y;
-+ }
-+
-+ /*
-+ * Because we can not resize the surface automatically, window size
-+ * have to be fit to the size of renderer box.
-+ */
-+ if (sp && sp->boxed) {
-+ agl_w = s->window.w;
-+ agl_h = s->window.h;
-+ }
-+
-+ agl_shell_desktop_set_app_property(r->agl_shell_desktop,
-+ "rvgpu-renderer",
-+ AGL_SHELL_DESKTOP_APP_ROLE_POPUP,
-+ agl_x, agl_y,
-+ 0, 0, agl_w, agl_h,
-+ r->output);
-+ }
-+
-+ n->xdg_surface =
-+ xdg_wm_base_get_xdg_surface(r->wm_base, n->surface);
-+ assert(n->xdg_surface);
-+
-+ struct config_param *cp = malloc(sizeof(*cp));
-+ assert(cp);
-+
-+ cp->egl_state = e;
-+ cp->scanout = s;
-+
-+ xdg_surface_add_listener(n->xdg_surface,
-+ &xdg_surface_listener, cp);
-+ n->xdg_toplevel = xdg_surface_get_toplevel(n->xdg_surface);
-+ assert(n->xdg_toplevel);
-+
-+ xdg_toplevel_add_listener(n->xdg_toplevel,
-+ &xdg_toplevel_listener, s);
-+
-+ xdg_toplevel_set_app_id(n->xdg_toplevel, "rvgpu-renderer");
-+ wl_surface_commit(n->surface);
-+ n->wait_for_configure = true;
-+ create_opaque_region(e, s);
-+
- } else if (r->shell) {
- char title[32];
-
-@@ -654,16 +807,9 @@ static void rvgpu_wl_create_scanout(struct rvgpu_egl_state *e,
- NULL);
- } else {
- wl_shell_surface_set_toplevel(n->shell_surface);
-- if (!r->translucent) {
-- struct wl_region *region =
-- wl_compositor_create_region(r->comp);
-- assert(region);
-- wl_region_add(region, 0, 0, (int)s->window.w,
-- (int)s->window.h);
-- wl_surface_set_opaque_region(n->surface,
-- region);
-- wl_region_destroy(region);
-- }
-+ if (!r->translucent)
-+ create_opaque_region(e, s);
-+
- }
- }
-
-@@ -677,6 +823,10 @@ static void rvgpu_wl_create_scanout(struct rvgpu_egl_state *e,
- eglMakeCurrent(e->dpy, s->surface, s->surface, e->context);
-
- glGenFramebuffers(1, &s->fb);
-+
-+ if(!r->wm_base){
-+ rvgpu_egl_draw(e, s, false);
-+ }
- }
-
- static const struct rvgpu_egl_callbacks wl_callbacks = {
-diff --git a/src/rvgpu-renderer/renderer/rvgpu-egl.c b/src/rvgpu-renderer/renderer/rvgpu-egl.c
-index a9dd398..6918843 100644
---- a/src/rvgpu-renderer/renderer/rvgpu-egl.c
-+++ b/src/rvgpu-renderer/renderer/rvgpu-egl.c
-@@ -21,6 +21,7 @@
- #include <assert.h>
- #include <err.h>
- #include <stdlib.h>
-+#include <stdio.h>
-
- #include <rvgpu-renderer/renderer/rvgpu-egl.h>
-
-@@ -146,6 +147,7 @@ void rvgpu_egl_free(struct rvgpu_egl_state *e)
- e->cb->free(e);
- }
-
-+
- void rvgpu_egl_draw(struct rvgpu_egl_state *e, struct rvgpu_scanout *s,
- bool vsync)
- {
-@@ -191,6 +193,7 @@ void rvgpu_egl_draw(struct rvgpu_egl_state *e, struct rvgpu_scanout *s,
- (int)s->window.w, (int)s->window.h,
- GL_COLOR_BUFFER_BIT, GL_NEAREST);
- }
-+
- if (e->cb->draw)
- e->cb->draw(e, s, vsync);
- else
-diff --git a/src/rvgpu-renderer/rvgpu-renderer.c b/src/rvgpu-renderer/rvgpu-renderer.c
-index 3e74289..40b78d4 100644
---- a/src/rvgpu-renderer/rvgpu-renderer.c
-+++ b/src/rvgpu-renderer/rvgpu-renderer.c
-@@ -52,6 +52,7 @@ static void usage(void)
- info("\t-f\t\tRun in fullscreen mode\n");
- info("\t-p port\t\tport for listening (default: %u)\n",
- RVGPU_DEFAULT_PORT);
-+ info("\t-w\t\tSet AGL window position\n");
- info("\t-h\t\tShow this message\n");
-
- info("\nNote:\n");
-@@ -189,7 +190,7 @@ int main(int argc, char **argv)
-
- memset(sp, 0, sizeof(sp));
-
-- while ((opt = getopt(argc, argv, "afhi:c:s:S:b:B:p:g:")) != -1) {
-+ while ((opt = getopt(argc, argv, "afhi:c:s:S:b:w:B:p:g:")) != -1) {
- switch (opt) {
- case 'a':
- translucent = true;
-@@ -240,6 +241,13 @@ int main(int argc, char **argv)
- }
- cp->boxed = true;
- break;
-+ case 'w':
-+ if (sscanf(optarg, "%u,%u",
-+ &cp->agl_win.x, &cp->agl_win.y) != 2) {
-+ errx(1, "invalid AGL popup application window%s", optarg);
-+ }
-+ cp->agl_win_set = true;
-+ break;
- case 'i':
- cp->id = (uint32_t)sanity_strtonum(
- optarg, 1, UINT32_MAX, &errstr);
-@@ -300,7 +308,6 @@ int main(int argc, char **argv)
- s->params = sp[i];
- if (sp[i].enabled) {
- rvgpu_egl_create_scanout(egl, &egl->scanouts[i]);
-- rvgpu_egl_draw(egl, &egl->scanouts[i], false);
- }
- }
-
---
-2.25.1
-
diff --git a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu_git.bb b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu_git.bb
index 899f81bb..d59c15b2 100644
--- a/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu_git.bb
+++ b/meta-uhmi/meta-rvgpu/recipes-graphics/remote-virtio-gpu/remote-virtio-gpu_git.bb
@@ -7,7 +7,6 @@ require remote-virtio-gpu.inc
SRC_URI:append = " \
file://0001-Remove-some-rvgpu-command-options.patch \
- file://0002-Add-agl-shell-desktop-and-xdg-shell-support.patch \
"
S = "${WORKDIR}/git"