From a60ea88441e77eb8942ce17c90d542e89f6edd12 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 31 Aug 2022 12:48:11 +0200 Subject: [PATCH] stm-st-stm32mp: update weston bbappend and patches to version 10.0.2 Base recipe in Poky has been updated to that version, so we need to update the bbappend to prevent a bitbake parsing failure. NOTE: to review the patches once they are updated in 'meta-st-openstlinux'. Signed-off-by: Javier Viguera --- ...get-hdmi-output-with-several-outputs.patch | 8 +-- ...seless-code-from-new-Fragment-Shader.patch | 60 +++++++------------ .../0002-Force-to-close-all-output.patch | 8 +-- .../wayland/weston/0003-Disable-gles3.patch | 10 +--- ...er-Add-EGL_IMAGE_PRESERVED_KHR-to-ou.patch | 8 +-- ...10.0.1.bbappend => weston_10.0.2.bbappend} | 0 6 files changed, 31 insertions(+), 63 deletions(-) rename meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/{weston_10.0.1.bbappend => weston_10.0.2.bbappend} (100%) diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Allow-to-get-hdmi-output-with-several-outputs.patch b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Allow-to-get-hdmi-output-with-several-outputs.patch index 49893aa3e..192c553fc 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Allow-to-get-hdmi-output-with-several-outputs.patch +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Allow-to-get-hdmi-output-with-several-outputs.patch @@ -1,7 +1,6 @@ -From c2489e20f7803159444150ff03bd78fbf9b1bae4 Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Thu, 19 Mar 2020 12:15:19 +0100 -Subject: [PATCH 1/4] Allow to get hdmi output with several outputs +Subject: [PATCH] Allow to get hdmi output with several outputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -16,7 +15,7 @@ Signed-off-by: Yannick Fertré 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compositor/main.c b/compositor/main.c -index 322f2ff..055eed3 100644 +index 322f2ff57b28..055eed3bf7c2 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -2246,8 +2246,14 @@ drm_process_layoutput(struct wet_compositor *wet, struct wet_layoutput *lo) @@ -35,6 +34,3 @@ index 322f2ff..055eed3 100644 } } --- -2.25.1 - diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Remove-useless-code-from-new-Fragment-Shader.patch b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Remove-useless-code-from-new-Fragment-Shader.patch index 0eb24432e..f53a0d2cf 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Remove-useless-code-from-new-Fragment-Shader.patch +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0001-Remove-useless-code-from-new-Fragment-Shader.patch @@ -11,19 +11,17 @@ Change-Id: I37880d5fcb8487c77e084b289db8d2fb945c21ab Signed-off-by: Pierre-Yves MORDRET --- libweston/renderer-gl/fragment.glsl | 110 ++-------------------------- - libweston/renderer-gl/gl-shaders.c | 4 - - 2 files changed, 5 insertions(+), 109 deletions(-) + libweston/renderer-gl/gl-shaders.c | 5 -- + 2 files changed, 5 insertions(+), 110 deletions(-) diff --git a/libweston/renderer-gl/fragment.glsl b/libweston/renderer-gl/fragment.glsl -index cfadb88..f735ab3 100644 +index cfadb8859567..f735ab3a0a44 100644 --- a/libweston/renderer-gl/fragment.glsl +++ b/libweston/renderer-gl/fragment.glsl -@@ -40,37 +40,21 @@ - #define SHADER_VARIANT_Y_XUXV 5 - #define SHADER_VARIANT_XYUV 6 +@@ -42,33 +42,17 @@ #define SHADER_VARIANT_SOLID 7 #define SHADER_VARIANT_EXTERNAL 8 - + -/* enum gl_shader_color_curve */ -#define SHADER_COLOR_CURVE_IDENTITY 0 -#define SHADER_COLOR_CURVE_LUT_3x1D 1 @@ -31,7 +29,7 @@ index cfadb88..f735ab3 100644 #if DEF_VARIANT == SHADER_VARIANT_EXTERNAL #extension GL_OES_EGL_image_external : require #endif - + -#ifdef GL_FRAGMENT_PRECISION_HIGH -#define HIGHPRECISION highp -#else @@ -40,7 +38,7 @@ index cfadb88..f735ab3 100644 - -precision HIGHPRECISION float; +precision mediump float; - + /* * These undeclared identifiers will be #defined by a runtime generated code * snippet. @@ -52,42 +50,30 @@ index cfadb88..f735ab3 100644 - -compile_const bool c_need_color_pipeline = - c_color_pre_curve != SHADER_COLOR_CURVE_IDENTITY; - + vec4 yuva2rgba(vec4 yuva) - { - vec4 color_out; -@@ -92,10 +76,11 @@ yuva2rgba(vec4 yuva) - */ - color_out.r = Y + 1.59602678 * sv; +@@ -94,6 +78,7 @@ yuva2rgba(vec4 yuva) color_out.g = Y - 0.39176229 * su - 0.81296764 * sv; color_out.b = Y + 2.01723214 * su; - + + color_out.rgb *= yuva.w; color_out.a = yuva.w; - + return color_out; - } - -@@ -108,12 +93,10 @@ uniform sampler2D tex; - varying vec2 v_texcoord; - uniform sampler2D tex1; +@@ -110,8 +95,6 @@ uniform sampler2D tex1; uniform sampler2D tex2; uniform float alpha; uniform vec4 unicolor; -uniform HIGHPRECISION sampler2D color_pre_curve_lut_2d; -uniform HIGHPRECISION vec2 color_pre_curve_lut_scale_offset; - + vec4 sample_input_texture() - { - vec4 yuva = vec4(0.0, 0.0, 0.0, 1.0); -@@ -155,101 +138,18 @@ sample_input_texture() - } - +@@ -157,99 +140,16 @@ sample_input_texture() return yuva2rgba(yuva); } - + -/* - * Texture coordinates go from 0.0 to 1.0 corresponding to texture edges. - * When we do LUT look-ups with linear filtering, the correct range to sample @@ -145,11 +131,11 @@ index cfadb88..f735ab3 100644 main() { vec4 color; - + - /* Electrical (non-linear) RGBA values, may be premult or not */ + /* Electrical (non-linear) RGBA values, pre-multiplied */ color = sample_input_texture(); - + - if (c_need_color_pipeline) { - /* Ensure straight alpha */ - if (c_input_is_premult) { @@ -184,16 +170,14 @@ index cfadb88..f735ab3 100644 - color = vec4(0.0, 0.3, 0.0, 0.2) + color * 0.8; + /* View alpha (opacity) */ + color *= alpha; - + gl_FragColor = color; } diff --git a/libweston/renderer-gl/gl-shaders.c b/libweston/renderer-gl/gl-shaders.c -index 97f288c..65a4fc2 100644 +index 97f288c07c9e..c8e3d297e29c 100644 --- a/libweston/renderer-gl/gl-shaders.c +++ b/libweston/renderer-gl/gl-shaders.c -@@ -261,14 +261,10 @@ gl_shader_create(struct gl_renderer *gr, - shader->tex_uniforms[1] = glGetUniformLocation(shader->program, "tex1"); - shader->tex_uniforms[2] = glGetUniformLocation(shader->program, "tex2"); +@@ -263,11 +263,6 @@ gl_shader_create(struct gl_renderer *gr, shader->alpha_uniform = glGetUniformLocation(shader->program, "alpha"); shader->color_uniform = glGetUniformLocation(shader->program, "unicolor"); @@ -201,7 +185,7 @@ index 97f288c..65a4fc2 100644 - glGetUniformLocation(shader->program, "color_pre_curve_lut_2d"); - shader->color_pre_curve_lut_scale_offset_uniform = - glGetUniformLocation(shader->program, "color_pre_curve_lut_scale_offset"); - +- free(conf); - + wl_list_insert(&gr->shader_list, &shader->link); diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0002-Force-to-close-all-output.patch b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0002-Force-to-close-all-output.patch index 9b06b6058..d684f82cc 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0002-Force-to-close-all-output.patch +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0002-Force-to-close-all-output.patch @@ -1,7 +1,6 @@ -From 5d96505846d911c942a42f74c2a6f816f5c940b5 Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Thu, 19 Mar 2020 12:20:32 +0100 -Subject: [PATCH 2/4] Force to close all output +Subject: [PATCH] Force to close all output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -15,7 +14,7 @@ Signed-off-by: Yannick Fertré 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/compositor/main.c b/compositor/main.c -index 055eed3..ac366a0 100644 +index 055eed3bf7c2..ac366a01f8e6 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -2322,7 +2322,11 @@ drm_heads_changed(struct wl_listener *listener, void *arg) @@ -31,6 +30,3 @@ index 055eed3..ac366a0 100644 drm_head_disable(head); } else if (enabled && changed) { weston_log("Detected a monitor change on head '%s', " --- -2.25.1 - diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0003-Disable-gles3.patch b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0003-Disable-gles3.patch index 7951235ee..0034ae8e4 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0003-Disable-gles3.patch +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0003-Disable-gles3.patch @@ -1,7 +1,6 @@ -From 00384d5c39473f95868b1173aee81b763794de54 Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Tue, 26 Apr 2022 09:59:10 +0200 -Subject: [PATCH 3/4] Disable gles3 +Subject: [PATCH] Disable gles3 Signed-off-by: Christophe Priouzeau --- @@ -10,7 +9,7 @@ Signed-off-by: Christophe Priouzeau 2 files changed, 11 insertions(+) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c -index a5f5eae..2f7941f 100644 +index a5f5eae44f83..2f7941f942eb 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -29,7 +29,13 @@ @@ -28,7 +27,7 @@ index a5f5eae..2f7941f 100644 #include #include diff --git a/libweston/renderer-gl/gl-shader-config-color-transformation.c b/libweston/renderer-gl/gl-shader-config-color-transformation.c -index 21a4565..d5f2491 100644 +index 21a4565393fe..d5f249169219 100644 --- a/libweston/renderer-gl/gl-shader-config-color-transformation.c +++ b/libweston/renderer-gl/gl-shader-config-color-transformation.c @@ -25,7 +25,12 @@ @@ -44,6 +43,3 @@ index 21a4565..d5f2491 100644 #include #include --- -2.25.1 - diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0004-Revert-gl-renderer-Add-EGL_IMAGE_PRESERVED_KHR-to-ou.patch b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0004-Revert-gl-renderer-Add-EGL_IMAGE_PRESERVED_KHR-to-ou.patch index cb9fe5513..995b2d6b1 100644 --- a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0004-Revert-gl-renderer-Add-EGL_IMAGE_PRESERVED_KHR-to-ou.patch +++ b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston/0004-Revert-gl-renderer-Add-EGL_IMAGE_PRESERVED_KHR-to-ou.patch @@ -1,7 +1,6 @@ -From 45a8c37e9dbff9207d58846df048406bf54ce30b Mon Sep 17 00:00:00 2001 From: Christophe Priouzeau Date: Fri, 6 May 2022 11:41:10 +0200 -Subject: [PATCH 4/4] Revert gl-renderer: Add EGL_IMAGE_PRESERVED_KHR to our +Subject: [PATCH] Revert gl-renderer: Add EGL_IMAGE_PRESERVED_KHR to our attributes Signed-off-by: Christophe Priouzeau @@ -10,7 +9,7 @@ Signed-off-by: Christophe Priouzeau 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c -index 2f7941f..2ab707c 100644 +index 2f7941f942eb..2ab707c5650d 100644 --- a/libweston/renderer-gl/gl-renderer.c +++ b/libweston/renderer-gl/gl-renderer.c @@ -2152,7 +2152,7 @@ gl_renderer_attach_egl(struct weston_surface *es, struct weston_buffer *buffer, @@ -51,6 +50,3 @@ index 2f7941f..2ab707c 100644 if (attributes->modifier[0] != DRM_FORMAT_MOD_INVALID) { if (!gr->has_dmabuf_import_modifiers) --- -2.25.1 - diff --git a/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston_10.0.1.bbappend b/meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston_10.0.2.bbappend similarity index 100% rename from meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston_10.0.1.bbappend rename to meta-digi-arm/dynamic-layers/stm-st-stm32mp/recipes-graphics/wayland/weston_10.0.2.bbappend