summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-xilinx-bsp/recipes-graphics/weston/files/0001-gl-renderer.c-Use-gr-egl_config-to-create-pbuffer-su.patch84
-rw-r--r--meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch12
-rw-r--r--meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend4
3 files changed, 7 insertions, 93 deletions
diff --git a/meta-xilinx-bsp/recipes-graphics/weston/files/0001-gl-renderer.c-Use-gr-egl_config-to-create-pbuffer-su.patch b/meta-xilinx-bsp/recipes-graphics/weston/files/0001-gl-renderer.c-Use-gr-egl_config-to-create-pbuffer-su.patch
deleted file mode 100644
index d7d411f6..00000000
--- a/meta-xilinx-bsp/recipes-graphics/weston/files/0001-gl-renderer.c-Use-gr-egl_config-to-create-pbuffer-su.patch
+++ /dev/null
@@ -1,84 +0,0 @@
1From 7cc76d50bddd6ff1eb5fb19712415f385f5d3f49 Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
3Date: Mon, 3 Feb 2020 14:26:21 -0800
4Subject: [PATCH] gl-renderer.c: Use gr->egl_config to create pbuffer surface
5
6The original implementation always chose first egl config for pbuffer
7surface type, however the returned configs are implementation specific
8and egl config may not always match between ctx and surface. Hence,
9use gr->egl_config which already has the matching config but ensure that
10windows and pbuffer bit are set for the surface type.
11
12Signed-off-by: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
13Upstream-status: Pending
14---
15 libweston/renderer-gl/gl-renderer.c | 28 ++++++++++++++--------------
16 1 file changed, 14 insertions(+), 14 deletions(-)
17
18diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
19index 54f8b1c..f50c959 100644
20--- a/libweston/renderer-gl/gl-renderer.c
21+++ b/libweston/renderer-gl/gl-renderer.c
22@@ -3567,7 +3567,7 @@ gl_renderer_setup_egl_extensions(struct weston_compositor *ec)
23 }
24
25 static const EGLint gl_renderer_opaque_attribs[] = {
26- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
27+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
28 EGL_RED_SIZE, 1,
29 EGL_GREEN_SIZE, 1,
30 EGL_BLUE_SIZE, 1,
31@@ -3577,7 +3577,7 @@ static const EGLint gl_renderer_opaque_attribs[] = {
32 };
33
34 static const EGLint gl_renderer_alpha_attribs[] = {
35- EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
36+ EGL_SURFACE_TYPE, EGL_WINDOW_BIT | EGL_PBUFFER_BIT,
37 EGL_RED_SIZE, 1,
38 EGL_GREEN_SIZE, 1,
39 EGL_BLUE_SIZE, 1,
40@@ -3682,15 +3682,7 @@ static int
41 gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) {
42 EGLConfig pbuffer_config;
43
44- static const EGLint pbuffer_config_attribs[] = {
45- EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
46- EGL_RED_SIZE, 1,
47- EGL_GREEN_SIZE, 1,
48- EGL_BLUE_SIZE, 1,
49- EGL_ALPHA_SIZE, 0,
50- EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
51- EGL_NONE
52- };
53+ EGLint surface_type;
54
55 static const EGLint pbuffer_attribs[] = {
56 EGL_WIDTH, 10,
57@@ -3698,13 +3690,21 @@ gl_renderer_create_pbuffer_surface(struct gl_renderer *gr) {
58 EGL_NONE
59 };
60
61- if (egl_choose_config(gr, pbuffer_config_attribs, NULL, 0, &pbuffer_config) < 0) {
62- weston_log("failed to choose EGL config for PbufferSurface\n");
63+ if(!eglGetConfigAttrib(gr->egl_display, gr->egl_config, EGL_SURFACE_TYPE, &surface_type)) {
64+ weston_log("failed to get surface type for PbufferSurface\n");
65+ return -1;
66+ }
67+
68+ if (!((surface_type & EGL_WINDOW_BIT) && (surface_type & EGL_PBUFFER_BIT)) &&
69+ !gr->has_configless_context) {
70+ weston_log("attempted to use a different EGL config for an "
71+ "output but EGL_KHR_no_config_context or "
72+ "EGL_MESA_configless_context is not supported\n");
73 return -1;
74 }
75
76 gr->dummy_surface = eglCreatePbufferSurface(gr->egl_display,
77- pbuffer_config,
78+ gr->egl_config,
79 pbuffer_attribs);
80
81 if (gr->dummy_surface == EGL_NO_SURFACE) {
82--
832.7.4
84
diff --git a/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch b/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch
index e8e8a1f0..33d33b0f 100644
--- a/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch
+++ b/meta-xilinx-bsp/recipes-graphics/weston/files/0001-libweston-Remove-substitute-format-for-ARGB8888.patch
@@ -1,6 +1,6 @@
1From 77afc64239199f75041ec344f8f886ee20bba0f8 Mon Sep 17 00:00:00 2001 1From 3fbb596e53524e78703b76c4fdc33cd6ac62f777 Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com> 2From: Madhurkiran Harikrishnan <madhurkiran.harikrishnan@xilinx.com>
3Date: Tue, 11 Feb 2020 19:07:45 -0800 3Date: Fri, 11 Dec 2020 16:21:38 -0800
4Subject: [PATCH] libweston: Remove substitute format for ARGB8888 4Subject: [PATCH] libweston: Remove substitute format for ARGB8888
5 5
6Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same 6Xilinx DP gfx layer does not support XRGB8888. Hence, remove the same
@@ -13,17 +13,17 @@ Upstream-Status : Inappropriate [Xilinx specific]
13 1 file changed, 1 deletion(-) 13 1 file changed, 1 deletion(-)
14 14
15diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c 15diff --git a/libweston/pixel-formats.c b/libweston/pixel-formats.c
16index b96f3b2..e2a7715 100644 16index 79dc709..ec2d3b7 100644
17--- a/libweston/pixel-formats.c 17--- a/libweston/pixel-formats.c
18+++ b/libweston/pixel-formats.c 18+++ b/libweston/pixel-formats.c
19@@ -165,7 +165,6 @@ static const struct pixel_format_info pixel_format_table[] = { 19@@ -193,7 +193,6 @@ static const struct pixel_format_info pixel_format_table[] = {
20 },
21 { 20 {
22 DRM_FORMAT(ARGB8888), 21 DRM_FORMAT(ARGB8888),
22 BITS_RGBA_FIXED(8, 8, 8, 8),
23- .opaque_substitute = DRM_FORMAT_XRGB8888, 23- .opaque_substitute = DRM_FORMAT_XRGB8888,
24 .depth = 32, 24 .depth = 32,
25 .bpp = 32, 25 .bpp = 32,
26 GL_FORMAT(GL_BGRA_EXT), 26 GL_FORMAT(GL_BGRA_EXT),
27-- 27--
282.7.4 282.17.1
29 29
diff --git a/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend b/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend
index a13b627a..d1912a81 100644
--- a/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend
+++ b/meta-xilinx-bsp/recipes-graphics/weston/weston_%.bbappend
@@ -1,5 +1,3 @@
1FILESEXTRAPATHS_prepend_zynqmp := "${THISDIR}/files:" 1FILESEXTRAPATHS_prepend_zynqmp := "${THISDIR}/files:"
2 2
3SRC_URI_append_zynqmp = " file://0001-gl-renderer.c-Use-gr-egl_config-to-create-pbuffer-su.patch \ 3SRC_URI_append_zynqmp = " file://0001-libweston-Remove-substitute-format-for-ARGB8888.patch"
4 file://0001-libweston-Remove-substitute-format-for-ARGB8888.patch \
5 "