summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-02-22 15:33:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-25 10:56:17 +0000
commitdb3b872493e9d34dd71c552ddcdf678f01a00d95 (patch)
tree99099b2fb0c2d6394cabebb4b3619326a2ff5500 /meta/recipes-devtools
parent0ad1f917057d23bafee9571c8d39fd30949b3065 (diff)
downloadpoky-db3b872493e9d34dd71c552ddcdf678f01a00d95.tar.gz
qemu: add a backported patch to fix egl-headless support
(From OE-Core rev: 7a2645575092684eec4bf7d96185f9e89141f4fe) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch50
-rw-r--r--meta/recipes-devtools/qemu/qemu_3.1.0.bb1
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch b/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch
new file mode 100644
index 0000000000..d9326c017a
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0001-egl-headless-add-egl_create_context.patch
@@ -0,0 +1,50 @@
1From 952e5d584f5aabe41298c278065fe628f3f7aa7a Mon Sep 17 00:00:00 2001
2From: Gerd Hoffmann <kraxel@redhat.com>
3Date: Thu, 29 Nov 2018 13:35:02 +0100
4Subject: [PATCH] egl-headless: add egl_create_context
5
6We must set the correct context (via eglMakeCurrent) before
7calling qemu_egl_create_context, so we need a thin wrapper and can't
8hook qemu_egl_create_context directly as ->dpy_gl_ctx_create callback.
9
10Reported-by: Frederik Carlier <frederik.carlier@quamotion.mobi>
11Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
12Message-id: 20181129123502.30129-1-kraxel@redhat.com
13
14Upstream-Status: Backport [https://git.qemu.org/?p=qemu.git;a=commit;h=952e5d584f5aabe41298c278065fe628f3f7aa7a]
15Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
16---
17 ui/egl-headless.c | 10 +++++++++-
18 1 file changed, 9 insertions(+), 1 deletion(-)
19
20diff --git a/ui/egl-headless.c b/ui/egl-headless.c
21index 4cf3bbc0e4..519e7bad32 100644
22--- a/ui/egl-headless.c
23+++ b/ui/egl-headless.c
24@@ -38,6 +38,14 @@ static void egl_gfx_switch(DisplayChangeListener *dcl,
25 edpy->ds = new_surface;
26 }
27
28+static QEMUGLContext egl_create_context(DisplayChangeListener *dcl,
29+ QEMUGLParams *params)
30+{
31+ eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE,
32+ qemu_egl_rn_ctx);
33+ return qemu_egl_create_context(dcl, params);
34+}
35+
36 static void egl_scanout_disable(DisplayChangeListener *dcl)
37 {
38 egl_dpy *edpy = container_of(dcl, egl_dpy, dcl);
39@@ -150,7 +158,7 @@ static const DisplayChangeListenerOps egl_ops = {
40 .dpy_gfx_update = egl_gfx_update,
41 .dpy_gfx_switch = egl_gfx_switch,
42
43- .dpy_gl_ctx_create = qemu_egl_create_context,
44+ .dpy_gl_ctx_create = egl_create_context,
45 .dpy_gl_ctx_destroy = qemu_egl_destroy_context,
46 .dpy_gl_ctx_make_current = qemu_egl_make_context_current,
47 .dpy_gl_ctx_get_current = qemu_egl_get_current_context,
48--
492.17.1
50
diff --git a/meta/recipes-devtools/qemu/qemu_3.1.0.bb b/meta/recipes-devtools/qemu/qemu_3.1.0.bb
index cd7cd67a3f..ea4277edde 100644
--- a/meta/recipes-devtools/qemu/qemu_3.1.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_3.1.0.bb
@@ -22,6 +22,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
22 file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ 22 file://0010-linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \
23 file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \ 23 file://0011-Revert-linux-user-fix-mmap-munmap-mprotect-mremap-sh.patch \
24 file://0001-Add-a-missing-X11-include.patch \ 24 file://0001-Add-a-missing-X11-include.patch \
25 file://0001-egl-headless-add-egl_create_context.patch \
25 " 26 "
26UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" 27UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
27 28