* [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago
@ 2025-07-31 18:16 Andrew Davis
2025-07-31 18:47 ` Denys Dmytriyenko
2025-08-05 14:56 ` Daniel Schultz
0 siblings, 2 replies; 6+ messages in thread
From: Andrew Davis @ 2025-07-31 18:16 UTC (permalink / raw)
To: Denys Dmytriyenko, Ryan Eatmon, meta-ti; +Cc: Andrew Davis
This change is needed due to the SGX driver, any distro, not just Arago,
using a TI SoC with SGX will need this fix, so it should go in meta-ti.
Signed-off-by: Andrew Davis <afd@ti.com>
---
.../wayland/weston-ti-version.inc | 7 ++
...equire-GL_EXT_unpack_subimage-commit.patch | 95 +++++++++++++++++++
.../wayland/weston_14.0.%.bbappend | 4 +
3 files changed, 106 insertions(+)
create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
new file mode 100644
index 00000000..fafef724
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
+
+PR:append = ".ti-soc1"
+
+SRC_URI += " \
+ file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
+"
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
new file mode 100644
index 00000000..fbe8f2bb
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
@@ -0,0 +1,95 @@
+From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@konsulko.com>
+Date: Thu, 6 Jul 2023 01:48:41 +0000
+Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
+
+This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
+
+That commit removed support for GPU drivers without GL_EXT_unpack_subimage
+which SGX does not support. Add back support for GPUs without this
+extension.
+
+Upstream-Status: Inappropriate [specific to TI SGX]
+
+Signed-off-by: Andrew Davis <afd@ti.com>
+Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
+
+---
+ libweston/renderer-gl/gl-renderer-internal.h | 2 ++
+ libweston/renderer-gl/gl-renderer.c | 29 ++++++++++++++++----
+ 2 files changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
+index 5032035..85616c9 100644
+--- a/libweston/renderer-gl/gl-renderer-internal.h
++++ b/libweston/renderer-gl/gl-renderer-internal.h
+@@ -229,6 +229,8 @@ struct gl_renderer {
+ PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
+ bool has_platform_base;
+
++ bool has_unpack_subimage;
++
+ PFNEGLBINDWAYLANDDISPLAYWL bind_display;
+ PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
+ PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
+diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
+index e694418b..2be6d621 100644
+--- a/libweston/renderer-gl/gl-renderer.c
++++ b/libweston/renderer-gl/gl-renderer.c
+@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+ struct weston_surface *surface = pnode->surface;
+ const struct weston_testsuite_quirks *quirks =
+ &surface->compositor->test_data.test_quirks;
++ struct gl_renderer *gr = get_renderer(surface->compositor);
+ struct weston_buffer *buffer = surface->buffer_ref.buffer;
+ struct gl_surface_state *gs = get_surface_state(surface);
+ struct gl_buffer_state *gb = gs->buffer;
+@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+
+ data = wl_shm_buffer_get_data(buffer->shm_buffer);
+
++ if (!gr->has_unpack_subimage) {
++ wl_shm_buffer_begin_access(buffer->shm_buffer);
++ for (j = 0; j < gs->buffer->num_textures; j++) {
++ glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
++ glTexImage2D(GL_TEXTURE_2D, 0,
++ gs->buffer->gl_format[j],
++ gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
++ buffer->height / pixel_format_vsub(buffer->pixel_format, j),
++ 0,
++ gl_format_from_internal(gs->buffer->gl_format[j]),
++ gs->buffer->gl_pixel_type,
++ data + gs->buffer->offset[j]);
++ }
++ wl_shm_buffer_end_access(buffer->shm_buffer);
++
++ goto done;
++ }
++
+ if (gb->needs_full_upload || quirks->gl_force_full_upload) {
+ wl_shm_buffer_begin_access(buffer->shm_buffer);
+
+@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
+ else
+ ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
+
+- if (gr->gl_version < gr_gl_version(3, 0) &&
+- !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
+- weston_log("GL_EXT_unpack_subimage not available.\n");
+- return -1;
+- }
++ if (gr->gl_version >= gr_gl_version(3, 0) ||
++ weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
++ gr->has_unpack_subimage = true;
+
+ if (gr->gl_version >= gr_gl_version(3, 0) ||
+ weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
+@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
+ gr_gl_version_minor(gr->gl_version));
+ weston_log_continue(STAMP_SPACE "read-back format: %s\n",
+ ec->read_format->drm_format_name);
++ weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
++ gr->has_unpack_subimage ? "yes" : "no");
+ weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
+ yesno(gr->has_pack_reverse));
+ weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
new file mode 100644
index 00000000..cf4f530a
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
@@ -0,0 +1,4 @@
+WESTON_TI_VERSION = ""
+WESTON_TI_VERSION:ti-soc = "${BPN}-ti-version.inc"
+
+require ${WESTON_TI_VERSION}
--
2.39.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago
2025-07-31 18:16 [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago Andrew Davis
@ 2025-07-31 18:47 ` Denys Dmytriyenko
2025-08-05 14:56 ` Daniel Schultz
1 sibling, 0 replies; 6+ messages in thread
From: Denys Dmytriyenko @ 2025-07-31 18:47 UTC (permalink / raw)
To: afd; +Cc: Denys Dmytriyenko, Ryan Eatmon, meta-ti
On Thu, Jul 31, 2025 at 01:16:17PM -0500, Andrew Davis via lists.yoctoproject.org wrote:
> This change is needed due to the SGX driver, any distro, not just Arago,
> using a TI SoC with SGX will need this fix, so it should go in meta-ti.
>
> Signed-off-by: Andrew Davis <afd@ti.com>
Acked-by: Denys Dmytriyenko <denys@konsulko.com>
> ---
> .../wayland/weston-ti-version.inc | 7 ++
> ...equire-GL_EXT_unpack_subimage-commit.patch | 95 +++++++++++++++++++
> .../wayland/weston_14.0.%.bbappend | 4 +
> 3 files changed, 106 insertions(+)
> create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
> create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
> create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>
> diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
> new file mode 100644
> index 00000000..fafef724
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
> @@ -0,0 +1,7 @@
> +FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
> +
> +PR:append = ".ti-soc1"
> +
> +SRC_URI += " \
> + file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
> +"
> diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
> new file mode 100644
> index 00000000..fbe8f2bb
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
> @@ -0,0 +1,95 @@
> +From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
> +From: Denys Dmytriyenko <denys@konsulko.com>
> +Date: Thu, 6 Jul 2023 01:48:41 +0000
> +Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
> +
> +This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
> +
> +That commit removed support for GPU drivers without GL_EXT_unpack_subimage
> +which SGX does not support. Add back support for GPUs without this
> +extension.
> +
> +Upstream-Status: Inappropriate [specific to TI SGX]
> +
> +Signed-off-by: Andrew Davis <afd@ti.com>
> +Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
> +
> +---
> + libweston/renderer-gl/gl-renderer-internal.h | 2 ++
> + libweston/renderer-gl/gl-renderer.c | 29 ++++++++++++++++----
> + 2 files changed, 26 insertions(+), 5 deletions(-)
> +
> +diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
> +index 5032035..85616c9 100644
> +--- a/libweston/renderer-gl/gl-renderer-internal.h
> ++++ b/libweston/renderer-gl/gl-renderer-internal.h
> +@@ -229,6 +229,8 @@ struct gl_renderer {
> + PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
> + bool has_platform_base;
> +
> ++ bool has_unpack_subimage;
> ++
> + PFNEGLBINDWAYLANDDISPLAYWL bind_display;
> + PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
> + PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
> +diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
> +index e694418b..2be6d621 100644
> +--- a/libweston/renderer-gl/gl-renderer.c
> ++++ b/libweston/renderer-gl/gl-renderer.c
> +@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
> + struct weston_surface *surface = pnode->surface;
> + const struct weston_testsuite_quirks *quirks =
> + &surface->compositor->test_data.test_quirks;
> ++ struct gl_renderer *gr = get_renderer(surface->compositor);
> + struct weston_buffer *buffer = surface->buffer_ref.buffer;
> + struct gl_surface_state *gs = get_surface_state(surface);
> + struct gl_buffer_state *gb = gs->buffer;
> +@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
> +
> + data = wl_shm_buffer_get_data(buffer->shm_buffer);
> +
> ++ if (!gr->has_unpack_subimage) {
> ++ wl_shm_buffer_begin_access(buffer->shm_buffer);
> ++ for (j = 0; j < gs->buffer->num_textures; j++) {
> ++ glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
> ++ glTexImage2D(GL_TEXTURE_2D, 0,
> ++ gs->buffer->gl_format[j],
> ++ gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
> ++ buffer->height / pixel_format_vsub(buffer->pixel_format, j),
> ++ 0,
> ++ gl_format_from_internal(gs->buffer->gl_format[j]),
> ++ gs->buffer->gl_pixel_type,
> ++ data + gs->buffer->offset[j]);
> ++ }
> ++ wl_shm_buffer_end_access(buffer->shm_buffer);
> ++
> ++ goto done;
> ++ }
> ++
> + if (gb->needs_full_upload || quirks->gl_force_full_upload) {
> + wl_shm_buffer_begin_access(buffer->shm_buffer);
> +
> +@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
> + else
> + ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
> +
> +- if (gr->gl_version < gr_gl_version(3, 0) &&
> +- !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
> +- weston_log("GL_EXT_unpack_subimage not available.\n");
> +- return -1;
> +- }
> ++ if (gr->gl_version >= gr_gl_version(3, 0) ||
> ++ weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
> ++ gr->has_unpack_subimage = true;
> +
> + if (gr->gl_version >= gr_gl_version(3, 0) ||
> + weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
> +@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
> + gr_gl_version_minor(gr->gl_version));
> + weston_log_continue(STAMP_SPACE "read-back format: %s\n",
> + ec->read_format->drm_format_name);
> ++ weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
> ++ gr->has_unpack_subimage ? "yes" : "no");
> + weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
> + yesno(gr->has_pack_reverse));
> + weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
> diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
> new file mode 100644
> index 00000000..cf4f530a
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
> @@ -0,0 +1,4 @@
> +WESTON_TI_VERSION = ""
> +WESTON_TI_VERSION:ti-soc = "${BPN}-ti-version.inc"
> +
> +require ${WESTON_TI_VERSION}
> --
> 2.39.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago
2025-07-31 18:16 [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago Andrew Davis
2025-07-31 18:47 ` Denys Dmytriyenko
@ 2025-08-05 14:56 ` Daniel Schultz
2025-08-05 15:20 ` Andrew Davis
1 sibling, 1 reply; 6+ messages in thread
From: Daniel Schultz @ 2025-08-05 14:56 UTC (permalink / raw)
To: afd@ti.com, Denys Dmytriyenko, Ryan Eatmon,
meta-ti@lists.yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 7796 bytes --]
Hey,
I would like to report following issue with this patch:
| DEBUG: Executing shell function BUILDSPEC
| error: line 4: Illegal char '-' (0x2d) in: Release: r0.ti-soc1
| Building target platforms: aarch64-phytec-linux
| Building for target aarch64-phytec-linux
| WARNING: exit code 1 from a shell command.
| DEBUG: Python function do_package_rpm finished
| DEBUG: Python function do_package_write_rpm finished
Best regards,
Daniel
On 7/31/25 11:16, Andrew Davis via lists.yoctoproject.org wrote:
This change is needed due to the SGX driver, any distro, not just Arago,
using a TI SoC with SGX will need this fix, so it should go in meta-ti.
Signed-off-by: Andrew Davis <afd@ti.com><mailto:afd@ti.com>
---
.../wayland/weston-ti-version.inc | 7 ++
...equire-GL_EXT_unpack_subimage-commit.patch | 95 +++++++++++++++++++
.../wayland/weston_14.0.%.bbappend | 4 +
3 files changed, 106 insertions(+)
create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
new file mode 100644
index 00000000..fafef724
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
+
+PR:append = ".ti-soc1"
+
+SRC_URI += " \
+ file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
+"
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
new file mode 100644
index 00000000..fbe8f2bb
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
@@ -0,0 +1,95 @@
+From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
+From: Denys Dmytriyenko <denys@konsulko.com><mailto:denys@konsulko.com>
+Date: Thu, 6 Jul 2023 01:48:41 +0000
+Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
+
+This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
+
+That commit removed support for GPU drivers without GL_EXT_unpack_subimage
+which SGX does not support. Add back support for GPUs without this
+extension.
+
+Upstream-Status: Inappropriate [specific to TI SGX]
+
+Signed-off-by: Andrew Davis <afd@ti.com><mailto:afd@ti.com>
+Signed-off-by: Denys Dmytriyenko <denys@konsulko.com><mailto:denys@konsulko.com>
+
+---
+ libweston/renderer-gl/gl-renderer-internal.h | 2 ++
+ libweston/renderer-gl/gl-renderer.c | 29 ++++++++++++++++----
+ 2 files changed, 26 insertions(+), 5 deletions(-)
+
+diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
+index 5032035..85616c9 100644
+--- a/libweston/renderer-gl/gl-renderer-internal.h
++++ b/libweston/renderer-gl/gl-renderer-internal.h
+@@ -229,6 +229,8 @@ struct gl_renderer {
+ PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
+ bool has_platform_base;
+
++ bool has_unpack_subimage;
++
+ PFNEGLBINDWAYLANDDISPLAYWL bind_display;
+ PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
+ PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
+diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
+index e694418b..2be6d621 100644
+--- a/libweston/renderer-gl/gl-renderer.c
++++ b/libweston/renderer-gl/gl-renderer.c
+@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+ struct weston_surface *surface = pnode->surface;
+ const struct weston_testsuite_quirks *quirks =
+ &surface->compositor->test_data.test_quirks;
++ struct gl_renderer *gr = get_renderer(surface->compositor);
+ struct weston_buffer *buffer = surface->buffer_ref.buffer;
+ struct gl_surface_state *gs = get_surface_state(surface);
+ struct gl_buffer_state *gb = gs->buffer;
+@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
+
+ data = wl_shm_buffer_get_data(buffer->shm_buffer);
+
++ if (!gr->has_unpack_subimage) {
++ wl_shm_buffer_begin_access(buffer->shm_buffer);
++ for (j = 0; j < gs->buffer->num_textures; j++) {
++ glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
++ glTexImage2D(GL_TEXTURE_2D, 0,
++ gs->buffer->gl_format[j],
++ gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
++ buffer->height / pixel_format_vsub(buffer->pixel_format, j),
++ 0,
++ gl_format_from_internal(gs->buffer->gl_format[j]),
++ gs->buffer->gl_pixel_type,
++ data + gs->buffer->offset[j]);
++ }
++ wl_shm_buffer_end_access(buffer->shm_buffer);
++
++ goto done;
++ }
++
+ if (gb->needs_full_upload || quirks->gl_force_full_upload) {
+ wl_shm_buffer_begin_access(buffer->shm_buffer);
+
+@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
+ else
+ ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
+
+- if (gr->gl_version < gr_gl_version(3, 0) &&
+- !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
+- weston_log("GL_EXT_unpack_subimage not available.\n");
+- return -1;
+- }
++ if (gr->gl_version >= gr_gl_version(3, 0) ||
++ weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
++ gr->has_unpack_subimage = true;
+
+ if (gr->gl_version >= gr_gl_version(3, 0) ||
+ weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
+@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
+ gr_gl_version_minor(gr->gl_version));
+ weston_log_continue(STAMP_SPACE "read-back format: %s\n",
+ ec->read_format->drm_format_name);
++ weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
++ gr->has_unpack_subimage ? "yes" : "no");
+ weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
+ yesno(gr->has_pack_reverse));
+ weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
new file mode 100644
index 00000000..cf4f530a
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
@@ -0,0 +1,4 @@
+WESTON_TI_VERSION = ""
+WESTON_TI_VERSION:ti-soc = "${BPN}-ti-version.inc"
+
+require ${WESTON_TI_VERSION}
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18859): https://lists.yoctoproject.org/g/meta-ti/message/18859
Mute This Topic: https://lists.yoctoproject.org/mt/114471414/4454627
Group Owner: meta-ti+owner@lists.yoctoproject.org<mailto:meta-ti+owner@lists.yoctoproject.org>
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [d.schultz@phytec.de<mailto:d.schultz@phytec.de>]
-=-=-=-=-=-=-=-=-=-=-=-
[-- Attachment #2: Type: text/html, Size: 9064 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago
2025-08-05 14:56 ` Daniel Schultz
@ 2025-08-05 15:20 ` Andrew Davis
2025-08-05 22:32 ` Daniel Schultz
0 siblings, 1 reply; 6+ messages in thread
From: Andrew Davis @ 2025-08-05 15:20 UTC (permalink / raw)
To: Daniel Schultz, Denys Dmytriyenko, Ryan Eatmon,
meta-ti@lists.yoctoproject.org
On 8/5/25 9:56 AM, Daniel Schultz wrote:
> Hey,
>
> I would like to report following issue with this patch:
>
> | DEBUG: Executing shell function BUILDSPEC | error: line 4: Illegal char '-' (0x2d) in: Release: r0.ti-soc1 | Building target platforms: aarch64-phytec-linux | Building for target aarch64-phytec-linux | WARNING: exit code 1 from a shell command. | DEBUG: Python function do_package_rpm finished | DEBUG: Python function do_package_write_rpm finished
>
Thanks for the report, it seems that - is not allowed in RPM version/distro
tags. "ti-soc1" might be better as "ti_soc1", or maybe that will mess with
Debian..
How about just "tisoc1", any objections?
Andrew
> Best regards,
> Daniel
>
> On 7/31/25 11:16, Andrew Davis via lists.yoctoproject.org wrote:
>> This change is needed due to the SGX driver, any distro, not just Arago,
>> using a TI SoC with SGX will need this fix, so it should go in meta-ti.
>>
>> Signed-off-by: Andrew Davis<afd@ti.com>
>> ---
>> .../wayland/weston-ti-version.inc | 7 ++
>> ...equire-GL_EXT_unpack_subimage-commit.patch | 95 +++++++++++++++++++
>> .../wayland/weston_14.0.%.bbappend | 4 +
>> 3 files changed, 106 insertions(+)
>> create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>> create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>> create mode 100644 meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>
>> diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>> new file mode 100644
>> index 00000000..fafef724
>> --- /dev/null
>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>> @@ -0,0 +1,7 @@
>> +FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
>> +
>> +PR:append = ".ti-soc1"
>> +
>> +SRC_URI += " \
>> +file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
>> +"
>> diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>> new file mode 100644
>> index 00000000..fbe8f2bb
>> --- /dev/null
>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>> @@ -0,0 +1,95 @@
>> +From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
>> +From: Denys Dmytriyenko<denys@konsulko.com>
>> +Date: Thu, 6 Jul 2023 01:48:41 +0000
>> +Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
>> +
>> +This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
>> +
>> +That commit removed support for GPU drivers without GL_EXT_unpack_subimage
>> +which SGX does not support. Add back support for GPUs without this
>> +extension.
>> +
>> +Upstream-Status: Inappropriate [specific to TI SGX]
>> +
>> +Signed-off-by: Andrew Davis<afd@ti.com>
>> +Signed-off-by: Denys Dmytriyenko<denys@konsulko.com>
>> +
>> +---
>> + libweston/renderer-gl/gl-renderer-internal.h | 2 ++
>> + libweston/renderer-gl/gl-renderer.c | 29 ++++++++++++++++----
>> + 2 files changed, 26 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/libweston/renderer-gl/gl-renderer-internal.h b/libweston/renderer-gl/gl-renderer-internal.h
>> +index 5032035..85616c9 100644
>> +--- a/libweston/renderer-gl/gl-renderer-internal.h
>> ++++ b/libweston/renderer-gl/gl-renderer-internal.h
>> +@@ -229,6 +229,8 @@ struct gl_renderer {
>> + PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
>> + bool has_platform_base;
>> +
>> ++ bool has_unpack_subimage;
>> ++
>> + PFNEGLBINDWAYLANDDISPLAYWL bind_display;
>> + PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
>> + PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
>> +diff --git a/libweston/renderer-gl/gl-renderer.c b/libweston/renderer-gl/gl-renderer.c
>> +index e694418b..2be6d621 100644
>> +--- a/libweston/renderer-gl/gl-renderer.c
>> ++++ b/libweston/renderer-gl/gl-renderer.c
>> +@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
>> + struct weston_surface *surface = pnode->surface;
>> + const struct weston_testsuite_quirks *quirks =
>> + &surface->compositor->test_data.test_quirks;
>> ++ struct gl_renderer *gr = get_renderer(surface->compositor);
>> + struct weston_buffer *buffer = surface->buffer_ref.buffer;
>> + struct gl_surface_state *gs = get_surface_state(surface);
>> + struct gl_buffer_state *gb = gs->buffer;
>> +@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct weston_paint_node *pnode)
>> +
>> + data = wl_shm_buffer_get_data(buffer->shm_buffer);
>> +
>> ++ if (!gr->has_unpack_subimage) {
>> ++ wl_shm_buffer_begin_access(buffer->shm_buffer);
>> ++ for (j = 0; j < gs->buffer->num_textures; j++) {
>> ++ glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
>> ++ glTexImage2D(GL_TEXTURE_2D, 0,
>> ++ gs->buffer->gl_format[j],
>> ++ gs->buffer->pitch / pixel_format_hsub(buffer->pixel_format, j),
>> ++ buffer->height / pixel_format_vsub(buffer->pixel_format, j),
>> ++ 0,
>> ++ gl_format_from_internal(gs->buffer->gl_format[j]),
>> ++ gs->buffer->gl_pixel_type,
>> ++ data + gs->buffer->offset[j]);
>> ++ }
>> ++ wl_shm_buffer_end_access(buffer->shm_buffer);
>> ++
>> ++ goto done;
>> ++ }
>> ++
>> + if (gb->needs_full_upload || quirks->gl_force_full_upload) {
>> + wl_shm_buffer_begin_access(buffer->shm_buffer);
>> +
>> +@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
>> + else
>> + ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
>> +
>> +- if (gr->gl_version < gr_gl_version(3, 0) &&
>> +- !weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage")) {
>> +- weston_log("GL_EXT_unpack_subimage not available.\n");
>> +- return -1;
>> +- }
>> ++ if (gr->gl_version >= gr_gl_version(3, 0) ||
>> ++ weston_check_egl_extension(extensions, "GL_EXT_unpack_subimage"))
>> ++ gr->has_unpack_subimage = true;
>> +
>> + if (gr->gl_version >= gr_gl_version(3, 0) ||
>> + weston_check_egl_extension(extensions, "GL_EXT_texture_type_2_10_10_10_REV"))
>> +@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
>> + gr_gl_version_minor(gr->gl_version));
>> + weston_log_continue(STAMP_SPACE "read-back format: %s\n",
>> + ec->read_format->drm_format_name);
>> ++ weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture: %s\n",
>> ++ gr->has_unpack_subimage ? "yes" : "no");
>> + weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip: %s\n",
>> + yesno(gr->has_pack_reverse));
>> + weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
>> diff --git a/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>> new file mode 100644
>> index 00000000..cf4f530a
>> --- /dev/null
>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>> @@ -0,0 +1,4 @@
>> +WESTON_TI_VERSION = ""
>> +WESTON_TI_VERSION:ti-soc = "${BPN}-ti-version.inc"
>> +
>> +require ${WESTON_TI_VERSION}
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#18859):https://lists.yoctoproject.org/g/meta-ti/message/18859
>> Mute This Topic:https://lists.yoctoproject.org/mt/114471414/4454627
>> Group Owner:meta-ti+owner@lists.yoctoproject.org
>> Unsubscribe:https://lists.yoctoproject.org/g/meta-ti/unsub [d.schultz@phytec.de]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago
2025-08-05 15:20 ` Andrew Davis
@ 2025-08-05 22:32 ` Daniel Schultz
2025-08-06 12:24 ` Ryan Eatmon
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Schultz @ 2025-08-05 22:32 UTC (permalink / raw)
To: Andrew Davis, Denys Dmytriyenko, Ryan Eatmon,
meta-ti@lists.yoctoproject.org
On 8/5/25 08:20, Andrew Davis wrote:
> On 8/5/25 9:56 AM, Daniel Schultz wrote:
>> Hey,
>>
>> I would like to report following issue with this patch:
>>
>> | DEBUG: Executing shell function BUILDSPEC | error: line 4: Illegal
>> char '-' (0x2d) in: Release: r0.ti-soc1 | Building target platforms:
>> aarch64-phytec-linux | Building for target aarch64-phytec-linux |
>> WARNING: exit code 1 from a shell command. | DEBUG: Python function
>> do_package_rpm finished | DEBUG: Python function do_package_write_rpm
>> finished
>>
>
> Thanks for the report, it seems that - is not allowed in RPM
> version/distro
> tags. "ti-soc1" might be better as "ti_soc1", or maybe that will mess
> with
> Debian..
>
> How about just "tisoc1", any objections?
tisoc1 sounds like safe solution. Especially if there are uncertainties
about Debian.
- Daniel
>
> Andrew
>
>> Best regards,
>> Daniel
>>
>> On 7/31/25 11:16, Andrew Davis via lists.yoctoproject.org wrote:
>>> This change is needed due to the SGX driver, any distro, not just
>>> Arago,
>>> using a TI SoC with SGX will need this fix, so it should go in meta-ti.
>>>
>>> Signed-off-by: Andrew Davis<afd@ti.com>
>>> ---
>>> .../wayland/weston-ti-version.inc | 7 ++
>>> ...equire-GL_EXT_unpack_subimage-commit.patch | 95
>>> +++++++++++++++++++
>>> .../wayland/weston_14.0.%.bbappend | 4 +
>>> 3 files changed, 106 insertions(+)
>>> create mode 100644
>>> meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>> create mode 100644
>>> meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>> create mode 100644
>>> meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>>
>>> diff --git
>>> a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>> b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>> new file mode 100644
>>> index 00000000..fafef724
>>> --- /dev/null
>>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>> @@ -0,0 +1,7 @@
>>> +FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
>>> +
>>> +PR:append = ".ti-soc1"
>>> +
>>> +SRC_URI += " \
>>> +file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
>>> +"
>>> diff --git
>>> a/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>> b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>>
>>> new file mode 100644
>>> index 00000000..fbe8f2bb
>>> --- /dev/null
>>> +++
>>> b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>> @@ -0,0 +1,95 @@
>>> +From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
>>> +From: Denys Dmytriyenko<denys@konsulko.com>
>>> +Date: Thu, 6 Jul 2023 01:48:41 +0000
>>> +Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
>>> +
>>> +This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
>>> +
>>> +That commit removed support for GPU drivers without
>>> GL_EXT_unpack_subimage
>>> +which SGX does not support. Add back support for GPUs without this
>>> +extension.
>>> +
>>> +Upstream-Status: Inappropriate [specific to TI SGX]
>>> +
>>> +Signed-off-by: Andrew Davis<afd@ti.com>
>>> +Signed-off-by: Denys Dmytriyenko<denys@konsulko.com>
>>> +
>>> +---
>>> + libweston/renderer-gl/gl-renderer-internal.h | 2 ++
>>> + libweston/renderer-gl/gl-renderer.c | 29
>>> ++++++++++++++++----
>>> + 2 files changed, 26 insertions(+), 5 deletions(-)
>>> +
>>> +diff --git a/libweston/renderer-gl/gl-renderer-internal.h
>>> b/libweston/renderer-gl/gl-renderer-internal.h
>>> +index 5032035..85616c9 100644
>>> +--- a/libweston/renderer-gl/gl-renderer-internal.h
>>> ++++ b/libweston/renderer-gl/gl-renderer-internal.h
>>> +@@ -229,6 +229,8 @@ struct gl_renderer {
>>> + PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
>>> + bool has_platform_base;
>>> +
>>> ++ bool has_unpack_subimage;
>>> ++
>>> + PFNEGLBINDWAYLANDDISPLAYWL bind_display;
>>> + PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
>>> + PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
>>> +diff --git a/libweston/renderer-gl/gl-renderer.c
>>> b/libweston/renderer-gl/gl-renderer.c
>>> +index e694418b..2be6d621 100644
>>> +--- a/libweston/renderer-gl/gl-renderer.c
>>> ++++ b/libweston/renderer-gl/gl-renderer.c
>>> +@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct
>>> weston_paint_node *pnode)
>>> + struct weston_surface *surface = pnode->surface;
>>> + const struct weston_testsuite_quirks *quirks =
>>> + &surface->compositor->test_data.test_quirks;
>>> ++ struct gl_renderer *gr = get_renderer(surface->compositor);
>>> + struct weston_buffer *buffer = surface->buffer_ref.buffer;
>>> + struct gl_surface_state *gs = get_surface_state(surface);
>>> + struct gl_buffer_state *gb = gs->buffer;
>>> +@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct
>>> weston_paint_node *pnode)
>>> +
>>> + data = wl_shm_buffer_get_data(buffer->shm_buffer);
>>> +
>>> ++ if (!gr->has_unpack_subimage) {
>>> ++ wl_shm_buffer_begin_access(buffer->shm_buffer);
>>> ++ for (j = 0; j < gs->buffer->num_textures; j++) {
>>> ++ glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
>>> ++ glTexImage2D(GL_TEXTURE_2D, 0,
>>> ++ gs->buffer->gl_format[j],
>>> ++ gs->buffer->pitch /
>>> pixel_format_hsub(buffer->pixel_format, j),
>>> ++ buffer->height /
>>> pixel_format_vsub(buffer->pixel_format, j),
>>> ++ 0,
>>> ++ gl_format_from_internal(gs->buffer->gl_format[j]),
>>> ++ gs->buffer->gl_pixel_type,
>>> ++ data + gs->buffer->offset[j]);
>>> ++ }
>>> ++ wl_shm_buffer_end_access(buffer->shm_buffer);
>>> ++
>>> ++ goto done;
>>> ++ }
>>> ++
>>> + if (gb->needs_full_upload || quirks->gl_force_full_upload) {
>>> + wl_shm_buffer_begin_access(buffer->shm_buffer);
>>> +
>>> +@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
>>> + else
>>> + ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
>>> +
>>> +- if (gr->gl_version < gr_gl_version(3, 0) &&
>>> +- !weston_check_egl_extension(extensions,
>>> "GL_EXT_unpack_subimage")) {
>>> +- weston_log("GL_EXT_unpack_subimage not available.\n");
>>> +- return -1;
>>> +- }
>>> ++ if (gr->gl_version >= gr_gl_version(3, 0) ||
>>> ++ weston_check_egl_extension(extensions,
>>> "GL_EXT_unpack_subimage"))
>>> ++ gr->has_unpack_subimage = true;
>>> +
>>> + if (gr->gl_version >= gr_gl_version(3, 0) ||
>>> + weston_check_egl_extension(extensions,
>>> "GL_EXT_texture_type_2_10_10_10_REV"))
>>> +@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
>>> + gr_gl_version_minor(gr->gl_version));
>>> + weston_log_continue(STAMP_SPACE "read-back format: %s\n",
>>> + ec->read_format->drm_format_name);
>>> ++ weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture:
>>> %s\n",
>>> ++ gr->has_unpack_subimage ? "yes" : "no");
>>> + weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip:
>>> %s\n",
>>> + yesno(gr->has_pack_reverse));
>>> + weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
>>> diff --git
>>> a/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>> b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>> new file mode 100644
>>> index 00000000..cf4f530a
>>> --- /dev/null
>>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>> @@ -0,0 +1,4 @@
>>> +WESTON_TI_VERSION = ""
>>> +WESTON_TI_VERSION:ti-soc = "${BPN}-ti-version.inc"
>>> +
>>> +require ${WESTON_TI_VERSION}
>>>
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>> Links: You receive all messages sent to this group.
>>> View/Reply Online
>>> (#18859):https://lists.yoctoproject.org/g/meta-ti/message/18859
>>> Mute This Topic:https://lists.yoctoproject.org/mt/114471414/4454627
>>> Group Owner:meta-ti+owner@lists.yoctoproject.org
>>> Unsubscribe:https://lists.yoctoproject.org/g/meta-ti/unsub
>>> [d.schultz@phytec.de]
>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>
>>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago
2025-08-05 22:32 ` Daniel Schultz
@ 2025-08-06 12:24 ` Ryan Eatmon
0 siblings, 0 replies; 6+ messages in thread
From: Ryan Eatmon @ 2025-08-06 12:24 UTC (permalink / raw)
To: Daniel Schultz, Andrew Davis, Denys Dmytriyenko,
meta-ti@lists.yoctoproject.org
On 8/5/2025 5:32 PM, Daniel Schultz wrote:
> On 8/5/25 08:20, Andrew Davis wrote:
>> On 8/5/25 9:56 AM, Daniel Schultz wrote:
>>> Hey,
>>>
>>> I would like to report following issue with this patch:
>>>
>>> | DEBUG: Executing shell function BUILDSPEC | error: line 4: Illegal
>>> char '-' (0x2d) in: Release: r0.ti-soc1 | Building target platforms:
>>> aarch64-phytec-linux | Building for target aarch64-phytec-linux |
>>> WARNING: exit code 1 from a shell command. | DEBUG: Python function
>>> do_package_rpm finished | DEBUG: Python function do_package_write_rpm
>>> finished
>>>
>>
>> Thanks for the report, it seems that - is not allowed in RPM
>> version/distro
>> tags. "ti-soc1" might be better as "ti_soc1", or maybe that will mess
>> with
>> Debian..
>>
>> How about just "tisoc1", any objections?
>
> tisoc1 sounds like safe solution. Especially if there are uncertainties
> about Debian.
Merged to master.
> - Daniel
>
>>
>> Andrew
>>
>>> Best regards,
>>> Daniel
>>>
>>> On 7/31/25 11:16, Andrew Davis via lists.yoctoproject.org wrote:
>>>> This change is needed due to the SGX driver, any distro, not just
>>>> Arago,
>>>> using a TI SoC with SGX will need this fix, so it should go in meta-ti.
>>>>
>>>> Signed-off-by: Andrew Davis<afd@ti.com>
>>>> ---
>>>> .../wayland/weston-ti-version.inc | 7 ++
>>>> ...equire-GL_EXT_unpack_subimage-commit.patch | 95
>>>> +++++++++++++++++++
>>>> .../wayland/weston_14.0.%.bbappend | 4 +
>>>> 3 files changed, 106 insertions(+)
>>>> create mode 100644
>>>> meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>>> create mode 100644
>>>> meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>>> create mode 100644
>>>> meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>>>
>>>> diff --git
>>>> a/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>>> b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>>> new file mode 100644
>>>> index 00000000..fafef724
>>>> --- /dev/null
>>>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston-ti-version.inc
>>>> @@ -0,0 +1,7 @@
>>>> +FILESEXTRAPATHS:prepend := "${THISDIR}/weston:"
>>>> +
>>>> +PR:append = ".ti-soc1"
>>>> +
>>>> +SRC_URI += " \
>>>> +file://0001-Revert-require-GL_EXT_unpack_subimage-commit.patch \
>>>> +"
>>>> diff --git
>>>> a/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>>> b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>>>
>>>> new file mode 100644
>>>> index 00000000..fbe8f2bb
>>>> --- /dev/null
>>>> +++
>>>> b/meta-ti-bsp/recipes-graphics/wayland/weston/0001-Revert-require-GL_EXT_unpack_subimage-commit.patch
>>>> @@ -0,0 +1,95 @@
>>>> +From 5a05e5b66dd3831a9c9c2b3f64bd42419d9ade2d Mon Sep 17 00:00:00 2001
>>>> +From: Denys Dmytriyenko<denys@konsulko.com>
>>>> +Date: Thu, 6 Jul 2023 01:48:41 +0000
>>>> +Subject: [PATCH] Revert require GL_EXT_unpack_subimage commit
>>>> +
>>>> +This reverts commit 593d5af43a8e2c2a3371088fa7ae430d0517c82d.
>>>> +
>>>> +That commit removed support for GPU drivers without
>>>> GL_EXT_unpack_subimage
>>>> +which SGX does not support. Add back support for GPUs without this
>>>> +extension.
>>>> +
>>>> +Upstream-Status: Inappropriate [specific to TI SGX]
>>>> +
>>>> +Signed-off-by: Andrew Davis<afd@ti.com>
>>>> +Signed-off-by: Denys Dmytriyenko<denys@konsulko.com>
>>>> +
>>>> +---
>>>> + libweston/renderer-gl/gl-renderer-internal.h | 2 ++
>>>> + libweston/renderer-gl/gl-renderer.c | 29
>>>> ++++++++++++++++----
>>>> + 2 files changed, 26 insertions(+), 5 deletions(-)
>>>> +
>>>> +diff --git a/libweston/renderer-gl/gl-renderer-internal.h
>>>> b/libweston/renderer-gl/gl-renderer-internal.h
>>>> +index 5032035..85616c9 100644
>>>> +--- a/libweston/renderer-gl/gl-renderer-internal.h
>>>> ++++ b/libweston/renderer-gl/gl-renderer-internal.h
>>>> +@@ -229,6 +229,8 @@ struct gl_renderer {
>>>> + PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC create_platform_window;
>>>> + bool has_platform_base;
>>>> +
>>>> ++ bool has_unpack_subimage;
>>>> ++
>>>> + PFNEGLBINDWAYLANDDISPLAYWL bind_display;
>>>> + PFNEGLUNBINDWAYLANDDISPLAYWL unbind_display;
>>>> + PFNEGLQUERYWAYLANDBUFFERWL query_buffer;
>>>> +diff --git a/libweston/renderer-gl/gl-renderer.c
>>>> b/libweston/renderer-gl/gl-renderer.c
>>>> +index e694418b..2be6d621 100644
>>>> +--- a/libweston/renderer-gl/gl-renderer.c
>>>> ++++ b/libweston/renderer-gl/gl-renderer.c
>>>> +@@ -2523,6 +2523,7 @@ gl_renderer_flush_damage(struct
>>>> weston_paint_node *pnode)
>>>> + struct weston_surface *surface = pnode->surface;
>>>> + const struct weston_testsuite_quirks *quirks =
>>>> + &surface->compositor->test_data.test_quirks;
>>>> ++ struct gl_renderer *gr = get_renderer(surface->compositor);
>>>> + struct weston_buffer *buffer = surface->buffer_ref.buffer;
>>>> + struct gl_surface_state *gs = get_surface_state(surface);
>>>> + struct gl_buffer_state *gb = gs->buffer;
>>>> +@@ -2550,6 +2551,24 @@ gl_renderer_flush_damage(struct
>>>> weston_paint_node *pnode)
>>>> +
>>>> + data = wl_shm_buffer_get_data(buffer->shm_buffer);
>>>> +
>>>> ++ if (!gr->has_unpack_subimage) {
>>>> ++ wl_shm_buffer_begin_access(buffer->shm_buffer);
>>>> ++ for (j = 0; j < gs->buffer->num_textures; j++) {
>>>> ++ glBindTexture(GL_TEXTURE_2D, gs->buffer->textures[j]);
>>>> ++ glTexImage2D(GL_TEXTURE_2D, 0,
>>>> ++ gs->buffer->gl_format[j],
>>>> ++ gs->buffer->pitch /
>>>> pixel_format_hsub(buffer->pixel_format, j),
>>>> ++ buffer->height /
>>>> pixel_format_vsub(buffer->pixel_format, j),
>>>> ++ 0,
>>>> ++ gl_format_from_internal(gs->buffer->gl_format[j]),
>>>> ++ gs->buffer->gl_pixel_type,
>>>> ++ data + gs->buffer->offset[j]);
>>>> ++ }
>>>> ++ wl_shm_buffer_end_access(buffer->shm_buffer);
>>>> ++
>>>> ++ goto done;
>>>> ++ }
>>>> ++
>>>> + if (gb->needs_full_upload || quirks->gl_force_full_upload) {
>>>> + wl_shm_buffer_begin_access(buffer->shm_buffer);
>>>> +
>>>> +@@ -4754,11 +4773,9 @@ gl_renderer_setup(struct weston_compositor *ec)
>>>> + else
>>>> + ec->read_format = pixel_format_get_info(DRM_FORMAT_ABGR8888);
>>>> +
>>>> +- if (gr->gl_version < gr_gl_version(3, 0) &&
>>>> +- !weston_check_egl_extension(extensions,
>>>> "GL_EXT_unpack_subimage")) {
>>>> +- weston_log("GL_EXT_unpack_subimage not available.\n");
>>>> +- return -1;
>>>> +- }
>>>> ++ if (gr->gl_version >= gr_gl_version(3, 0) ||
>>>> ++ weston_check_egl_extension(extensions,
>>>> "GL_EXT_unpack_subimage"))
>>>> ++ gr->has_unpack_subimage = true;
>>>> +
>>>> + if (gr->gl_version >= gr_gl_version(3, 0) ||
>>>> + weston_check_egl_extension(extensions,
>>>> "GL_EXT_texture_type_2_10_10_10_REV"))
>>>> +@@ -4880,6 +4897,8 @@ gl_renderer_setup(struct weston_compositor *ec)
>>>> + gr_gl_version_minor(gr->gl_version));
>>>> + weston_log_continue(STAMP_SPACE "read-back format: %s\n",
>>>> + ec->read_format->drm_format_name);
>>>> ++ weston_log_continue(STAMP_SPACE "wl_shm sub-image to texture:
>>>> %s\n",
>>>> ++ gr->has_unpack_subimage ? "yes" : "no");
>>>> + weston_log_continue(STAMP_SPACE "glReadPixels supports y-flip:
>>>> %s\n",
>>>> + yesno(gr->has_pack_reverse));
>>>> + weston_log_continue(STAMP_SPACE "glReadPixels supports PBO: %s\n",
>>>> diff --git
>>>> a/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>>> b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>>> new file mode 100644
>>>> index 00000000..cf4f530a
>>>> --- /dev/null
>>>> +++ b/meta-ti-bsp/recipes-graphics/wayland/weston_14.0.%.bbappend
>>>> @@ -0,0 +1,4 @@
>>>> +WESTON_TI_VERSION = ""
>>>> +WESTON_TI_VERSION:ti-soc = "${BPN}-ti-version.inc"
>>>> +
>>>> +require ${WESTON_TI_VERSION}
>>>>
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>> Links: You receive all messages sent to this group.
>>>> View/Reply Online
>>>> (#18859):https://lists.yoctoproject.org/g/meta-ti/message/18859
>>>> Mute This Topic:https://lists.yoctoproject.org/mt/114471414/4454627
>>>> Group Owner:meta-ti+owner@lists.yoctoproject.org
>>>> Unsubscribe:https://lists.yoctoproject.org/g/meta-ti/unsub
>>>> [d.schultz@phytec.de]
>>>> -=-=-=-=-=-=-=-=-=-=-=-
>>>>
>>>
>>
>
--
Ryan Eatmon reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-08-06 12:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-31 18:16 [meta-ti][master][PATCH] recipes-graphics: Add weston fix for SGX from meta-arago Andrew Davis
2025-07-31 18:47 ` Denys Dmytriyenko
2025-08-05 14:56 ` Daniel Schultz
2025-08-05 15:20 ` Andrew Davis
2025-08-05 22:32 ` Daniel Schultz
2025-08-06 12:24 ` Ryan Eatmon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.