All of lore.kernel.org
 help / color / mirror / Atom feed
* [kirkstone PATCH 0/4] Graphics, graphics, and more graphics
@ 2023-01-26  3:08 Randolph Sapp
  2023-01-26  3:08 ` [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches Randolph Sapp
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Randolph Sapp @ 2023-01-26  3:08 UTC (permalink / raw)
  To: denys, reatmon, detheridge, afd; +Cc: meta-ti, k-bhargav, Randolph Sapp

Alright, this is the 6th revision of this patch. This uses a revised
dependency chain (hopefully it's a little more logical) and some, well,
interesting switching logic using the PACKAGECONFIG and
virtual/gpudriver PREFERRED_PROVIDER override variable. I'm not sure how
I feel about it, but it solves the issue of silently configuring things
as needed without other layers manually enabling features.

We basically dynamically adjust mesa's PACKAGECONFIG based on what our
selected gpudriver (and display controller, thanks sgx) is. We also add
a runtime recommendation on the gpudriver after this configuration.

The gpudriver providers didn't change too much, they just have a runtime
recommendation for the associated um components. As it stands, the um
components can live alongside the software rendering components thanks
to the mesa-megadriver being able to automatically switch as necessary
at runtime, so we will not clobber mesa's usual packages.

Then we drop all mentions of the gpu machine feature for good measure.

"Why didn't you just add preferred providers for libgles2, etc, etc."
Well, software rendering. If we do that we'll have to edit the
PACKAGECONFIG to drop gles components from mesa, disabling software
rendering. We could add a dynamic switch to do that, but honestly
keeping in line with KISS, this solution has fewer lines and less logic
while keeping swrast as a nice fallback for whenever anything really
goes south... not that I'm expecting that or anything.

Randolph Sapp (4):
  meta-ti-bsp: mesa: Add current patches
  meta-ti-bsp: graphics: Resolve dependency chain
  meta-ti-bsp: machine: Remove all gpu features
  meta-ti-bsp: machine: Attempt to update DC alias

 meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   |   2 -
 meta-ti-bsp/conf/machine/include/am62xx.inc   |   6 +-
 meta-ti-bsp/conf/machine/include/am65xx.inc   |   6 +-
 meta-ti-bsp/conf/machine/include/j721e.inc    |   6 -
 meta-ti-bsp/conf/machine/include/j721s2.inc   |   6 -
 meta-ti-bsp/conf/machine/include/j784s4.inc   |   6 -
 meta-ti-bsp/conf/machine/include/omap-a15.inc |   9 +-
 meta-ti-bsp/conf/machine/include/ti33x.inc    |   9 +-
 meta-ti-bsp/conf/machine/include/ti43x.inc    |   9 +-
 meta-ti-bsp/conf/machine/j784s4-evm.conf      |   2 +
 ...-OpenEmbedded-nodistro-internal-aarc.patch |  29 ----
 ...bb => ti-img-rogue-driver_1.18.6276027.bb} |  20 +--
 .../ti-sgx-ddk-km_1.17.4948957.bb             |   8 +-
 .../ti-img-rogue-umlibs_1.15.6133109.bb       |  71 --------
 .../ti-img-rogue-umlibs_1.18.6276027.bb       |  39 +++++
 .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     |  31 +---
 ...nd-deprecate-drm_handle_format-and-d.patch | 158 ++++++++++++++++++
 ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++++
 ...sdetects-64bit-atomics-on-mips-clang.patch |  25 +++
 ...k-for-all-linux-host_os-combinations.patch |  43 +++++
 ...ormat-Check-for-NEON-before-using-it.patch |  47 ++++++
 ...02-meson.build-make-TLS-ELF-optional.patch |  61 +++++++
 .../mesa/mesa-gl_22.0.%.bbappend              |   1 +
 .../mesa/mesa_22.0.%.bbappend                 |   2 +
 .../recipes-graphics/mesa/pvr-mesa.inc        |  39 +++++
 25 files changed, 484 insertions(+), 185 deletions(-)
 delete mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
 rename meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_1.15.6133109.bb => ti-img-rogue-driver_1.18.6276027.bb} (72%)
 delete mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc

-- 
2.34.1



^ permalink raw reply	[flat|nested] 19+ messages in thread

* [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches
  2023-01-26  3:08 [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Randolph Sapp
@ 2023-01-26  3:08 ` Randolph Sapp
  2023-01-26 17:06   ` Andrew Davis
  2023-01-26  3:08 ` [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain Randolph Sapp
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Randolph Sapp @ 2023-01-26  3:08 UTC (permalink / raw)
  To: denys, reatmon, detheridge, afd; +Cc: meta-ti, k-bhargav, Randolph Sapp

Copy over current patches from oe-core for mesa since we're going to be
overriding the SRC_URI string and we still need those.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 ...nd-deprecate-drm_handle_format-and-d.patch | 158 ++++++++++++++++++
 ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++++
 ...sdetects-64bit-atomics-on-mips-clang.patch |  25 +++
 ...k-for-all-linux-host_os-combinations.patch |  43 +++++
 ...ormat-Check-for-NEON-before-using-it.patch |  47 ++++++
 ...02-meson.build-make-TLS-ELF-optional.patch |  61 +++++++
 6 files changed, 368 insertions(+)
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch

diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
new file mode 100644
index 00000000..dac2de4e
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
@@ -0,0 +1,158 @@
+From 7796c2c56c960ac55e49246f0349ac52539ada55 Mon Sep 17 00:00:00 2001
+From: Leandro Ribeiro <leandro.ribeiro@collabora.com>
+Date: Sun, 10 Apr 2022 22:54:36 -0300
+Subject: [PATCH] Revert "egl/wayland: deprecate drm_handle_format() and
+ drm_handle_capabilities()"
+
+Commit af1ee8e010441f8f2ed8c77065b159652a4ac9fe dropped support to
+wl_drm, as we thought that most compositors from active projects were
+already supporting zwp_linux_dmabuf_v1.
+
+But that's not true, so revert this commit in order to give these
+projects a longer transition period.
+
+Note that we didn't add back the support to GEM name API, and that was
+on purpose.
+
+Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
+Reviewed-by: Simon Ser <contact@emersion.fr>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15822>
+
+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
+Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/c60fea8c228ae3f32e20d6b65c473d9f04871d20]
+---
+ src/egl/drivers/dri2/egl_dri2.h         |  1 +
+ src/egl/drivers/dri2/platform_wayland.c | 59 +++++++++++++++++++------
+ 2 files changed, 47 insertions(+), 13 deletions(-)
+
+diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
+index c466ff83c53..eecb32a53fd 100644
+--- a/src/egl/drivers/dri2/egl_dri2.h
++++ b/src/egl/drivers/dri2/egl_dri2.h
+@@ -283,6 +283,7 @@ struct dri2_egl_display
+    struct zwp_linux_dmabuf_feedback_v1 *wl_dmabuf_feedback;
+    struct dmabuf_feedback_format_table format_table;
+    bool authenticated;
++   uint32_t capabilities;
+    char *device_name;
+ #endif
+ 
+diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
+index 5ff83cce08a..843434376a7 100644
+--- a/src/egl/drivers/dri2/platform_wayland.c
++++ b/src/egl/drivers/dri2/platform_wayland.c
+@@ -1343,7 +1343,7 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
+                  struct dri2_egl_surface *dri2_surf,
+                  __DRIimage *image)
+ {
+-   struct wl_buffer *ret;
++   struct wl_buffer *ret = NULL;
+    EGLBoolean query;
+    int width, height, fourcc, num_planes;
+    uint64_t modifier = DRM_FORMAT_MOD_INVALID;
+@@ -1447,11 +1447,28 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
+       ret = zwp_linux_buffer_params_v1_create_immed(params, width, height,
+                                                     fourcc, 0);
+       zwp_linux_buffer_params_v1_destroy(params);
++   } else {
++      struct wl_drm *wl_drm =
++         dri2_surf ? dri2_surf->wl_drm_wrapper : dri2_dpy->wl_drm;
++      int fd = -1, stride;
++
++      if (num_planes > 1)
++         return NULL;
++
++      query = dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FD, &fd);
++      query &= dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &stride);
++      if (!query) {
++         if (fd >= 0)
++            close(fd);
++         return NULL;
++      }
+ 
+-      return ret;
++      ret = wl_drm_create_prime_buffer(wl_drm, fd, width, height, fourcc, 0,
++                                       stride, 0, 0, 0, 0);
++      close(fd);
+    }
+ 
+-   return NULL;
++   return ret;
+ }
+ 
+ static EGLBoolean
+@@ -1698,16 +1715,21 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
+ static void
+ drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
+ {
+-   /* deprecated, as compositors already support the dma-buf protocol extension
+-    * and so we can rely on dmabuf_handle_modifier() to receive formats and
+-    * modifiers */
++   struct dri2_egl_display *dri2_dpy = data;
++   int visual_idx = dri2_wl_visual_idx_from_fourcc(format);
++
++   if (visual_idx == -1)
++      return;
++
++   BITSET_SET(dri2_dpy->formats.formats_bitmap, visual_idx);
+ }
+ 
+ static void
+ drm_handle_capabilities(void *data, struct wl_drm *drm, uint32_t value)
+ {
+-   /* deprecated, as compositors already support the dma-buf protocol extension
+-    * and so we can rely on it to create wl_buffer's */
++   struct dri2_egl_display *dri2_dpy = data;
++
++   dri2_dpy->capabilities = value;
+ }
+ 
+ static void
+@@ -2075,13 +2097,12 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
+    wl_registry_add_listener(dri2_dpy->wl_registry,
+                             &registry_listener_drm, dri2_dpy);
+ 
+-   /* The compositor must expose the dma-buf interface. */
+-   if (roundtrip(dri2_dpy) < 0 || dri2_dpy->wl_dmabuf == NULL)
++   if (roundtrip(dri2_dpy) < 0)
+       goto cleanup;
+ 
+    /* Get default dma-buf feedback */
+-   if (zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
+-       ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
++   if (dri2_dpy->wl_dmabuf && zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
++                              ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
+       dmabuf_feedback_format_table_init(&dri2_dpy->format_table);
+       dri2_dpy->wl_dmabuf_feedback =
+          zwp_linux_dmabuf_v1_get_default_feedback(dri2_dpy->wl_dmabuf);
+@@ -2089,7 +2110,6 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
+                                                 &dmabuf_feedback_listener, dri2_dpy);
+    }
+ 
+-   /* Receive events from the interfaces */
+    if (roundtrip(dri2_dpy) < 0)
+       goto cleanup;
+ 
+@@ -2176,6 +2196,19 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
+ 
+    dri2_wl_setup_swap_interval(disp);
+ 
++   if (dri2_dpy->wl_drm) {
++      /* To use Prime, we must have _DRI_IMAGE v7 at least. createImageFromFds
++       * support indicates that Prime export/import is supported by the driver.
++       * We deprecated the support to GEM names API, so we bail out if the
++       * driver does not suport Prime. */
++      if (!(dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) ||
++          (dri2_dpy->image->base.version < 7) ||
++          (dri2_dpy->image->createImageFromFds == NULL)) {
++         _eglLog(_EGL_WARNING, "wayland-egl: display does not support prime");
++         goto cleanup;
++      }
++   }
++
+    if (dri2_dpy->is_different_gpu &&
+        (dri2_dpy->image->base.version < 9 ||
+         dri2_dpy->image->blitImage == NULL)) {
+-- 
+2.35.1
+
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
new file mode 100644
index 00000000..3b0bfa32
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
@@ -0,0 +1,34 @@
+From 253b042d2bf10e9abfa9cc508e0782aefd834145 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 16 Oct 2020 11:03:47 -0700
+Subject: [PATCH] futex.h: Define __NR_futex if it does not exist
+
+__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
+they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
+__NR_futex, since this is used in applications, such applications start
+to fail to build for these newer architectures. This patch defines a
+fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
+working
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/util/futex.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/util/futex.h b/src/util/futex.h
+index 43097f4..941b0ec 100644
+--- a/src/util/futex.h
++++ b/src/util/futex.h
+@@ -34,6 +34,10 @@
+ #include <sys/syscall.h>
+ #include <sys/time.h>
+ 
++#if !defined(SYS_futex) && defined(SYS_futex_time64)
++# define SYS_futex SYS_futex_time64
++#endif
++
+ static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
+ {
+    return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
new file mode 100644
index 00000000..b08e4d86
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
@@ -0,0 +1,25 @@
+From d34bdbd80e5a1f309d2ba280cdc66ff0ee0e5c43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 13 Jan 2020 15:23:47 -0800
+Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/util/u_atomic.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
+index 5a5eab4..e499516 100644
+--- a/src/util/u_atomic.c
++++ b/src/util/u_atomic.c
+@@ -21,7 +21,7 @@
+  * IN THE SOFTWARE.
+  */
+ 
+-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
+ 
+ #include <stdint.h>
+ #include <pthread.h>
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
new file mode 100644
index 00000000..aea23d0e
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
@@ -0,0 +1,43 @@
+From f9c597a2c517eb85c23cbeeb2e95c55794c74cda Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair@alistair23.me>
+Date: Thu, 14 Nov 2019 13:04:49 -0800
+Subject: [PATCH] meson.build: check for all linux host_os combinations
+
+Make sure that we are also looking for our host_os combinations like
+linux-musl etc. when assuming support for DRM/KMS.
+
+Also delete a duplicate line.
+
+Upstream-Status: Pending
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+Signed-off-by: Alistair Francis <alistair@alistair23.me>
+
+---
+ meson.build | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index bca6b1f..70d06c0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -172,7 +172,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
+ # Only build shared_glapi if at least one OpenGL API is enabled
+ with_shared_glapi = with_shared_glapi and with_any_opengl
+ 
+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+ 
+ dri_drivers = get_option('dri-drivers')
+ if dri_drivers.length() != 0
+@@ -1074,7 +1074,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
+ endif
+ 
+ # TODO: this is very incomplete
+-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system())
++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux')
+   pre_args += '-D_GNU_SOURCE'
+ elif host_machine.system() == 'sunos'
+   pre_args += '-D__EXTENSIONS__'
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
new file mode 100644
index 00000000..5c6165c2
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
@@ -0,0 +1,47 @@
+From fdb2face4eeac3c20eedcca7520f4e7014225fb4 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 2 Dec 2021 19:57:42 -0800
+Subject: [PATCH] util/format: Check for NEON before using it
+
+This fixes build on rpi0-w and any other machine which does not have
+neon unit and is not used as FPU unit
+
+Fixes errors e.g.
+
+In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
+/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+---
+ src/util/format/u_format.c             | 2 +-
+ src/util/format/u_format_unpack_neon.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
+index 36c5e52..f0a0097 100644
+--- a/src/util/format/u_format.c
++++ b/src/util/format/u_format.c
+@@ -1138,7 +1138,7 @@ static void
+ util_format_unpack_table_init(void)
+ {
+    for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
+-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
+       const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
+       if (unpack) {
+          util_format_unpack_table[format] = unpack;
+diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
+index a4a5cb1..1e4f794 100644
+--- a/src/util/format/u_format_unpack_neon.c
++++ b/src/util/format/u_format_unpack_neon.c
+@@ -23,7 +23,7 @@
+ 
+ #include <u_format.h>
+ 
+-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
+ 
+ /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
+  * unless you tell it "no really".
diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
new file mode 100644
index 00000000..af11baee
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
@@ -0,0 +1,61 @@
+From bf41fa026ae3d378e62fd83d03a6f5933b52ca04 Mon Sep 17 00:00:00 2001
+From: Alistair Francis <alistair@alistair23.me>
+Date: Thu, 14 Nov 2019 13:08:31 -0800
+Subject: [PATCH] meson.build: make TLS ELF optional
+
+USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
+TLS GLX optional again" patch updated to the latest mesa.
+
+For details, see:
+https://gitlab.freedesktop.org/mesa/mesa/-/issues/966
+
+This prevents runtime segfault on musl:
+
+Traceback (most recent call last):
+  File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
+    return func(*args, **kwargs)
+  File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/runtime/cases/parselogs.py", line 378, in test_parselogs
+    self.assertEqual(errcount, 0, msg=self.msg)
+AssertionError: 1 != 0 : Log: /home/pokybuild/yocto-worker/musl-qemux86/build/build/tmp/work/qemux86-poky-linux-musl/core-image-sato-sdk/1.0-r0/target_logs/Xorg.0.log
+
+Upstream-Status: Inappropriate [configuration]
+---
+ meson.build       | 7 +++++--
+ meson_options.txt | 6 ++++++
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 70d06c0..1441611 100644
+--- a/meson.build
++++ b/meson.build
+@@ -490,8 +490,11 @@ foreach platform : _platforms
+   pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
+ endforeach
+ 
+-use_elf_tls = true
+-pre_args += '-DUSE_ELF_TLS'
++use_elf_tls = false
++if get_option('elf-tls')
++  use_elf_tls = true
++  pre_args += '-DUSE_ELF_TLS'
++endif
+ 
+ if with_platform_android and get_option('platform-sdk-version') >= 29
+   # By default the NDK compiler, at least, emits emutls references instead of
+diff --git a/meson_options.txt b/meson_options.txt
+index 1f6ef38..99cc5cb 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -440,6 +440,12 @@ option(
+   value : true,
+   description : 'Enable direct rendering in GLX and EGL for DRI',
+ )
++option(
++  'elf-tls',
++  type : 'boolean',
++  value : true,
++  description : 'Enable TLS support in ELF',
++)
+ option('egl-lib-suffix',
+   type : 'string',
+   value : '',
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain
  2023-01-26  3:08 [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Randolph Sapp
  2023-01-26  3:08 ` [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches Randolph Sapp
@ 2023-01-26  3:08 ` Randolph Sapp
  2023-01-26 17:54   ` Andrew Davis
  2023-01-26  3:08 ` [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features Randolph Sapp
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 19+ messages in thread
From: Randolph Sapp @ 2023-01-26  3:08 UTC (permalink / raw)
  To: denys, reatmon, detheridge, afd; +Cc: meta-ti, k-bhargav, Randolph Sapp

Patched mesa will now be configured based on what virtual/gpudriver
preferred provider is selected. The gpu drivers will now runtime
recommend the associated um components.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 ...-OpenEmbedded-nodistro-internal-aarc.patch | 29 --------
 ...bb => ti-img-rogue-driver_1.18.6276027.bb} | 20 +++---
 .../ti-sgx-ddk-km_1.17.4948957.bb             |  8 +--
 .../ti-img-rogue-umlibs_1.15.6133109.bb       | 71 -------------------
 .../ti-img-rogue-umlibs_1.18.6276027.bb       | 39 ++++++++++
 .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     | 31 ++------
 .../mesa/mesa-gl_22.0.%.bbappend              |  1 +
 .../mesa/mesa_22.0.%.bbappend                 |  2 +
 .../recipes-graphics/mesa/pvr-mesa.inc        | 39 ++++++++++
 9 files changed, 100 insertions(+), 140 deletions(-)
 delete mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
 rename meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_1.15.6133109.bb => ti-img-rogue-driver_1.18.6276027.bb} (72%)
 delete mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc

diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
deleted file mode 100644
index f021cc39..00000000
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 80d32fee3d768abbd77cce77ea9a7574651460a9 Mon Sep 17 00:00:00 2001
-From: Denys Dmytriyenko <denis@denix.org>
-Date: Wed, 7 Jul 2021 13:11:56 -0400
-Subject: [PATCH] compiler: support OpenEmbedded "nodistro" internal aarch64
- toolchain
-
-Upstream-Status: Pending
-
-Signed-off-by: Denys Dmytriyenko <denis@denix.org>
----
- build/linux/config/compiler.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/build/linux/config/compiler.mk b/build/linux/config/compiler.mk
-index 53a0bef..d788579 100644
---- a/build/linux/config/compiler.mk
-+++ b/build/linux/config/compiler.mk
-@@ -65,7 +65,7 @@ define calculate-compiler-preferred-target
-    ifneq ($$(filter i386-% i486-% i586-% i686-%,$$($(1)_compiler_preferred_target)),)
-     $(1)_compiler_preferred_target := i386-linux-gnu
-    endif
--   ifneq ($$(filter aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
-+   ifneq ($$(filter aarch64-oe-linux aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
-     $(1)_compiler_preferred_target := aarch64-linux-gnu
-    endif
-    ifneq ($$(filter armv7a-cros-linux-gnueabi armv7l-tizen-linux-gnueabi,$$($(1)_compiler_preferred_target)),)
--- 
-2.7.4
-
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
similarity index 72%
rename from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb
rename to meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
index b4d19195..96fb7484 100644
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
@@ -3,40 +3,38 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
 LICENSE = "MIT | GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
 
-inherit module features_check
+inherit module
 
-REQUIRED_MACHINE_FEATURES = "gpu"
+PROVIDES = "virtual/gpudriver"
 
 MACHINE_KERNEL_PR:append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
+
 COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
 
 DEPENDS = "virtual/kernel"
 
-PROVIDES = "virtual/gpudriver"
+BRANCH = "linuxws/kirkstone/k5.10/${PV}"
 
-BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
-
-SRC_URI = " \
-    git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH} \
-    file://0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch \
-"
+SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}"
 
 S = "${WORKDIR}/git"
 
-SRCREV = "c901804e8221d477983a6f7224a9cdc6e832f050"
+SRCREV = "d575e4f64c95a3534e10e85da15bd303febf133f"
 
 TARGET_PRODUCT:j721e = "j721e_linux"
 TARGET_PRODUCT:j721s2 = "j721s2_linux"
 TARGET_PRODUCT:j784s4 = "j784s4_linux"
 TARGET_PRODUCT:am62xx = "am62_linux"
 PVR_BUILD = "release"
-PVR_WS = "wayland"
+PVR_WS = "lws-generic"
 
 EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
 
 do_install() {
     make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
 }
+
+RRECOMMENDS:${PN} += "ti-img-rogue-umlibs"
diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
index c22e3096..13b8757c 100644
--- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
+++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
@@ -3,9 +3,9 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux"
 LICENSE = "MIT | GPL-2.0-only"
 LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12"
 
-inherit module features_check
+inherit module
 
-REQUIRED_MACHINE_FEATURES = "gpu"
+PROVIDES = "virtual/gpudriver"
 
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3"
 
@@ -16,8 +16,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 DEPENDS = "virtual/kernel"
 
-PROVIDES = "virtual/gpudriver"
-
 BRANCH = "ti-img-sgx/${PV}/k5.10"
 
 SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}"
@@ -44,3 +42,5 @@ do_install() {
 do_install:k3() {
     make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
 }
+
+RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
deleted file mode 100644
index a665c614..00000000
--- a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
+++ /dev/null
@@ -1,71 +0,0 @@
-DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
-HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
-LICENSE = "TI-TFL"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
-
-inherit features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
-
-PACKAGE_ARCH = "${MACHINE_ARCH}"
-COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
-
-PR = "r2"
-
-BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
-
-SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
-SRCREV = "5977e82b96028f783d39c7219f016c1faf8dc5f5"
-
-TARGET_PRODUCT:j721e = "j721e_linux"
-TARGET_PRODUCT:j721s2 = "j721s2_linux"
-TARGET_PRODUCT:j784s4 = "j784s4_linux"
-TARGET_PRODUCT:am62xx = "am62_linux"
-PVR_BUILD ?= "release"
-PVR_WS = "wayland"
-
-INITSCRIPT_NAME = "rc.pvr"
-INITSCRIPT_PARAMS = "defaults 8"
-
-inherit update-rc.d
-
-PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm"
-
-DEPENDS += "libdrm wayland expat"
-RDEPENDS:${PN} += "bash"
-RDEPENDS:${PN} += "wayland expat"
-
-RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
-RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
-
-RREPLACES:${PN} = "libegl libgles1 liblges2 libgbm"
-RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
-
-RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
-RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
-
-RRECOMMENDS:${PN} += "ti-img-rogue-driver"
-
-S = "${WORKDIR}/git"
-
-do_install () {
-    oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} BUILD=${PVR_BUILD} WINDOW_SYSTEM=${PVR_WS}
-    chown -R root:root ${D}
-}
-
-FILES:${PN} += " ${nonarch_base_libdir}/firmware/"
-FILES:${PN} += " ${datadir}/"
-
-PACKAGES =+ "${PN}-plugins"
-FILES:${PN}-plugins = "${libdir}/libGLESv2.so ${libdir}/libGLESv1_CM.so ${libdir}/libEGL.so ${libdir}/dri/pvr_dri.so"
-RDEPENDS:${PN} += "${PN}-plugins"
-
-ALLOW_EMPTY:${PN}-plugins = "1"
-
-INSANE_SKIP:${PN} += "ldflags arch already-stripped"
-INSANE_SKIP:${PN}-plugins = "dev-so"
-
-CLEANBROKEN = "1"
diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
new file mode 100644
index 00000000..924e46ba
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
@@ -0,0 +1,39 @@
+DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
+HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
+LICENSE = "TI-TFL"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
+
+inherit bin_package
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
+
+PR = "r2"
+
+BRANCH = "linuxws/kirkstone/k5.10/${PV}"
+SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
+SRCREV = "51e598919641d51156a631efa5447124a3c0f543"
+S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
+
+TARGET_PRODUCT:j721e = "j721e_linux"
+TARGET_PRODUCT:j721s2 = "j721s2_linux"
+TARGET_PRODUCT:j784s4 = "j784s4_linux"
+TARGET_PRODUCT:am62xx = "am62_linux"
+PVR_BUILD = "release"
+PVR_WS = "lws-generic"
+
+RDEPENDS:${PN} += "mesa-megadriver libdrm ti-img-rogue-driver"
+
+do_install:append() {
+    rm -rf "${D}/etc/init.d"
+    rm -rf "${D}/usr/lib/libvulkan.so"
+    rm -rf "${D}/usr/lib/libvulkan.so.0"
+    rm -rf "${D}/usr/lib/libvulkan.so.1"
+}
+
+PACKAGES = "${PN}-tools ${PN}"
+FILES:${PN}-tools = "${bindir}/"
+RDEPENDS:${PN}-tools = "python3-core"
+RRECOMMENDS:${PN} += "${PN}-tools"
+
+INSANE_SKIP:${PN} += "ldflags arch already-stripped dev-so"
diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
index fb98eb68..2d96ebac 100644
--- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
+++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
@@ -3,10 +3,6 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux"
 LICENSE = "TI-TSPA"
 LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8"
 
-inherit features_check
-
-REQUIRED_MACHINE_FEATURES = "gpu"
-
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
 
@@ -27,26 +23,7 @@ INITSCRIPT_PARAMS = "defaults 8"
 
 inherit update-rc.d
 
-PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm"
-
-DEPENDS += "libdrm udev wayland wayland-protocols libffi expat"
-DEPENDS:append:libc-musl = " gcompat"
-RDEPENDS:${PN} += "libdrm libdrm-omap udev wayland wayland-protocols libffi expat"
-
-RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
-RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
-
-RREPLACES:${PN} = "libegl libgles1 libgles2 libgbm"
-RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
-
-RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
-RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
-RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
-
-# The actual SONAME is libGLESv2.so.2, so need to explicitly specify RPROVIDES for .so.1 here
-RPROVIDES:${PN} += "libGLESv2.so.1"
+RDEPENDS:${PN} += "libdrm libdrm-omap"
 
 RRECOMMENDS:${PN} += "ti-sgx-ddk-km"
 
@@ -54,7 +31,11 @@ S = "${WORKDIR}/git"
 
 do_install () {
     oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT}
-    ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1
+
+    # HACKS until the kirkstone branch of sgx-ddk-um-linux is cleaned up
+    rm -rf ${D}${libdir}/libEGL*
+    rm -rf ${D}${libdir}/libgbm*
+    rm -rf ${D}${libdir}/dri
 
     chown -R root:root ${D}
 }
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
new file mode 100644
index 00000000..b9eac156
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
@@ -0,0 +1 @@
+require pvr-mesa.inc
diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
new file mode 100644
index 00000000..ab90e3fb
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
@@ -0,0 +1,2 @@
+require pvr-mesa.inc
+
diff --git a/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
new file mode 100644
index 00000000..20095051
--- /dev/null
+++ b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
@@ -0,0 +1,39 @@
+# PowerVR Graphics require several patches that have not made their way
+# upstream yet. This allows us to build the shims we need without completely
+# clobbering mesa.
+
+BRANCH = "wip2/kirkstone/sgx-1.17-4948957/22.0"
+
+SRC_URI = "git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
+           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+           file://0002-meson.build-make-TLS-ELF-optional.patch \
+           file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+           file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+           file://0001-util-format-Check-for-NEON-before-using-it.patch \
+           file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
+           "
+
+S = "${WORKDIR}/git"
+
+SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba"
+
+PACKAGECONFIG:append = " \
+    ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
+    ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
+"
+
+PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
+PACKAGECONFIG[pvr] = ",-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}"
+PACKAGECONFIG[sgx] = ",-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}"
+
+PV:append = "+pvr"
+
+GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
+GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
+
+do_install:append () {
+    # remove pvr custom pkgconfig
+    rm -rf ${D}${datadir}/pkgconfig
+}
+
+RRECOMMENDS:mesa-megadriver:class-target:append = "${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features
  2023-01-26  3:08 [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Randolph Sapp
  2023-01-26  3:08 ` [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches Randolph Sapp
  2023-01-26  3:08 ` [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain Randolph Sapp
@ 2023-01-26  3:08 ` Randolph Sapp
  2023-01-26 18:02   ` Andrew Davis
  2023-01-26  3:08 ` [kirkstone PATCH 4/4] meta-ti-bsp: machine: Attempt to update DC alias Randolph Sapp
  2023-01-26 18:13 ` [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Andrew Davis
  4 siblings, 1 reply; 19+ messages in thread
From: Randolph Sapp @ 2023-01-26  3:08 UTC (permalink / raw)
  To: denys, reatmon, detheridge, afd; +Cc: meta-ti, k-bhargav, Randolph Sapp

Remove all gpu machine features and instead rely on the new dependency
chain for resolving gpu dependencies. Set preferred providers for
virtual/gpudriver where needed.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   | 2 --
 meta-ti-bsp/conf/machine/include/am62xx.inc   | 6 +-----
 meta-ti-bsp/conf/machine/include/am65xx.inc   | 6 +-----
 meta-ti-bsp/conf/machine/include/j721e.inc    | 6 ------
 meta-ti-bsp/conf/machine/include/j721s2.inc   | 6 ------
 meta-ti-bsp/conf/machine/include/j784s4.inc   | 6 ------
 meta-ti-bsp/conf/machine/include/omap-a15.inc | 6 +-----
 meta-ti-bsp/conf/machine/include/ti33x.inc    | 6 +-----
 meta-ti-bsp/conf/machine/include/ti43x.inc    | 6 +-----
 meta-ti-bsp/conf/machine/j784s4-evm.conf      | 2 ++
 10 files changed, 7 insertions(+), 45 deletions(-)

diff --git a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
index ef8e8692..ec9ce596 100644
--- a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
+++ b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
@@ -4,8 +4,6 @@
 
 require conf/machine/include/am62xx.inc
 
-MACHINE_FEATURES += "gpu"
-
 KERNEL_DEVICETREE = " \
     ti/k3-am62x-lp-sk.dtb \
     ti/k3-am625-skeleton.dtb \
diff --git a/meta-ti-bsp/conf/machine/include/am62xx.inc b/meta-ti-bsp/conf/machine/include/am62xx.inc
index 411e5265..35f3f071 100644
--- a/meta-ti-bsp/conf/machine/include/am62xx.inc
+++ b/meta-ti-bsp/conf/machine/include/am62xx.inc
@@ -1,15 +1,11 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am62xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen touchscreen"
 
 SERIAL_CONSOLES = "115200;ttyS2"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
 TFA_BOARD = "lite"
diff --git a/meta-ti-bsp/conf/machine/include/am65xx.inc b/meta-ti-bsp/conf/machine/include/am65xx.inc
index 424864d3..385bb164 100644
--- a/meta-ti-bsp/conf/machine/include/am65xx.inc
+++ b/meta-ti-bsp/conf/machine/include/am65xx.inc
@@ -1,15 +1,11 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am65xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen touchscreen"
 
 SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_DEVICETREE = " \
diff --git a/meta-ti-bsp/conf/machine/include/j721e.inc b/meta-ti-bsp/conf/machine/include/j721e.inc
index eba10d8d..67f5fe0f 100644
--- a/meta-ti-bsp/conf/machine/include/j721e.inc
+++ b/meta-ti-bsp/conf/machine/include/j721e.inc
@@ -1,12 +1,6 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":j721e"
 
-MACHINE_FEATURES += "gpu"
-
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
 # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw
diff --git a/meta-ti-bsp/conf/machine/include/j721s2.inc b/meta-ti-bsp/conf/machine/include/j721s2.inc
index fc6493b8..f33a3aba 100644
--- a/meta-ti-bsp/conf/machine/include/j721s2.inc
+++ b/meta-ti-bsp/conf/machine/include/j721s2.inc
@@ -1,12 +1,6 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":j721s2"
 
-MACHINE_FEATURES += "gpu"
-
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
 TFA_BOARD = "generic"
diff --git a/meta-ti-bsp/conf/machine/include/j784s4.inc b/meta-ti-bsp/conf/machine/include/j784s4.inc
index d268b810..df0faede 100644
--- a/meta-ti-bsp/conf/machine/include/j784s4.inc
+++ b/meta-ti-bsp/conf/machine/include/j784s4.inc
@@ -1,12 +1,6 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":j784s4"
 
-MACHINE_FEATURES += "gpu"
-
-PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
 TFA_BOARD = "j784s4"
diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc
index 0843fb28..efa33a10 100644
--- a/meta-ti-bsp/conf/machine/include/omap-a15.inc
+++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc
@@ -10,10 +10,6 @@ MACHINE_KERNEL_PR = "r7"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_IMAGETYPE = "zImage"
@@ -45,7 +41,7 @@ EXTRA_IMAGEDEPENDS += "virtual/bootloader"
 UBI_VOLNAME = "rootfs"
 
 # List common SoC features, may need to add touchscreen for specific machines
-MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu mmip dsp gc320"
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet mmip dsp gc320"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 WKS_FILE ?= "sdimage-2part.wks"
diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc
index cfacc30d..e2f75359 100644
--- a/meta-ti-bsp/conf/machine/include/ti33x.inc
+++ b/meta-ti-bsp/conf/machine/include/ti33x.inc
@@ -11,10 +11,6 @@ MACHINE_KERNEL_PR = "r22"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_IMAGETYPE = "zImage"
@@ -55,7 +51,7 @@ UBI_VOLNAME = "rootfs"
 EXTRA_IMAGEDEPENDS += "virtual/bootloader"
 
 # List common SoC features, may need to add touchscreen for specific machines
-MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet gpu"
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 WKS_FILE ?= "sdimage-2part.wks"
diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc
index 74a964db..e9999910 100644
--- a/meta-ti-bsp/conf/machine/include/ti43x.inc
+++ b/meta-ti-bsp/conf/machine/include/ti43x.inc
@@ -11,10 +11,6 @@ MACHINE_KERNEL_PR = "r3"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
-PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
-PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
 
 KERNEL_IMAGETYPE = "zImage"
@@ -54,7 +50,7 @@ UBI_VOLNAME = "rootfs"
 EXTRA_IMAGEDEPENDS += "u-boot"
 
 # List common SoC features, may need to add touchscreen for specific machines
-MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu"
+MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet"
 
 IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
 WKS_FILE ?= "sdimage-2part.wks"
diff --git a/meta-ti-bsp/conf/machine/j784s4-evm.conf b/meta-ti-bsp/conf/machine/j784s4-evm.conf
index 73f3eb8c..796ca116 100644
--- a/meta-ti-bsp/conf/machine/j784s4-evm.conf
+++ b/meta-ti-bsp/conf/machine/j784s4-evm.conf
@@ -9,6 +9,8 @@ SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 TFA_K3_USART = "0x8"
 OPTEE_K3_USART = "0x8"
 
+PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
+
 KERNEL_DEVICETREE = " \
     ti/k3-j784s4-evm.dtb \
 "
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [kirkstone PATCH 4/4] meta-ti-bsp: machine: Attempt to update DC alias
  2023-01-26  3:08 [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Randolph Sapp
                   ` (2 preceding siblings ...)
  2023-01-26  3:08 ` [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features Randolph Sapp
@ 2023-01-26  3:08 ` Randolph Sapp
  2023-01-26 18:07   ` Andrew Davis
  2023-01-26 18:13 ` [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Andrew Davis
  4 siblings, 1 reply; 19+ messages in thread
From: Randolph Sapp @ 2023-01-26  3:08 UTC (permalink / raw)
  To: denys, reatmon, detheridge, afd; +Cc: meta-ti, k-bhargav, Randolph Sapp

Attempt to update the SGX display controller alias variable according to
what Andrew told me. SGX apparently had a few different aliases across
platforms.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 meta-ti-bsp/conf/machine/include/omap-a15.inc | 3 +++
 meta-ti-bsp/conf/machine/include/ti33x.inc    | 3 +++
 meta-ti-bsp/conf/machine/include/ti43x.inc    | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc
index efa33a10..e5349134 100644
--- a/meta-ti-bsp/conf/machine/include/omap-a15.inc
+++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc
@@ -10,7 +10,10 @@ MACHINE_KERNEL_PR = "r7"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
+
+# Graphics providers and variables
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
+PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
 
 KERNEL_IMAGETYPE = "zImage"
 KERNEL_IMAGETYPES = "zImage uImage"
diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc
index e2f75359..97c7d3c8 100644
--- a/meta-ti-bsp/conf/machine/include/ti33x.inc
+++ b/meta-ti-bsp/conf/machine/include/ti33x.inc
@@ -11,7 +11,10 @@ MACHINE_KERNEL_PR = "r22"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
+
+# Graphics providers and variables
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
+PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc"
 
 KERNEL_IMAGETYPE = "zImage"
 
diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc
index e9999910..ddd430d5 100644
--- a/meta-ti-bsp/conf/machine/include/ti43x.inc
+++ b/meta-ti-bsp/conf/machine/include/ti43x.inc
@@ -11,7 +11,10 @@ MACHINE_KERNEL_PR = "r3"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
 PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
 PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
+
+# Graphics providers and variables
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
+PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
 
 KERNEL_IMAGETYPE = "zImage"
 
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches
  2023-01-26  3:08 ` [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches Randolph Sapp
@ 2023-01-26 17:06   ` Andrew Davis
  2023-01-26 20:48     ` [meta-ti] " Denys Dmytriyenko
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew Davis @ 2023-01-26 17:06 UTC (permalink / raw)
  To: Randolph Sapp, denys, reatmon, detheridge; +Cc: meta-ti, k-bhargav

On 1/25/23 9:08 PM, Randolph Sapp wrote:
> Copy over current patches from oe-core for mesa since we're going to be
> overriding the SRC_URI string and we still need those.
> 

We control the repo we will be pointing at, I'd say just add these
patches over there directly so this commit would be not needed.

Andrew

> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>   ...nd-deprecate-drm_handle_format-and-d.patch | 158 ++++++++++++++++++
>   ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++++
>   ...sdetects-64bit-atomics-on-mips-clang.patch |  25 +++
>   ...k-for-all-linux-host_os-combinations.patch |  43 +++++
>   ...ormat-Check-for-NEON-before-using-it.patch |  47 ++++++
>   ...02-meson.build-make-TLS-ELF-optional.patch |  61 +++++++
>   6 files changed, 368 insertions(+)
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> 
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
> new file mode 100644
> index 00000000..dac2de4e
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
> @@ -0,0 +1,158 @@
> +From 7796c2c56c960ac55e49246f0349ac52539ada55 Mon Sep 17 00:00:00 2001
> +From: Leandro Ribeiro <leandro.ribeiro@collabora.com>
> +Date: Sun, 10 Apr 2022 22:54:36 -0300
> +Subject: [PATCH] Revert "egl/wayland: deprecate drm_handle_format() and
> + drm_handle_capabilities()"
> +
> +Commit af1ee8e010441f8f2ed8c77065b159652a4ac9fe dropped support to
> +wl_drm, as we thought that most compositors from active projects were
> +already supporting zwp_linux_dmabuf_v1.
> +
> +But that's not true, so revert this commit in order to give these
> +projects a longer transition period.
> +
> +Note that we didn't add back the support to GEM name API, and that was
> +on purpose.
> +
> +Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
> +Reviewed-by: Simon Ser <contact@emersion.fr>
> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15822>
> +
> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> +Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/c60fea8c228ae3f32e20d6b65c473d9f04871d20]
> +---
> + src/egl/drivers/dri2/egl_dri2.h         |  1 +
> + src/egl/drivers/dri2/platform_wayland.c | 59 +++++++++++++++++++------
> + 2 files changed, 47 insertions(+), 13 deletions(-)
> +
> +diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
> +index c466ff83c53..eecb32a53fd 100644
> +--- a/src/egl/drivers/dri2/egl_dri2.h
> ++++ b/src/egl/drivers/dri2/egl_dri2.h
> +@@ -283,6 +283,7 @@ struct dri2_egl_display
> +    struct zwp_linux_dmabuf_feedback_v1 *wl_dmabuf_feedback;
> +    struct dmabuf_feedback_format_table format_table;
> +    bool authenticated;
> ++   uint32_t capabilities;
> +    char *device_name;
> + #endif
> +
> +diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> +index 5ff83cce08a..843434376a7 100644
> +--- a/src/egl/drivers/dri2/platform_wayland.c
> ++++ b/src/egl/drivers/dri2/platform_wayland.c
> +@@ -1343,7 +1343,7 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
> +                  struct dri2_egl_surface *dri2_surf,
> +                  __DRIimage *image)
> + {
> +-   struct wl_buffer *ret;
> ++   struct wl_buffer *ret = NULL;
> +    EGLBoolean query;
> +    int width, height, fourcc, num_planes;
> +    uint64_t modifier = DRM_FORMAT_MOD_INVALID;
> +@@ -1447,11 +1447,28 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
> +       ret = zwp_linux_buffer_params_v1_create_immed(params, width, height,
> +                                                     fourcc, 0);
> +       zwp_linux_buffer_params_v1_destroy(params);
> ++   } else {
> ++      struct wl_drm *wl_drm =
> ++         dri2_surf ? dri2_surf->wl_drm_wrapper : dri2_dpy->wl_drm;
> ++      int fd = -1, stride;
> ++
> ++      if (num_planes > 1)
> ++         return NULL;
> ++
> ++      query = dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FD, &fd);
> ++      query &= dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &stride);
> ++      if (!query) {
> ++         if (fd >= 0)
> ++            close(fd);
> ++         return NULL;
> ++      }
> +
> +-      return ret;
> ++      ret = wl_drm_create_prime_buffer(wl_drm, fd, width, height, fourcc, 0,
> ++                                       stride, 0, 0, 0, 0);
> ++      close(fd);
> +    }
> +
> +-   return NULL;
> ++   return ret;
> + }
> +
> + static EGLBoolean
> +@@ -1698,16 +1715,21 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
> + static void
> + drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
> + {
> +-   /* deprecated, as compositors already support the dma-buf protocol extension
> +-    * and so we can rely on dmabuf_handle_modifier() to receive formats and
> +-    * modifiers */
> ++   struct dri2_egl_display *dri2_dpy = data;
> ++   int visual_idx = dri2_wl_visual_idx_from_fourcc(format);
> ++
> ++   if (visual_idx == -1)
> ++      return;
> ++
> ++   BITSET_SET(dri2_dpy->formats.formats_bitmap, visual_idx);
> + }
> +
> + static void
> + drm_handle_capabilities(void *data, struct wl_drm *drm, uint32_t value)
> + {
> +-   /* deprecated, as compositors already support the dma-buf protocol extension
> +-    * and so we can rely on it to create wl_buffer's */
> ++   struct dri2_egl_display *dri2_dpy = data;
> ++
> ++   dri2_dpy->capabilities = value;
> + }
> +
> + static void
> +@@ -2075,13 +2097,12 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
> +    wl_registry_add_listener(dri2_dpy->wl_registry,
> +                             &registry_listener_drm, dri2_dpy);
> +
> +-   /* The compositor must expose the dma-buf interface. */
> +-   if (roundtrip(dri2_dpy) < 0 || dri2_dpy->wl_dmabuf == NULL)
> ++   if (roundtrip(dri2_dpy) < 0)
> +       goto cleanup;
> +
> +    /* Get default dma-buf feedback */
> +-   if (zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
> +-       ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
> ++   if (dri2_dpy->wl_dmabuf && zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
> ++                              ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
> +       dmabuf_feedback_format_table_init(&dri2_dpy->format_table);
> +       dri2_dpy->wl_dmabuf_feedback =
> +          zwp_linux_dmabuf_v1_get_default_feedback(dri2_dpy->wl_dmabuf);
> +@@ -2089,7 +2110,6 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
> +                                                 &dmabuf_feedback_listener, dri2_dpy);
> +    }
> +
> +-   /* Receive events from the interfaces */
> +    if (roundtrip(dri2_dpy) < 0)
> +       goto cleanup;
> +
> +@@ -2176,6 +2196,19 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
> +
> +    dri2_wl_setup_swap_interval(disp);
> +
> ++   if (dri2_dpy->wl_drm) {
> ++      /* To use Prime, we must have _DRI_IMAGE v7 at least. createImageFromFds
> ++       * support indicates that Prime export/import is supported by the driver.
> ++       * We deprecated the support to GEM names API, so we bail out if the
> ++       * driver does not suport Prime. */
> ++      if (!(dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) ||
> ++          (dri2_dpy->image->base.version < 7) ||
> ++          (dri2_dpy->image->createImageFromFds == NULL)) {
> ++         _eglLog(_EGL_WARNING, "wayland-egl: display does not support prime");
> ++         goto cleanup;
> ++      }
> ++   }
> ++
> +    if (dri2_dpy->is_different_gpu &&
> +        (dri2_dpy->image->base.version < 9 ||
> +         dri2_dpy->image->blitImage == NULL)) {
> +--
> +2.35.1
> +
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
> new file mode 100644
> index 00000000..3b0bfa32
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
> @@ -0,0 +1,34 @@
> +From 253b042d2bf10e9abfa9cc508e0782aefd834145 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Fri, 16 Oct 2020 11:03:47 -0700
> +Subject: [PATCH] futex.h: Define __NR_futex if it does not exist
> +
> +__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
> +they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
> +__NR_futex, since this is used in applications, such applications start
> +to fail to build for these newer architectures. This patch defines a
> +fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
> +working
> +
> +Upstream-Status: Pending
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +
> +---
> + src/util/futex.h | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/src/util/futex.h b/src/util/futex.h
> +index 43097f4..941b0ec 100644
> +--- a/src/util/futex.h
> ++++ b/src/util/futex.h
> +@@ -34,6 +34,10 @@
> + #include <sys/syscall.h>
> + #include <sys/time.h>
> +
> ++#if !defined(SYS_futex) && defined(SYS_futex_time64)
> ++# define SYS_futex SYS_futex_time64
> ++#endif
> ++
> + static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
> + {
> +    return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
> new file mode 100644
> index 00000000..b08e4d86
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
> @@ -0,0 +1,25 @@
> +From d34bdbd80e5a1f309d2ba280cdc66ff0ee0e5c43 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Mon, 13 Jan 2020 15:23:47 -0800
> +Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
> +
> +Upstream-Status: Pending
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +
> +---
> + src/util/u_atomic.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
> +index 5a5eab4..e499516 100644
> +--- a/src/util/u_atomic.c
> ++++ b/src/util/u_atomic.c
> +@@ -21,7 +21,7 @@
> +  * IN THE SOFTWARE.
> +  */
> +
> +-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
> ++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
> +
> + #include <stdint.h>
> + #include <pthread.h>
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> new file mode 100644
> index 00000000..aea23d0e
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> @@ -0,0 +1,43 @@
> +From f9c597a2c517eb85c23cbeeb2e95c55794c74cda Mon Sep 17 00:00:00 2001
> +From: Alistair Francis <alistair@alistair23.me>
> +Date: Thu, 14 Nov 2019 13:04:49 -0800
> +Subject: [PATCH] meson.build: check for all linux host_os combinations
> +
> +Make sure that we are also looking for our host_os combinations like
> +linux-musl etc. when assuming support for DRM/KMS.
> +
> +Also delete a duplicate line.
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> +Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> +Signed-off-by: Alistair Francis <alistair@alistair23.me>
> +
> +---
> + meson.build | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index bca6b1f..70d06c0 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -172,7 +172,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
> + # Only build shared_glapi if at least one OpenGL API is enabled
> + with_shared_glapi = with_shared_glapi and with_any_opengl
> +
> +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
> ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> +
> + dri_drivers = get_option('dri-drivers')
> + if dri_drivers.length() != 0
> +@@ -1074,7 +1074,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
> + endif
> +
> + # TODO: this is very incomplete
> +-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system())
> ++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> +   pre_args += '-D_GNU_SOURCE'
> + elif host_machine.system() == 'sunos'
> +   pre_args += '-D__EXTENSIONS__'
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> new file mode 100644
> index 00000000..5c6165c2
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> @@ -0,0 +1,47 @@
> +From fdb2face4eeac3c20eedcca7520f4e7014225fb4 Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Thu, 2 Dec 2021 19:57:42 -0800
> +Subject: [PATCH] util/format: Check for NEON before using it
> +
> +This fixes build on rpi0-w and any other machine which does not have
> +neon unit and is not used as FPU unit
> +
> +Fixes errors e.g.
> +
> +In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> +/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
> +
> +Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +
> +---
> + src/util/format/u_format.c             | 2 +-
> + src/util/format/u_format_unpack_neon.c | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> +index 36c5e52..f0a0097 100644
> +--- a/src/util/format/u_format.c
> ++++ b/src/util/format/u_format.c
> +@@ -1138,7 +1138,7 @@ static void
> + util_format_unpack_table_init(void)
> + {
> +    for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
> +-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> ++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> +       const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
> +       if (unpack) {
> +          util_format_unpack_table[format] = unpack;
> +diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
> +index a4a5cb1..1e4f794 100644
> +--- a/src/util/format/u_format_unpack_neon.c
> ++++ b/src/util/format/u_format_unpack_neon.c
> +@@ -23,7 +23,7 @@
> +
> + #include <u_format.h>
> +
> +-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> ++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> +
> + /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
> +  * unless you tell it "no really".
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> new file mode 100644
> index 00000000..af11baee
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> @@ -0,0 +1,61 @@
> +From bf41fa026ae3d378e62fd83d03a6f5933b52ca04 Mon Sep 17 00:00:00 2001
> +From: Alistair Francis <alistair@alistair23.me>
> +Date: Thu, 14 Nov 2019 13:08:31 -0800
> +Subject: [PATCH] meson.build: make TLS ELF optional
> +
> +USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
> +TLS GLX optional again" patch updated to the latest mesa.
> +
> +For details, see:
> +https://gitlab.freedesktop.org/mesa/mesa/-/issues/966
> +
> +This prevents runtime segfault on musl:
> +
> +Traceback (most recent call last):
> +  File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
> +    return func(*args, **kwargs)
> +  File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/runtime/cases/parselogs.py", line 378, in test_parselogs
> +    self.assertEqual(errcount, 0, msg=self.msg)
> +AssertionError: 1 != 0 : Log: /home/pokybuild/yocto-worker/musl-qemux86/build/build/tmp/work/qemux86-poky-linux-musl/core-image-sato-sdk/1.0-r0/target_logs/Xorg.0.log
> +
> +Upstream-Status: Inappropriate [configuration]
> +---
> + meson.build       | 7 +++++--
> + meson_options.txt | 6 ++++++
> + 2 files changed, 11 insertions(+), 2 deletions(-)
> +
> +diff --git a/meson.build b/meson.build
> +index 70d06c0..1441611 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -490,8 +490,11 @@ foreach platform : _platforms
> +   pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
> + endforeach
> +
> +-use_elf_tls = true
> +-pre_args += '-DUSE_ELF_TLS'
> ++use_elf_tls = false
> ++if get_option('elf-tls')
> ++  use_elf_tls = true
> ++  pre_args += '-DUSE_ELF_TLS'
> ++endif
> +
> + if with_platform_android and get_option('platform-sdk-version') >= 29
> +   # By default the NDK compiler, at least, emits emutls references instead of
> +diff --git a/meson_options.txt b/meson_options.txt
> +index 1f6ef38..99cc5cb 100644
> +--- a/meson_options.txt
> ++++ b/meson_options.txt
> +@@ -440,6 +440,12 @@ option(
> +   value : true,
> +   description : 'Enable direct rendering in GLX and EGL for DRI',
> + )
> ++option(
> ++  'elf-tls',
> ++  type : 'boolean',
> ++  value : true,
> ++  description : 'Enable TLS support in ELF',
> ++)
> + option('egl-lib-suffix',
> +   type : 'string',
> +   value : '',


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain
  2023-01-26  3:08 ` [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain Randolph Sapp
@ 2023-01-26 17:54   ` Andrew Davis
  2023-01-26 19:38     ` Sapp, Randolph
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew Davis @ 2023-01-26 17:54 UTC (permalink / raw)
  To: Randolph Sapp, denys, reatmon, detheridge; +Cc: meta-ti, k-bhargav

On 1/25/23 9:08 PM, Randolph Sapp wrote:
> Patched mesa will now be configured based on what virtual/gpudriver
> preferred provider is selected. The gpu drivers will now runtime
> recommend the associated um components.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>   ...-OpenEmbedded-nodistro-internal-aarc.patch | 29 --------
>   ...bb => ti-img-rogue-driver_1.18.6276027.bb} | 20 +++---
>   .../ti-sgx-ddk-km_1.17.4948957.bb             |  8 +--
>   .../ti-img-rogue-umlibs_1.15.6133109.bb       | 71 -------------------
>   .../ti-img-rogue-umlibs_1.18.6276027.bb       | 39 ++++++++++
>   .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     | 31 ++------
>   .../mesa/mesa-gl_22.0.%.bbappend              |  1 +
>   .../mesa/mesa_22.0.%.bbappend                 |  2 +
>   .../recipes-graphics/mesa/pvr-mesa.inc        | 39 ++++++++++
>   9 files changed, 100 insertions(+), 140 deletions(-)
>   delete mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
>   rename meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_1.15.6133109.bb => ti-img-rogue-driver_1.18.6276027.bb} (72%)
>   delete mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
>   create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
> 
> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
> deleted file mode 100644
> index f021cc39..00000000
> --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -From 80d32fee3d768abbd77cce77ea9a7574651460a9 Mon Sep 17 00:00:00 2001
> -From: Denys Dmytriyenko <denis@denix.org>
> -Date: Wed, 7 Jul 2021 13:11:56 -0400
> -Subject: [PATCH] compiler: support OpenEmbedded "nodistro" internal aarch64
> - toolchain
> -
> -Upstream-Status: Pending
> -
> -Signed-off-by: Denys Dmytriyenko <denis@denix.org>
> ----
> - build/linux/config/compiler.mk | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/build/linux/config/compiler.mk b/build/linux/config/compiler.mk
> -index 53a0bef..d788579 100644
> ---- a/build/linux/config/compiler.mk
> -+++ b/build/linux/config/compiler.mk
> -@@ -65,7 +65,7 @@ define calculate-compiler-preferred-target
> -    ifneq ($$(filter i386-% i486-% i586-% i686-%,$$($(1)_compiler_preferred_target)),)
> -     $(1)_compiler_preferred_target := i386-linux-gnu
> -    endif
> --   ifneq ($$(filter aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
> -+   ifneq ($$(filter aarch64-oe-linux aarch64-poky-linux,$$($(1)_compiler_preferred_target)),)
> -     $(1)_compiler_preferred_target := aarch64-linux-gnu
> -    endif
> -    ifneq ($$(filter armv7a-cros-linux-gnueabi armv7l-tizen-linux-gnueabi,$$($(1)_compiler_preferred_target)),)
> ---
> -2.7.4
> -
> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
> similarity index 72%
> rename from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb
> rename to meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
> index b4d19195..96fb7484 100644
> --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb
> +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb
> @@ -3,40 +3,38 @@ HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-driver"
>   LICENSE = "MIT | GPL-2.0-only"
>   LIC_FILES_CHKSUM = "file://README;beginline=14;endline=19;md5=0403c7dea01a2b8232261e805325fac2"
>   
> -inherit module features_check
> +inherit module
>   
> -REQUIRED_MACHINE_FEATURES = "gpu"
> +PROVIDES = "virtual/gpudriver"
>   
>   MACHINE_KERNEL_PR:append = "b"
>   PR = "${MACHINE_KERNEL_PR}"
>   
>   PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
>   COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
>   
>   DEPENDS = "virtual/kernel"
>   
> -PROVIDES = "virtual/gpudriver"
> +BRANCH = "linuxws/kirkstone/k5.10/${PV}"
>   
> -BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
> -
> -SRC_URI = " \
> -    git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH} \
> -    file://0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch \
> -"
> +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-driver.git;protocol=https;branch=${BRANCH}"
>   
>   S = "${WORKDIR}/git"
>   
> -SRCREV = "c901804e8221d477983a6f7224a9cdc6e832f050"
> +SRCREV = "d575e4f64c95a3534e10e85da15bd303febf133f"
>   
>   TARGET_PRODUCT:j721e = "j721e_linux"
>   TARGET_PRODUCT:j721s2 = "j721s2_linux"
>   TARGET_PRODUCT:j784s4 = "j784s4_linux"
>   TARGET_PRODUCT:am62xx = "am62_linux"
>   PVR_BUILD = "release"
> -PVR_WS = "wayland"
> +PVR_WS = "lws-generic"
>   
>   EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" BUILD=${PVR_BUILD} PVR_BUILD_DIR=${TARGET_PRODUCT} WINDOW_SYSTEM=${PVR_WS}'
>   
>   do_install() {
>       make -C ${STAGING_KERNEL_DIR} M=${B}/binary_${TARGET_PRODUCT}_${PVR_WS}_${PVR_BUILD}/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
>   }
> +
> +RRECOMMENDS:${PN} += "ti-img-rogue-umlibs"
> diff --git a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> index c22e3096..13b8757c 100644
> --- a/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> +++ b/meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb
> @@ -3,9 +3,9 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-linux"
>   LICENSE = "MIT | GPL-2.0-only"
>   LIC_FILES_CHKSUM = "file://eurasia_km/README;beginline=13;endline=22;md5=74506d9b8e5edbce66c2747c50fcef12"
>   
> -inherit module features_check
> +inherit module
>   
> -REQUIRED_MACHINE_FEATURES = "gpu"
> +PROVIDES = "virtual/gpudriver"
>   
>   COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|k3"
>   
> @@ -16,8 +16,6 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
>   
>   DEPENDS = "virtual/kernel"
>   
> -PROVIDES = "virtual/gpudriver"
> -
>   BRANCH = "ti-img-sgx/${PV}/k5.10"
>   
>   SRC_URI = "git://git.ti.com/git/graphics/omap5-sgx-ddk-linux.git;protocol=https;branch=${BRANCH}"
> @@ -44,3 +42,5 @@ do_install() {
>   do_install:k3() {
>       make -C ${STAGING_KERNEL_DIR} M=${B}/eurasia_km/eurasiacon/binary_omap_linux_nulldrmws_release/target_aarch64/kbuild INSTALL_MOD_PATH=${D}${root_prefix} PREFIX=${STAGING_DIR_HOST} modules_install
>   }
> +
> +RRECOMMENDS:${PN} += "ti-sgx-ddk-um"
> diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
> deleted file mode 100644
> index a665c614..00000000
> --- a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
> +++ /dev/null
> @@ -1,71 +0,0 @@
> -DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
> -HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
> -LICENSE = "TI-TFL"
> -LIC_FILES_CHKSUM = "file://LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
> -
> -inherit features_check
> -
> -REQUIRED_MACHINE_FEATURES = "gpu"
> -
> -PACKAGE_ARCH = "${MACHINE_ARCH}"
> -COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
> -
> -PR = "r2"
> -
> -BRANCH = "linuxws/dunfell/k5.10/${PV}_unified_fw_pagesize"
> -
> -SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
> -SRCREV = "5977e82b96028f783d39c7219f016c1faf8dc5f5"
> -
> -TARGET_PRODUCT:j721e = "j721e_linux"
> -TARGET_PRODUCT:j721s2 = "j721s2_linux"
> -TARGET_PRODUCT:j784s4 = "j784s4_linux"
> -TARGET_PRODUCT:am62xx = "am62_linux"
> -PVR_BUILD ?= "release"
> -PVR_WS = "wayland"
> -
> -INITSCRIPT_NAME = "rc.pvr"
> -INITSCRIPT_PARAMS = "defaults 8"
> -
> -inherit update-rc.d
> -
> -PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm"
> -
> -DEPENDS += "libdrm wayland expat"
> -RDEPENDS:${PN} += "bash"
> -RDEPENDS:${PN} += "wayland expat"
> -
> -RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
> -RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
> -RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
> -
> -RREPLACES:${PN} = "libegl libgles1 liblges2 libgbm"
> -RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
> -RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
> -
> -RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
> -RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
> -RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
> -
> -RRECOMMENDS:${PN} += "ti-img-rogue-driver"
> -
> -S = "${WORKDIR}/git"
> -
> -do_install () {
> -    oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT} BUILD=${PVR_BUILD} WINDOW_SYSTEM=${PVR_WS}
> -    chown -R root:root ${D}
> -}
> -
> -FILES:${PN} += " ${nonarch_base_libdir}/firmware/"
> -FILES:${PN} += " ${datadir}/"
> -
> -PACKAGES =+ "${PN}-plugins"
> -FILES:${PN}-plugins = "${libdir}/libGLESv2.so ${libdir}/libGLESv1_CM.so ${libdir}/libEGL.so ${libdir}/dri/pvr_dri.so"
> -RDEPENDS:${PN} += "${PN}-plugins"
> -
> -ALLOW_EMPTY:${PN}-plugins = "1"
> -
> -INSANE_SKIP:${PN} += "ldflags arch already-stripped"
> -INSANE_SKIP:${PN}-plugins = "dev-so"
> -
> -CLEANBROKEN = "1"
> diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
> new file mode 100644
> index 00000000..924e46ba
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
> @@ -0,0 +1,39 @@
> +DESCRIPTION = "Userspace libraries for PowerVR Rogue GPU on TI SoCs"
> +HOMEPAGE = "http://git.ti.com/graphics/ti-img-rogue-umlibs"
> +LICENSE = "TI-TFL"
> +LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=7232b98c1c58f99e3baa03de5207e76f"
> +
> +inherit bin_package
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +COMPATIBLE_MACHINE = "j721e|j721s2|j784s4|am62xx"
> +
> +PR = "r2"
> +
> +BRANCH = "linuxws/kirkstone/k5.10/${PV}"
> +SRC_URI = "git://git.ti.com/git/graphics/ti-img-rogue-umlibs.git;protocol=https;branch=${BRANCH}"
> +SRCREV = "51e598919641d51156a631efa5447124a3c0f543"
> +S = "${WORKDIR}/git/targetfs/${TARGET_PRODUCT}/${PVR_WS}/${PVR_BUILD}"
> +
> +TARGET_PRODUCT:j721e = "j721e_linux"
> +TARGET_PRODUCT:j721s2 = "j721s2_linux"
> +TARGET_PRODUCT:j784s4 = "j784s4_linux"
> +TARGET_PRODUCT:am62xx = "am62_linux"
> +PVR_BUILD = "release"
> +PVR_WS = "lws-generic"
> +
> +RDEPENDS:${PN} += "mesa-megadriver libdrm ti-img-rogue-driver"
> +
> +do_install:append() {
> +    rm -rf "${D}/etc/init.d"
> +    rm -rf "${D}/usr/lib/libvulkan.so"
> +    rm -rf "${D}/usr/lib/libvulkan.so.0"
> +    rm -rf "${D}/usr/lib/libvulkan.so.1"
> +}
> +
> +PACKAGES = "${PN}-tools ${PN}"
> +FILES:${PN}-tools = "${bindir}/"
> +RDEPENDS:${PN}-tools = "python3-core"
> +RRECOMMENDS:${PN} += "${PN}-tools"
> +
> +INSANE_SKIP:${PN} += "ldflags arch already-stripped dev-so"
> diff --git a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
> index fb98eb68..2d96ebac 100644
> --- a/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
> +++ b/meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb
> @@ -3,10 +3,6 @@ HOMEPAGE = "https://git.ti.com/graphics/omap5-sgx-ddk-um-linux"
>   LICENSE = "TI-TSPA"
>   LIC_FILES_CHKSUM = "file://TI-Linux-Graphics-DDK-UM-Manifest.doc;md5=b17390502bc89535c86cfbbae961a2a8"
>   
> -inherit features_check
> -
> -REQUIRED_MACHINE_FEATURES = "gpu"
> -
>   PACKAGE_ARCH = "${MACHINE_ARCH}"
>   COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|am65xx"
>   
> @@ -27,26 +23,7 @@ INITSCRIPT_PARAMS = "defaults 8"
>   
>   inherit update-rc.d
>   
> -PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm"
> -
> -DEPENDS += "libdrm udev wayland wayland-protocols libffi expat"
> -DEPENDS:append:libc-musl = " gcompat"
> -RDEPENDS:${PN} += "libdrm libdrm-omap udev wayland wayland-protocols libffi expat"
> -
> -RPROVIDES:${PN} = "libegl libgles1 libgles2 libgbm"
> -RPROVIDES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
> -RPROVIDES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
> -
> -RREPLACES:${PN} = "libegl libgles1 libgles2 libgbm"
> -RREPLACES:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
> -RREPLACES:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
> -
> -RCONFLICTS:${PN} = "libegl libgles1 libgles2 libgbm"
> -RCONFLICTS:${PN}-dev = "libegl-dev libgles1-dev libgles2-dev libgbm-dev"
> -RCONFLICTS:${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg libgbm-dbg"
> -
> -# The actual SONAME is libGLESv2.so.2, so need to explicitly specify RPROVIDES for .so.1 here
> -RPROVIDES:${PN} += "libGLESv2.so.1"
> +RDEPENDS:${PN} += "libdrm libdrm-omap"

These are not runtime dependencies, libdrm is still regular built time DEPENDS.
(libdrm-omap can be dropped, we don't need that at all anymore)

Runtime we do need udev so this should all be now:

DEPENDS += "libdrm"
DEPENDS:append:libc-musl = " gcompat"
RDEPENDS:${PN} += "udev"

>   
>   RRECOMMENDS:${PN} += "ti-sgx-ddk-km"
>   
> @@ -54,7 +31,11 @@ S = "${WORKDIR}/git"
>   
>   do_install () {
>       oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT}
> -    ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1
> +
> +    # HACKS until the kirkstone branch of sgx-ddk-um-linux is cleaned up

Didn't realize you were going to cover SGX already, here let me get you a cleaned
up branch:

https://git.ti.com/cgit/graphics/omap5-sgx-ddk-um-linux/log/?h=ti-img-sgx/kirkstone-mesa/1.17.4948957

should be able to update the BRANCH/SRCREV to that then drop this hack here.

> +    rm -rf ${D}${libdir}/libEGL*
> +    rm -rf ${D}${libdir}/libgbm*
> +    rm -rf ${D}${libdir}/dri
>   
>       chown -R root:root ${D}
>   }
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
> new file mode 100644
> index 00000000..b9eac156
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
> @@ -0,0 +1 @@
> +require pvr-mesa.inc
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
> new file mode 100644
> index 00000000..ab90e3fb
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
> @@ -0,0 +1,2 @@
> +require pvr-mesa.inc
> +
> diff --git a/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
> new file mode 100644
> index 00000000..20095051
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
> @@ -0,0 +1,39 @@
> +# PowerVR Graphics require several patches that have not made their way
> +# upstream yet. This allows us to build the shims we need without completely
> +# clobbering mesa.
> +
> +BRANCH = "wip2/kirkstone/sgx-1.17-4948957/22.0"
> +
> +SRC_URI = "git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
> +           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
> +           file://0002-meson.build-make-TLS-ELF-optional.patch \
> +           file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
> +           file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
> +           file://0001-util-format-Check-for-NEON-before-using-it.patch \
> +           file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
> +           "
> +
> +S = "${WORKDIR}/git"
> +
> +SRCREV = "44b82a7b6fa8a86243911b1b0d6a07b0fd8ecfba"
> +
> +PACKAGECONFIG:append = " \
> +    ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver', 'pvr', '', d)} \
> +    ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-sgx-ddk-km', 'sgx', '', d)} \
> +"
> +
> +PVR_DISPLAY_CONTROLLER_ALIAS ??= "tidss"
> +PACKAGECONFIG[pvr] = ",-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}"
> +PACKAGECONFIG[sgx] = ",-Dgallium-pvr-alias=${PVR_DISPLAY_CONTROLLER_ALIAS}"

SGX uses a different param: gallium-sgx-alias

I'm still not really sure I agree with the dependency chain, but I can always
take a stab at that in a later series, no need to hold up this any longer, with
the above fixes:

Acked-by: Andrew Davis <afd@ti.com>

> +
> +PV:append = "+pvr"
> +
> +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'pvr', ',pvr', '', d)}"
> +GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'sgx', ',sgx', '', d)}"
> +
> +do_install:append () {
> +    # remove pvr custom pkgconfig
> +    rm -rf ${D}${datadir}/pkgconfig
> +}
> +
> +RRECOMMENDS:mesa-megadriver:class-target:append = "${@d.getVar('PREFERRED_PROVIDER_virtual/gpudriver')}"


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features
  2023-01-26  3:08 ` [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features Randolph Sapp
@ 2023-01-26 18:02   ` Andrew Davis
  2023-01-26 21:38     ` Ryan Eatmon
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew Davis @ 2023-01-26 18:02 UTC (permalink / raw)
  To: Randolph Sapp, denys, reatmon, detheridge; +Cc: meta-ti, k-bhargav

On 1/25/23 9:08 PM, Randolph Sapp wrote:
> Remove all gpu machine features and instead rely on the new dependency
> chain for resolving gpu dependencies. Set preferred providers for
> virtual/gpudriver where needed.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>   meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   | 2 --
>   meta-ti-bsp/conf/machine/include/am62xx.inc   | 6 +-----
>   meta-ti-bsp/conf/machine/include/am65xx.inc   | 6 +-----
>   meta-ti-bsp/conf/machine/include/j721e.inc    | 6 ------
>   meta-ti-bsp/conf/machine/include/j721s2.inc   | 6 ------
>   meta-ti-bsp/conf/machine/include/j784s4.inc   | 6 ------
>   meta-ti-bsp/conf/machine/include/omap-a15.inc | 6 +-----
>   meta-ti-bsp/conf/machine/include/ti33x.inc    | 6 +-----
>   meta-ti-bsp/conf/machine/include/ti43x.inc    | 6 +-----
>   meta-ti-bsp/conf/machine/j784s4-evm.conf      | 2 ++
>   10 files changed, 7 insertions(+), 45 deletions(-)
> 
> diff --git a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
> index ef8e8692..ec9ce596 100644
> --- a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
> +++ b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
> @@ -4,8 +4,6 @@
>   
>   require conf/machine/include/am62xx.inc
>   
> -MACHINE_FEATURES += "gpu"
> -
>   KERNEL_DEVICETREE = " \
>       ti/k3-am62x-lp-sk.dtb \
>       ti/k3-am625-skeleton.dtb \
> diff --git a/meta-ti-bsp/conf/machine/include/am62xx.inc b/meta-ti-bsp/conf/machine/include/am62xx.inc
> index 411e5265..35f3f071 100644
> --- a/meta-ti-bsp/conf/machine/include/am62xx.inc
> +++ b/meta-ti-bsp/conf/machine/include/am62xx.inc
> @@ -1,15 +1,11 @@
>   require conf/machine/include/k3.inc
>   SOC_FAMILY:append = ":am62xx"
>   
> -MACHINE_FEATURES += "screen touchscreen gpu"
> +MACHINE_FEATURES += "screen touchscreen"
>   
>   SERIAL_CONSOLES = "115200;ttyS2"
>   SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
>   
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>   
>   TFA_BOARD = "lite"
> diff --git a/meta-ti-bsp/conf/machine/include/am65xx.inc b/meta-ti-bsp/conf/machine/include/am65xx.inc
> index 424864d3..385bb164 100644
> --- a/meta-ti-bsp/conf/machine/include/am65xx.inc
> +++ b/meta-ti-bsp/conf/machine/include/am65xx.inc
> @@ -1,15 +1,11 @@
>   require conf/machine/include/k3.inc
>   SOC_FAMILY:append = ":am65xx"
>   
> -MACHINE_FEATURES += "screen touchscreen gpu"
> +MACHINE_FEATURES += "screen touchscreen"
>   
>   SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1"
>   SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
>   
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>   
>   KERNEL_DEVICETREE = " \
> diff --git a/meta-ti-bsp/conf/machine/include/j721e.inc b/meta-ti-bsp/conf/machine/include/j721e.inc
> index eba10d8d..67f5fe0f 100644
> --- a/meta-ti-bsp/conf/machine/include/j721e.inc
> +++ b/meta-ti-bsp/conf/machine/include/j721e.inc
> @@ -1,12 +1,6 @@
>   require conf/machine/include/k3.inc
>   SOC_FAMILY:append = ":j721e"
>   
> -MACHINE_FEATURES += "gpu"
> -
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>   
>   # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw
> diff --git a/meta-ti-bsp/conf/machine/include/j721s2.inc b/meta-ti-bsp/conf/machine/include/j721s2.inc
> index fc6493b8..f33a3aba 100644
> --- a/meta-ti-bsp/conf/machine/include/j721s2.inc
> +++ b/meta-ti-bsp/conf/machine/include/j721s2.inc
> @@ -1,12 +1,6 @@
>   require conf/machine/include/k3.inc
>   SOC_FAMILY:append = ":j721s2"
>   
> -MACHINE_FEATURES += "gpu"
> -
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>   
>   TFA_BOARD = "generic"
> diff --git a/meta-ti-bsp/conf/machine/include/j784s4.inc b/meta-ti-bsp/conf/machine/include/j784s4.inc
> index d268b810..df0faede 100644
> --- a/meta-ti-bsp/conf/machine/include/j784s4.inc
> +++ b/meta-ti-bsp/conf/machine/include/j784s4.inc
> @@ -1,12 +1,6 @@
>   require conf/machine/include/k3.inc
>   SOC_FAMILY:append = ":j784s4"
>   
> -MACHINE_FEATURES += "gpu"
> -
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>   
>   TFA_BOARD = "j784s4"
> diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc
> index 0843fb28..efa33a10 100644
> --- a/meta-ti-bsp/conf/machine/include/omap-a15.inc
> +++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc
> @@ -10,10 +10,6 @@ MACHINE_KERNEL_PR = "r7"
>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>   
>   KERNEL_IMAGETYPE = "zImage"
> @@ -45,7 +41,7 @@ EXTRA_IMAGEDEPENDS += "virtual/bootloader"
>   UBI_VOLNAME = "rootfs"
>   
>   # List common SoC features, may need to add touchscreen for specific machines
> -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu mmip dsp gc320"
> +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet mmip dsp gc320"
>   
>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>   WKS_FILE ?= "sdimage-2part.wks"
> diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc
> index cfacc30d..e2f75359 100644
> --- a/meta-ti-bsp/conf/machine/include/ti33x.inc
> +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc
> @@ -11,10 +11,6 @@ MACHINE_KERNEL_PR = "r22"
>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>   
>   KERNEL_IMAGETYPE = "zImage"
> @@ -55,7 +51,7 @@ UBI_VOLNAME = "rootfs"
>   EXTRA_IMAGEDEPENDS += "virtual/bootloader"
>   
>   # List common SoC features, may need to add touchscreen for specific machines
> -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet gpu"
> +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa ethernet"
>   
>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>   WKS_FILE ?= "sdimage-2part.wks"
> diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc
> index 74a964db..e9999910 100644
> --- a/meta-ti-bsp/conf/machine/include/ti43x.inc
> +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc
> @@ -11,10 +11,6 @@ MACHINE_KERNEL_PR = "r3"
>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"

Thought we were going to call our version of mesa "ti-mesa" or similar,
then we could PREFERRED_PROVIDER_virtual/x ?= "ti-mesa" here in these
machine specific includes. Otherwise everyone who includes our BSP gets
our hacky version of Mesa no matter what machine they are building for
since we call it the same name..

As before, not a blocker, lets iterate later

>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>   
>   KERNEL_IMAGETYPE = "zImage"
> @@ -54,7 +50,7 @@ UBI_VOLNAME = "rootfs"
>   EXTRA_IMAGEDEPENDS += "u-boot"
>   
>   # List common SoC features, may need to add touchscreen for specific machines
> -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet gpu"
> +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen alsa ethernet"
>   
>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>   WKS_FILE ?= "sdimage-2part.wks"
> diff --git a/meta-ti-bsp/conf/machine/j784s4-evm.conf b/meta-ti-bsp/conf/machine/j784s4-evm.conf
> index 73f3eb8c..796ca116 100644
> --- a/meta-ti-bsp/conf/machine/j784s4-evm.conf
> +++ b/meta-ti-bsp/conf/machine/j784s4-evm.conf
> @@ -9,6 +9,8 @@ SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
>   TFA_K3_USART = "0x8"
>   OPTEE_K3_USART = "0x8"
>   
> +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
> +

Don't think this is needed as we already do this in j784s4.inc.

Otherwise,

Acked-by: Andrew Davis <afd@ti.com>

>   KERNEL_DEVICETREE = " \
>       ti/k3-j784s4-evm.dtb \
>   "


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 4/4] meta-ti-bsp: machine: Attempt to update DC alias
  2023-01-26  3:08 ` [kirkstone PATCH 4/4] meta-ti-bsp: machine: Attempt to update DC alias Randolph Sapp
@ 2023-01-26 18:07   ` Andrew Davis
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew Davis @ 2023-01-26 18:07 UTC (permalink / raw)
  To: Randolph Sapp, denys, reatmon, detheridge; +Cc: meta-ti, k-bhargav

On 1/25/23 9:08 PM, Randolph Sapp wrote:
> Attempt to update the SGX display controller alias variable according to
> what Andrew told me. SGX apparently had a few different aliases across
> platforms.
> 

This Andrew seems like a smart fellow as these all look correct :)

Acked-by: Andrew Davis <afd@ti.com>

> Signed-off-by: Randolph Sapp <rs@ti.com>
> ---
>   meta-ti-bsp/conf/machine/include/omap-a15.inc | 3 +++
>   meta-ti-bsp/conf/machine/include/ti33x.inc    | 3 +++
>   meta-ti-bsp/conf/machine/include/ti43x.inc    | 3 +++
>   3 files changed, 9 insertions(+)
> 
> diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc
> index efa33a10..e5349134 100644
> --- a/meta-ti-bsp/conf/machine/include/omap-a15.inc
> +++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc
> @@ -10,7 +10,10 @@ MACHINE_KERNEL_PR = "r7"
>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> +
> +# Graphics providers and variables
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
> +PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
>   
>   KERNEL_IMAGETYPE = "zImage"
>   KERNEL_IMAGETYPES = "zImage uImage"
> diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc
> index e2f75359..97c7d3c8 100644
> --- a/meta-ti-bsp/conf/machine/include/ti33x.inc
> +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc
> @@ -11,7 +11,10 @@ MACHINE_KERNEL_PR = "r22"
>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> +
> +# Graphics providers and variables
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
> +PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc"
>   
>   KERNEL_IMAGETYPE = "zImage"
>   
> diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc
> index e9999910..ddd430d5 100644
> --- a/meta-ti-bsp/conf/machine/include/ti43x.inc
> +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc
> @@ -11,7 +11,10 @@ MACHINE_KERNEL_PR = "r3"
>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> +
> +# Graphics providers and variables
>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
> +PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
>   
>   KERNEL_IMAGETYPE = "zImage"
>   


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 0/4] Graphics, graphics, and more graphics
  2023-01-26  3:08 [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Randolph Sapp
                   ` (3 preceding siblings ...)
  2023-01-26  3:08 ` [kirkstone PATCH 4/4] meta-ti-bsp: machine: Attempt to update DC alias Randolph Sapp
@ 2023-01-26 18:13 ` Andrew Davis
  2023-01-26 20:46   ` [meta-ti] " Denys Dmytriyenko
  4 siblings, 1 reply; 19+ messages in thread
From: Andrew Davis @ 2023-01-26 18:13 UTC (permalink / raw)
  To: Randolph Sapp, denys, reatmon, detheridge; +Cc: meta-ti, k-bhargav

On 1/25/23 9:08 PM, Randolph Sapp wrote:
> Alright, this is the 6th revision of this patch. This uses a revised

I've personally had series go to v15+ and v30+ is not unheard of upstream :)

The subject tag look wrong, recommend something like:

> git format-patch origin/kirkstone -o output -C --cover-letter --subject-prefix="meta-ti][master/kirkstone][PATCH v6"

Andrew

> dependency chain (hopefully it's a little more logical) and some, well,
> interesting switching logic using the PACKAGECONFIG and
> virtual/gpudriver PREFERRED_PROVIDER override variable. I'm not sure how
> I feel about it, but it solves the issue of silently configuring things
> as needed without other layers manually enabling features.
> 
> We basically dynamically adjust mesa's PACKAGECONFIG based on what our
> selected gpudriver (and display controller, thanks sgx) is. We also add
> a runtime recommendation on the gpudriver after this configuration.
> 
> The gpudriver providers didn't change too much, they just have a runtime
> recommendation for the associated um components. As it stands, the um
> components can live alongside the software rendering components thanks
> to the mesa-megadriver being able to automatically switch as necessary
> at runtime, so we will not clobber mesa's usual packages.
> 
> Then we drop all mentions of the gpu machine feature for good measure.
> 
> "Why didn't you just add preferred providers for libgles2, etc, etc."
> Well, software rendering. If we do that we'll have to edit the
> PACKAGECONFIG to drop gles components from mesa, disabling software
> rendering. We could add a dynamic switch to do that, but honestly
> keeping in line with KISS, this solution has fewer lines and less logic
> while keeping swrast as a nice fallback for whenever anything really
> goes south... not that I'm expecting that or anything.
> 
> Randolph Sapp (4):
>    meta-ti-bsp: mesa: Add current patches
>    meta-ti-bsp: graphics: Resolve dependency chain
>    meta-ti-bsp: machine: Remove all gpu features
>    meta-ti-bsp: machine: Attempt to update DC alias
> 
>   meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   |   2 -
>   meta-ti-bsp/conf/machine/include/am62xx.inc   |   6 +-
>   meta-ti-bsp/conf/machine/include/am65xx.inc   |   6 +-
>   meta-ti-bsp/conf/machine/include/j721e.inc    |   6 -
>   meta-ti-bsp/conf/machine/include/j721s2.inc   |   6 -
>   meta-ti-bsp/conf/machine/include/j784s4.inc   |   6 -
>   meta-ti-bsp/conf/machine/include/omap-a15.inc |   9 +-
>   meta-ti-bsp/conf/machine/include/ti33x.inc    |   9 +-
>   meta-ti-bsp/conf/machine/include/ti43x.inc    |   9 +-
>   meta-ti-bsp/conf/machine/j784s4-evm.conf      |   2 +
>   ...-OpenEmbedded-nodistro-internal-aarc.patch |  29 ----
>   ...bb => ti-img-rogue-driver_1.18.6276027.bb} |  20 +--
>   .../ti-sgx-ddk-km_1.17.4948957.bb             |   8 +-
>   .../ti-img-rogue-umlibs_1.15.6133109.bb       |  71 --------
>   .../ti-img-rogue-umlibs_1.18.6276027.bb       |  39 +++++
>   .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     |  31 +---
>   ...nd-deprecate-drm_handle_format-and-d.patch | 158 ++++++++++++++++++
>   ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++++
>   ...sdetects-64bit-atomics-on-mips-clang.patch |  25 +++
>   ...k-for-all-linux-host_os-combinations.patch |  43 +++++
>   ...ormat-Check-for-NEON-before-using-it.patch |  47 ++++++
>   ...02-meson.build-make-TLS-ELF-optional.patch |  61 +++++++
>   .../mesa/mesa-gl_22.0.%.bbappend              |   1 +
>   .../mesa/mesa_22.0.%.bbappend                 |   2 +
>   .../recipes-graphics/mesa/pvr-mesa.inc        |  39 +++++
>   25 files changed, 484 insertions(+), 185 deletions(-)
>   delete mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
>   rename meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_1.15.6133109.bb => ti-img-rogue-driver_1.18.6276027.bb} (72%)
>   delete mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
>   create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
>   create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain
  2023-01-26 17:54   ` Andrew Davis
@ 2023-01-26 19:38     ` Sapp, Randolph
  2023-01-26 20:12       ` Andrew Davis
  0 siblings, 1 reply; 19+ messages in thread
From: Sapp, Randolph @ 2023-01-26 19:38 UTC (permalink / raw)
  To: Andrew Davis; +Cc: denys, reatmon, detheridge, meta-ti, k-bhargav

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

On Thu, Jan 26 2023 at 11:54:18 -06:00:00, Andrew Davis <afd@ti.com> 
wrote:
>> -# The actual SONAME is libGLESv2.so.2, so need to explicitly 
>> specify RPROVIDES for .so.1 here
>> -RPROVIDES:${PN} += "libGLESv2.so.1"
>> +RDEPENDS:${PN} += "libdrm libdrm-omap"
> 
> These are not runtime dependencies, libdrm is still regular built 
> time DEPENDS.
> (libdrm-omap can be dropped, we don't need that at all anymore)
> 
> Runtime we do need udev so this should all be now:
> 
> DEPENDS += "libdrm"
> DEPENDS:append:libc-musl = " gcompat"
> RDEPENDS:${PN} += "udev"

There should be no build dependencies for a binary package. What new 
dependency did you engineer?


[-- Attachment #2: Type: text/html, Size: 825 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain
  2023-01-26 19:38     ` Sapp, Randolph
@ 2023-01-26 20:12       ` Andrew Davis
  2023-01-26 22:40         ` Sapp, Randolph
  0 siblings, 1 reply; 19+ messages in thread
From: Andrew Davis @ 2023-01-26 20:12 UTC (permalink / raw)
  To: Sapp, Randolph; +Cc: denys, reatmon, detheridge, meta-ti, k-bhargav

On 1/26/23 1:38 PM, Sapp, Randolph wrote:
> On Thu, Jan 26 2023 at 11:54:18 -06:00:00, Andrew Davis <afd@ti.com> wrote:
>>
>>     -# The actual SONAME is libGLESv2.so.2, so need to explicitly specify RPROVIDES for .so.1 here -RPROVIDES:${PN} += "libGLESv2.so.1" +RDEPENDS:${PN} += "libdrm libdrm-omap" 
>>
>> These are not runtime dependencies, libdrm is still regular built time DEPENDS. (libdrm-omap can be dropped, we don't need that at all anymore) Runtime we do need udev so this should all be now: DEPENDS += "libdrm" DEPENDS:append:libc-musl = " gcompat" RDEPENDS:${PN} += "udev" 
> 
> There should be no build dependencies for a binary package. What new dependency did you engineer?

If the binaries depend on a lib then yocto will detect that and set it as a runtime dependency
for you. If not in the sysroot dir when we install the binaries then yocto will do
the opposite and complain that it cannot find some libraries that binaries in the package
link against. We solve both by using DEPENDS here.

Andrew


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [meta-ti] [kirkstone PATCH 0/4] Graphics, graphics, and more graphics
  2023-01-26 18:13 ` [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Andrew Davis
@ 2023-01-26 20:46   ` Denys Dmytriyenko
  0 siblings, 0 replies; 19+ messages in thread
From: Denys Dmytriyenko @ 2023-01-26 20:46 UTC (permalink / raw)
  To: afd; +Cc: Randolph Sapp, denys, reatmon, detheridge, meta-ti, k-bhargav

On Thu, Jan 26, 2023 at 12:13:37PM -0600, Andrew Davis via lists.yoctoproject.org wrote:
> On 1/25/23 9:08 PM, Randolph Sapp wrote:
> >Alright, this is the 6th revision of this patch. This uses a revised
> 
> I've personally had series go to v15+ and v30+ is not unheard of upstream :)
> 
> The subject tag look wrong, recommend something like:
> 
> >git format-patch origin/kirkstone -o output -C --cover-letter --subject-prefix="meta-ti][master/kirkstone][PATCH v6"

1. You can drop "meta-ti" part in the subject as the mailing list will add it
2. I thought we wanted to go for kirkstone first to avoid duplicating upstream 
mesa, hence "kirkstone" is more correct, instead of "master/kirkstone"


> Andrew
> 
> >dependency chain (hopefully it's a little more logical) and some, well,
> >interesting switching logic using the PACKAGECONFIG and
> >virtual/gpudriver PREFERRED_PROVIDER override variable. I'm not sure how
> >I feel about it, but it solves the issue of silently configuring things
> >as needed without other layers manually enabling features.
> >
> >We basically dynamically adjust mesa's PACKAGECONFIG based on what our
> >selected gpudriver (and display controller, thanks sgx) is. We also add
> >a runtime recommendation on the gpudriver after this configuration.
> >
> >The gpudriver providers didn't change too much, they just have a runtime
> >recommendation for the associated um components. As it stands, the um
> >components can live alongside the software rendering components thanks
> >to the mesa-megadriver being able to automatically switch as necessary
> >at runtime, so we will not clobber mesa's usual packages.
> >
> >Then we drop all mentions of the gpu machine feature for good measure.
> >
> >"Why didn't you just add preferred providers for libgles2, etc, etc."
> >Well, software rendering. If we do that we'll have to edit the
> >PACKAGECONFIG to drop gles components from mesa, disabling software
> >rendering. We could add a dynamic switch to do that, but honestly
> >keeping in line with KISS, this solution has fewer lines and less logic
> >while keeping swrast as a nice fallback for whenever anything really
> >goes south... not that I'm expecting that or anything.
> >
> >Randolph Sapp (4):
> >   meta-ti-bsp: mesa: Add current patches
> >   meta-ti-bsp: graphics: Resolve dependency chain
> >   meta-ti-bsp: machine: Remove all gpu features
> >   meta-ti-bsp: machine: Attempt to update DC alias
> >
> >  meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   |   2 -
> >  meta-ti-bsp/conf/machine/include/am62xx.inc   |   6 +-
> >  meta-ti-bsp/conf/machine/include/am65xx.inc   |   6 +-
> >  meta-ti-bsp/conf/machine/include/j721e.inc    |   6 -
> >  meta-ti-bsp/conf/machine/include/j721s2.inc   |   6 -
> >  meta-ti-bsp/conf/machine/include/j784s4.inc   |   6 -
> >  meta-ti-bsp/conf/machine/include/omap-a15.inc |   9 +-
> >  meta-ti-bsp/conf/machine/include/ti33x.inc    |   9 +-
> >  meta-ti-bsp/conf/machine/include/ti43x.inc    |   9 +-
> >  meta-ti-bsp/conf/machine/j784s4-evm.conf      |   2 +
> >  ...-OpenEmbedded-nodistro-internal-aarc.patch |  29 ----
> >  ...bb => ti-img-rogue-driver_1.18.6276027.bb} |  20 +--
> >  .../ti-sgx-ddk-km_1.17.4948957.bb             |   8 +-
> >  .../ti-img-rogue-umlibs_1.15.6133109.bb       |  71 --------
> >  .../ti-img-rogue-umlibs_1.18.6276027.bb       |  39 +++++
> >  .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     |  31 +---
> >  ...nd-deprecate-drm_handle_format-and-d.patch | 158 ++++++++++++++++++
> >  ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++++
> >  ...sdetects-64bit-atomics-on-mips-clang.patch |  25 +++
> >  ...k-for-all-linux-host_os-combinations.patch |  43 +++++
> >  ...ormat-Check-for-NEON-before-using-it.patch |  47 ++++++
> >  ...02-meson.build-make-TLS-ELF-optional.patch |  61 +++++++
> >  .../mesa/mesa-gl_22.0.%.bbappend              |   1 +
> >  .../mesa/mesa_22.0.%.bbappend                 |   2 +
> >  .../recipes-graphics/mesa/pvr-mesa.inc        |  39 +++++
> >  25 files changed, 484 insertions(+), 185 deletions(-)
> >  delete mode 100644 meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver/0001-compiler-support-OpenEmbedded-nodistro-internal-aarc.patch
> >  rename meta-ti-bsp/recipes-bsp/powervr-drivers/{ti-img-rogue-driver_1.15.6133109.bb => ti-img-rogue-driver_1.18.6276027.bb} (72%)
> >  delete mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb
> >  create mode 100644 meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.0.%.bbappend
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.0.%.bbappend
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [meta-ti] [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches
  2023-01-26 17:06   ` Andrew Davis
@ 2023-01-26 20:48     ` Denys Dmytriyenko
  2023-01-26 22:37       ` [EXTERNAL] " Sapp, Randolph
  0 siblings, 1 reply; 19+ messages in thread
From: Denys Dmytriyenko @ 2023-01-26 20:48 UTC (permalink / raw)
  To: afd; +Cc: Randolph Sapp, denys, reatmon, detheridge, meta-ti, k-bhargav

On Thu, Jan 26, 2023 at 11:06:17AM -0600, Andrew Davis via lists.yoctoproject.org wrote:
> On 1/25/23 9:08 PM, Randolph Sapp wrote:
> >Copy over current patches from oe-core for mesa since we're going to be
> >overriding the SRC_URI string and we still need those.
> >
> 
> We control the repo we will be pointing at, I'd say just add these
> patches over there directly so this commit would be not needed.

No, these are upstream mesa patches, not the one needed for pvr.

Hence, you don't need to carry them locally, since you don't copy the entire 
upstream mesa recipe.


> >Signed-off-by: Randolph Sapp <rs@ti.com>
> >---
> >  ...nd-deprecate-drm_handle_format-and-d.patch | 158 ++++++++++++++++++
> >  ...fine-__NR_futex-if-it-does-not-exist.patch |  34 ++++
> >  ...sdetects-64bit-atomics-on-mips-clang.patch |  25 +++
> >  ...k-for-all-linux-host_os-combinations.patch |  43 +++++
> >  ...ormat-Check-for-NEON-before-using-it.patch |  47 ++++++
> >  ...02-meson.build-make-TLS-ELF-optional.patch |  61 +++++++
> >  6 files changed, 368 insertions(+)
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >  create mode 100644 meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> >
> >diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
> >new file mode 100644
> >index 00000000..dac2de4e
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
> >@@ -0,0 +1,158 @@
> >+From 7796c2c56c960ac55e49246f0349ac52539ada55 Mon Sep 17 00:00:00 2001
> >+From: Leandro Ribeiro <leandro.ribeiro@collabora.com>
> >+Date: Sun, 10 Apr 2022 22:54:36 -0300
> >+Subject: [PATCH] Revert "egl/wayland: deprecate drm_handle_format() and
> >+ drm_handle_capabilities()"
> >+
> >+Commit af1ee8e010441f8f2ed8c77065b159652a4ac9fe dropped support to
> >+wl_drm, as we thought that most compositors from active projects were
> >+already supporting zwp_linux_dmabuf_v1.
> >+
> >+But that's not true, so revert this commit in order to give these
> >+projects a longer transition period.
> >+
> >+Note that we didn't add back the support to GEM name API, and that was
> >+on purpose.
> >+
> >+Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
> >+Reviewed-by: Simon Ser <contact@emersion.fr>
> >+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15822>
> >+
> >+Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> >+Upstream-Status: Backport [https://gitlab.freedesktop.org/mesa/mesa/-/commit/c60fea8c228ae3f32e20d6b65c473d9f04871d20]
> >+---
> >+ src/egl/drivers/dri2/egl_dri2.h         |  1 +
> >+ src/egl/drivers/dri2/platform_wayland.c | 59 +++++++++++++++++++------
> >+ 2 files changed, 47 insertions(+), 13 deletions(-)
> >+
> >+diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
> >+index c466ff83c53..eecb32a53fd 100644
> >+--- a/src/egl/drivers/dri2/egl_dri2.h
> >++++ b/src/egl/drivers/dri2/egl_dri2.h
> >+@@ -283,6 +283,7 @@ struct dri2_egl_display
> >+    struct zwp_linux_dmabuf_feedback_v1 *wl_dmabuf_feedback;
> >+    struct dmabuf_feedback_format_table format_table;
> >+    bool authenticated;
> >++   uint32_t capabilities;
> >+    char *device_name;
> >+ #endif
> >+
> >+diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
> >+index 5ff83cce08a..843434376a7 100644
> >+--- a/src/egl/drivers/dri2/platform_wayland.c
> >++++ b/src/egl/drivers/dri2/platform_wayland.c
> >+@@ -1343,7 +1343,7 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
> >+                  struct dri2_egl_surface *dri2_surf,
> >+                  __DRIimage *image)
> >+ {
> >+-   struct wl_buffer *ret;
> >++   struct wl_buffer *ret = NULL;
> >+    EGLBoolean query;
> >+    int width, height, fourcc, num_planes;
> >+    uint64_t modifier = DRM_FORMAT_MOD_INVALID;
> >+@@ -1447,11 +1447,28 @@ create_wl_buffer(struct dri2_egl_display *dri2_dpy,
> >+       ret = zwp_linux_buffer_params_v1_create_immed(params, width, height,
> >+                                                     fourcc, 0);
> >+       zwp_linux_buffer_params_v1_destroy(params);
> >++   } else {
> >++      struct wl_drm *wl_drm =
> >++         dri2_surf ? dri2_surf->wl_drm_wrapper : dri2_dpy->wl_drm;
> >++      int fd = -1, stride;
> >++
> >++      if (num_planes > 1)
> >++         return NULL;
> >++
> >++      query = dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_FD, &fd);
> >++      query &= dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &stride);
> >++      if (!query) {
> >++         if (fd >= 0)
> >++            close(fd);
> >++         return NULL;
> >++      }
> >+
> >+-      return ret;
> >++      ret = wl_drm_create_prime_buffer(wl_drm, fd, width, height, fourcc, 0,
> >++                                       stride, 0, 0, 0, 0);
> >++      close(fd);
> >+    }
> >+
> >+-   return NULL;
> >++   return ret;
> >+ }
> >+
> >+ static EGLBoolean
> >+@@ -1698,16 +1715,21 @@ drm_handle_device(void *data, struct wl_drm *drm, const char *device)
> >+ static void
> >+ drm_handle_format(void *data, struct wl_drm *drm, uint32_t format)
> >+ {
> >+-   /* deprecated, as compositors already support the dma-buf protocol extension
> >+-    * and so we can rely on dmabuf_handle_modifier() to receive formats and
> >+-    * modifiers */
> >++   struct dri2_egl_display *dri2_dpy = data;
> >++   int visual_idx = dri2_wl_visual_idx_from_fourcc(format);
> >++
> >++   if (visual_idx == -1)
> >++      return;
> >++
> >++   BITSET_SET(dri2_dpy->formats.formats_bitmap, visual_idx);
> >+ }
> >+
> >+ static void
> >+ drm_handle_capabilities(void *data, struct wl_drm *drm, uint32_t value)
> >+ {
> >+-   /* deprecated, as compositors already support the dma-buf protocol extension
> >+-    * and so we can rely on it to create wl_buffer's */
> >++   struct dri2_egl_display *dri2_dpy = data;
> >++
> >++   dri2_dpy->capabilities = value;
> >+ }
> >+
> >+ static void
> >+@@ -2075,13 +2097,12 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
> >+    wl_registry_add_listener(dri2_dpy->wl_registry,
> >+                             &registry_listener_drm, dri2_dpy);
> >+
> >+-   /* The compositor must expose the dma-buf interface. */
> >+-   if (roundtrip(dri2_dpy) < 0 || dri2_dpy->wl_dmabuf == NULL)
> >++   if (roundtrip(dri2_dpy) < 0)
> >+       goto cleanup;
> >+
> >+    /* Get default dma-buf feedback */
> >+-   if (zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
> >+-       ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
> >++   if (dri2_dpy->wl_dmabuf && zwp_linux_dmabuf_v1_get_version(dri2_dpy->wl_dmabuf) >=
> >++                              ZWP_LINUX_DMABUF_V1_GET_DEFAULT_FEEDBACK_SINCE_VERSION) {
> >+       dmabuf_feedback_format_table_init(&dri2_dpy->format_table);
> >+       dri2_dpy->wl_dmabuf_feedback =
> >+          zwp_linux_dmabuf_v1_get_default_feedback(dri2_dpy->wl_dmabuf);
> >+@@ -2089,7 +2110,6 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
> >+                                                 &dmabuf_feedback_listener, dri2_dpy);
> >+    }
> >+
> >+-   /* Receive events from the interfaces */
> >+    if (roundtrip(dri2_dpy) < 0)
> >+       goto cleanup;
> >+
> >+@@ -2176,6 +2196,19 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
> >+
> >+    dri2_wl_setup_swap_interval(disp);
> >+
> >++   if (dri2_dpy->wl_drm) {
> >++      /* To use Prime, we must have _DRI_IMAGE v7 at least. createImageFromFds
> >++       * support indicates that Prime export/import is supported by the driver.
> >++       * We deprecated the support to GEM names API, so we bail out if the
> >++       * driver does not suport Prime. */
> >++      if (!(dri2_dpy->capabilities & WL_DRM_CAPABILITY_PRIME) ||
> >++          (dri2_dpy->image->base.version < 7) ||
> >++          (dri2_dpy->image->createImageFromFds == NULL)) {
> >++         _eglLog(_EGL_WARNING, "wayland-egl: display does not support prime");
> >++         goto cleanup;
> >++      }
> >++   }
> >++
> >+    if (dri2_dpy->is_different_gpu &&
> >+        (dri2_dpy->image->base.version < 9 ||
> >+         dri2_dpy->image->blitImage == NULL)) {
> >+--
> >+2.35.1
> >+
> >diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
> >new file mode 100644
> >index 00000000..3b0bfa32
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch
> >@@ -0,0 +1,34 @@
> >+From 253b042d2bf10e9abfa9cc508e0782aefd834145 Mon Sep 17 00:00:00 2001
> >+From: Khem Raj <raj.khem@gmail.com>
> >+Date: Fri, 16 Oct 2020 11:03:47 -0700
> >+Subject: [PATCH] futex.h: Define __NR_futex if it does not exist
> >+
> >+__NR_futex is not defines by newer architectures e.g. arc, riscv32 as
> >+they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on
> >+__NR_futex, since this is used in applications, such applications start
> >+to fail to build for these newer architectures. This patch defines a
> >+fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps
> >+working
> >+
> >+Upstream-Status: Pending
> >+Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >+
> >+---
> >+ src/util/futex.h | 4 ++++
> >+ 1 file changed, 4 insertions(+)
> >+
> >+diff --git a/src/util/futex.h b/src/util/futex.h
> >+index 43097f4..941b0ec 100644
> >+--- a/src/util/futex.h
> >++++ b/src/util/futex.h
> >+@@ -34,6 +34,10 @@
> >+ #include <sys/syscall.h>
> >+ #include <sys/time.h>
> >+
> >++#if !defined(SYS_futex) && defined(SYS_futex_time64)
> >++# define SYS_futex SYS_futex_time64
> >++#endif
> >++
> >+ static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3)
> >+ {
> >+    return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
> >diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
> >new file mode 100644
> >index 00000000..b08e4d86
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch
> >@@ -0,0 +1,25 @@
> >+From d34bdbd80e5a1f309d2ba280cdc66ff0ee0e5c43 Mon Sep 17 00:00:00 2001
> >+From: Khem Raj <raj.khem@gmail.com>
> >+Date: Mon, 13 Jan 2020 15:23:47 -0800
> >+Subject: [PATCH] meson misdetects 64bit atomics on mips/clang
> >+
> >+Upstream-Status: Pending
> >+Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >+
> >+---
> >+ src/util/u_atomic.c | 2 +-
> >+ 1 file changed, 1 insertion(+), 1 deletion(-)
> >+
> >+diff --git a/src/util/u_atomic.c b/src/util/u_atomic.c
> >+index 5a5eab4..e499516 100644
> >+--- a/src/util/u_atomic.c
> >++++ b/src/util/u_atomic.c
> >+@@ -21,7 +21,7 @@
> >+  * IN THE SOFTWARE.
> >+  */
> >+
> >+-#if defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
> >++#if !defined(__clang__) && defined(MISSING_64BIT_ATOMICS) && defined(HAVE_PTHREAD)
> >+
> >+ #include <stdint.h>
> >+ #include <pthread.h>
> >diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> >new file mode 100644
> >index 00000000..aea23d0e
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch
> >@@ -0,0 +1,43 @@
> >+From f9c597a2c517eb85c23cbeeb2e95c55794c74cda Mon Sep 17 00:00:00 2001
> >+From: Alistair Francis <alistair@alistair23.me>
> >+Date: Thu, 14 Nov 2019 13:04:49 -0800
> >+Subject: [PATCH] meson.build: check for all linux host_os combinations
> >+
> >+Make sure that we are also looking for our host_os combinations like
> >+linux-musl etc. when assuming support for DRM/KMS.
> >+
> >+Also delete a duplicate line.
> >+
> >+Upstream-Status: Pending
> >+
> >+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
> >+Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
> >+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> >+Signed-off-by: Alistair Francis <alistair@alistair23.me>
> >+
> >+---
> >+ meson.build | 4 ++--
> >+ 1 file changed, 2 insertions(+), 2 deletions(-)
> >+
> >+diff --git a/meson.build b/meson.build
> >+index bca6b1f..70d06c0 100644
> >+--- a/meson.build
> >++++ b/meson.build
> >+@@ -172,7 +172,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2
> >+ # Only build shared_glapi if at least one OpenGL API is enabled
> >+ with_shared_glapi = with_shared_glapi and with_any_opengl
> >+
> >+-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos'].contains(host_machine.system())
> >++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> >+
> >+ dri_drivers = get_option('dri-drivers')
> >+ if dri_drivers.length() != 0
> >+@@ -1074,7 +1074,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }',
> >+ endif
> >+
> >+ # TODO: this is very incomplete
> >+-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system())
> >++if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku'].contains(host_machine.system()) or host_machine.system().startswith('linux')
> >+   pre_args += '-D_GNU_SOURCE'
> >+ elif host_machine.system() == 'sunos'
> >+   pre_args += '-D__EXTENSIONS__'
> >diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >new file mode 100644
> >index 00000000..5c6165c2
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch
> >@@ -0,0 +1,47 @@
> >+From fdb2face4eeac3c20eedcca7520f4e7014225fb4 Mon Sep 17 00:00:00 2001
> >+From: Khem Raj <raj.khem@gmail.com>
> >+Date: Thu, 2 Dec 2021 19:57:42 -0800
> >+Subject: [PATCH] util/format: Check for NEON before using it
> >+
> >+This fixes build on rpi0-w and any other machine which does not have
> >+neon unit and is not used as FPU unit
> >+
> >+Fixes errors e.g.
> >+
> >+In file included from ../mesa-21.3.0/src/util/format/u_format_unpack_neon.c:35:
> >+/mnt/b/yoe/master/build/tmp/work/arm1176jzfshf-vfp-yoe-linux-gnueabi/mesa/2_21.3.0-r0/recipe-sysroot-native/usr/lib/clang/13.0.1/include/arm_neon.h:32:2: error: "NEON support not enabled"
> >+
> >+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14032]
> >+Signed-off-by: Khem Raj <raj.khem@gmail.com>
> >+
> >+---
> >+ src/util/format/u_format.c             | 2 +-
> >+ src/util/format/u_format_unpack_neon.c | 2 +-
> >+ 2 files changed, 2 insertions(+), 2 deletions(-)
> >+
> >+diff --git a/src/util/format/u_format.c b/src/util/format/u_format.c
> >+index 36c5e52..f0a0097 100644
> >+--- a/src/util/format/u_format.c
> >++++ b/src/util/format/u_format.c
> >+@@ -1138,7 +1138,7 @@ static void
> >+ util_format_unpack_table_init(void)
> >+ {
> >+    for (enum pipe_format format = PIPE_FORMAT_NONE; format < PIPE_FORMAT_COUNT; format++) {
> >+-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> >++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> >+       const struct util_format_unpack_description *unpack = util_format_unpack_description_neon(format);
> >+       if (unpack) {
> >+          util_format_unpack_table[format] = unpack;
> >+diff --git a/src/util/format/u_format_unpack_neon.c b/src/util/format/u_format_unpack_neon.c
> >+index a4a5cb1..1e4f794 100644
> >+--- a/src/util/format/u_format_unpack_neon.c
> >++++ b/src/util/format/u_format_unpack_neon.c
> >+@@ -23,7 +23,7 @@
> >+
> >+ #include <u_format.h>
> >+
> >+-#if (defined(PIPE_ARCH_AARCH64) || defined(PIPE_ARCH_ARM)) && !defined(NO_FORMAT_ASM) && !defined(__SOFTFP__)
> >++#if (defined(PIPE_ARCH_AARCH64) || (defined(__ARM_NEON) && defined(PIPE_ARCH_ARM))) && !defined(NO_FORMAT_ASM)
> >+
> >+ /* armhf builds default to vfp, not neon, and refuses to compile neon intrinsics
> >+  * unless you tell it "no really".
> >diff --git a/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch b/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> >new file mode 100644
> >index 00000000..af11baee
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch
> >@@ -0,0 +1,61 @@
> >+From bf41fa026ae3d378e62fd83d03a6f5933b52ca04 Mon Sep 17 00:00:00 2001
> >+From: Alistair Francis <alistair@alistair23.me>
> >+Date: Thu, 14 Nov 2019 13:08:31 -0800
> >+Subject: [PATCH] meson.build: make TLS ELF optional
> >+
> >+USE_ELF_TLS has replaced GLX_USE_TLS so this patch is the original "make
> >+TLS GLX optional again" patch updated to the latest mesa.
> >+
> >+For details, see:
> >+https://gitlab.freedesktop.org/mesa/mesa/-/issues/966
> >+
> >+This prevents runtime segfault on musl:
> >+
> >+Traceback (most recent call last):
> >+  File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/core/decorator/__init__.py", line 36, in wrapped_f
> >+    return func(*args, **kwargs)
> >+  File "/home/pokybuild/yocto-worker/musl-qemux86/build/meta/lib/oeqa/runtime/cases/parselogs.py", line 378, in test_parselogs
> >+    self.assertEqual(errcount, 0, msg=self.msg)
> >+AssertionError: 1 != 0 : Log: /home/pokybuild/yocto-worker/musl-qemux86/build/build/tmp/work/qemux86-poky-linux-musl/core-image-sato-sdk/1.0-r0/target_logs/Xorg.0.log
> >+
> >+Upstream-Status: Inappropriate [configuration]
> >+---
> >+ meson.build       | 7 +++++--
> >+ meson_options.txt | 6 ++++++
> >+ 2 files changed, 11 insertions(+), 2 deletions(-)
> >+
> >+diff --git a/meson.build b/meson.build
> >+index 70d06c0..1441611 100644
> >+--- a/meson.build
> >++++ b/meson.build
> >+@@ -490,8 +490,11 @@ foreach platform : _platforms
> >+   pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
> >+ endforeach
> >+
> >+-use_elf_tls = true
> >+-pre_args += '-DUSE_ELF_TLS'
> >++use_elf_tls = false
> >++if get_option('elf-tls')
> >++  use_elf_tls = true
> >++  pre_args += '-DUSE_ELF_TLS'
> >++endif
> >+
> >+ if with_platform_android and get_option('platform-sdk-version') >= 29
> >+   # By default the NDK compiler, at least, emits emutls references instead of
> >+diff --git a/meson_options.txt b/meson_options.txt
> >+index 1f6ef38..99cc5cb 100644
> >+--- a/meson_options.txt
> >++++ b/meson_options.txt
> >+@@ -440,6 +440,12 @@ option(
> >+   value : true,
> >+   description : 'Enable direct rendering in GLX and EGL for DRI',
> >+ )
> >++option(
> >++  'elf-tls',
> >++  type : 'boolean',
> >++  value : true,
> >++  description : 'Enable TLS support in ELF',
> >++)
> >+ option('egl-lib-suffix',
> >+   type : 'string',
> >+   value : '',


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features
  2023-01-26 18:02   ` Andrew Davis
@ 2023-01-26 21:38     ` Ryan Eatmon
  0 siblings, 0 replies; 19+ messages in thread
From: Ryan Eatmon @ 2023-01-26 21:38 UTC (permalink / raw)
  To: Andrew Davis, Randolph Sapp, denys, detheridge; +Cc: meta-ti, k-bhargav



On 1/26/2023 12:02, Andrew Davis wrote:
> On 1/25/23 9:08 PM, Randolph Sapp wrote:
>> Remove all gpu machine features and instead rely on the new dependency
>> chain for resolving gpu dependencies. Set preferred providers for
>> virtual/gpudriver where needed.
>>
>> Signed-off-by: Randolph Sapp <rs@ti.com>
>> ---
>>   meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   | 2 --
>>   meta-ti-bsp/conf/machine/include/am62xx.inc   | 6 +-----
>>   meta-ti-bsp/conf/machine/include/am65xx.inc   | 6 +-----
>>   meta-ti-bsp/conf/machine/include/j721e.inc    | 6 ------
>>   meta-ti-bsp/conf/machine/include/j721s2.inc   | 6 ------
>>   meta-ti-bsp/conf/machine/include/j784s4.inc   | 6 ------
>>   meta-ti-bsp/conf/machine/include/omap-a15.inc | 6 +-----
>>   meta-ti-bsp/conf/machine/include/ti33x.inc    | 6 +-----
>>   meta-ti-bsp/conf/machine/include/ti43x.inc    | 6 +-----
>>   meta-ti-bsp/conf/machine/j784s4-evm.conf      | 2 ++
>>   10 files changed, 7 insertions(+), 45 deletions(-)
>>
>> diff --git a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf 
>> b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
>> index ef8e8692..ec9ce596 100644
>> --- a/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
>> +++ b/meta-ti-bsp/conf/machine/am62xx-lp-evm.conf
>> @@ -4,8 +4,6 @@
>>   require conf/machine/include/am62xx.inc
>> -MACHINE_FEATURES += "gpu"
>> -
>>   KERNEL_DEVICETREE = " \
>>       ti/k3-am62x-lp-sk.dtb \
>>       ti/k3-am625-skeleton.dtb \
>> diff --git a/meta-ti-bsp/conf/machine/include/am62xx.inc 
>> b/meta-ti-bsp/conf/machine/include/am62xx.inc
>> index 411e5265..35f3f071 100644
>> --- a/meta-ti-bsp/conf/machine/include/am62xx.inc
>> +++ b/meta-ti-bsp/conf/machine/include/am62xx.inc
>> @@ -1,15 +1,11 @@
>>   require conf/machine/include/k3.inc
>>   SOC_FAMILY:append = ":am62xx"
>> -MACHINE_FEATURES += "screen touchscreen gpu"
>> +MACHINE_FEATURES += "screen touchscreen"
>>   SERIAL_CONSOLES = "115200;ttyS2"
>>   SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>>   TFA_BOARD = "lite"
>> diff --git a/meta-ti-bsp/conf/machine/include/am65xx.inc 
>> b/meta-ti-bsp/conf/machine/include/am65xx.inc
>> index 424864d3..385bb164 100644
>> --- a/meta-ti-bsp/conf/machine/include/am65xx.inc
>> +++ b/meta-ti-bsp/conf/machine/include/am65xx.inc
>> @@ -1,15 +1,11 @@
>>   require conf/machine/include/k3.inc
>>   SOC_FAMILY:append = ":am65xx"
>> -MACHINE_FEATURES += "screen touchscreen gpu"
>> +MACHINE_FEATURES += "screen touchscreen"
>>   SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1"
>>   SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>>   KERNEL_DEVICETREE = " \
>> diff --git a/meta-ti-bsp/conf/machine/include/j721e.inc 
>> b/meta-ti-bsp/conf/machine/include/j721e.inc
>> index eba10d8d..67f5fe0f 100644
>> --- a/meta-ti-bsp/conf/machine/include/j721e.inc
>> +++ b/meta-ti-bsp/conf/machine/include/j721e.inc
>> @@ -1,12 +1,6 @@
>>   require conf/machine/include/k3.inc
>>   SOC_FAMILY:append = ":j721e"
>> -MACHINE_FEATURES += "gpu"
>> -
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>>   # On J721e the file tiboot3.bin comes from the bootloader not ti-sci-fw
>> diff --git a/meta-ti-bsp/conf/machine/include/j721s2.inc 
>> b/meta-ti-bsp/conf/machine/include/j721s2.inc
>> index fc6493b8..f33a3aba 100644
>> --- a/meta-ti-bsp/conf/machine/include/j721s2.inc
>> +++ b/meta-ti-bsp/conf/machine/include/j721s2.inc
>> @@ -1,12 +1,6 @@
>>   require conf/machine/include/k3.inc
>>   SOC_FAMILY:append = ":j721s2"
>> -MACHINE_FEATURES += "gpu"
>> -
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>>   TFA_BOARD = "generic"
>> diff --git a/meta-ti-bsp/conf/machine/include/j784s4.inc 
>> b/meta-ti-bsp/conf/machine/include/j784s4.inc
>> index d268b810..df0faede 100644
>> --- a/meta-ti-bsp/conf/machine/include/j784s4.inc
>> +++ b/meta-ti-bsp/conf/machine/include/j784s4.inc
>> @@ -1,12 +1,6 @@
>>   require conf/machine/include/k3.inc
>>   SOC_FAMILY:append = ":j784s4"
>> -MACHINE_FEATURES += "gpu"
>> -
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-img-rogue-umlibs"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-img-rogue-umlibs"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>>   TFA_BOARD = "j784s4"
>> diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc 
>> b/meta-ti-bsp/conf/machine/include/omap-a15.inc
>> index 0843fb28..efa33a10 100644
>> --- a/meta-ti-bsp/conf/machine/include/omap-a15.inc
>> +++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc
>> @@ -10,10 +10,6 @@ MACHINE_KERNEL_PR = "r7"
>>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>>   KERNEL_IMAGETYPE = "zImage"
>> @@ -45,7 +41,7 @@ EXTRA_IMAGEDEPENDS += "virtual/bootloader"
>>   UBI_VOLNAME = "rootfs"
>>   # List common SoC features, may need to add touchscreen for specific 
>> machines
>> -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen 
>> alsa ethernet gpu mmip dsp gc320"
>> +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen 
>> alsa ethernet mmip dsp gc320"
>>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>>   WKS_FILE ?= "sdimage-2part.wks"
>> diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc 
>> b/meta-ti-bsp/conf/machine/include/ti33x.inc
>> index cfacc30d..e2f75359 100644
>> --- a/meta-ti-bsp/conf/machine/include/ti33x.inc
>> +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc
>> @@ -11,10 +11,6 @@ MACHINE_KERNEL_PR = "r22"
>>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>>   KERNEL_IMAGETYPE = "zImage"
>> @@ -55,7 +51,7 @@ UBI_VOLNAME = "rootfs"
>>   EXTRA_IMAGEDEPENDS += "virtual/bootloader"
>>   # List common SoC features, may need to add touchscreen for specific 
>> machines
>> -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa 
>> ethernet gpu"
>> +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 alsa 
>> ethernet"
>>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>>   WKS_FILE ?= "sdimage-2part.wks"
>> diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc 
>> b/meta-ti-bsp/conf/machine/include/ti43x.inc
>> index 74a964db..e9999910 100644
>> --- a/meta-ti-bsp/conf/machine/include/ti43x.inc
>> +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc
>> @@ -11,10 +11,6 @@ MACHINE_KERNEL_PR = "r3"
>>   PREFERRED_PROVIDER_virtual/kernel ?= "linux-ti-staging"
>>   PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>>   PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
>> -PREFERRED_PROVIDER_virtual/egl ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles1 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgles2 ?= "ti-sgx-ddk-um"
>> -PREFERRED_PROVIDER_virtual/libgbm ?= "ti-sgx-ddk-um"
> 
> Thought we were going to call our version of mesa "ti-mesa" or similar,
> then we could PREFERRED_PROVIDER_virtual/x ?= "ti-mesa" here in these
> machine specific includes. Otherwise everyone who includes our BSP gets
> our hacky version of Mesa no matter what machine they are building for
> since we call it the same name..
> 
> As before, not a blocker, lets iterate later
> 
>>   PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
>>   KERNEL_IMAGETYPE = "zImage"
>> @@ -54,7 +50,7 @@ UBI_VOLNAME = "rootfs"
>>   EXTRA_IMAGEDEPENDS += "u-boot"
>>   # List common SoC features, may need to add touchscreen for specific 
>> machines
>> -MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen 
>> alsa ethernet gpu"
>> +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 screen 
>> alsa ethernet"
>>   IMAGE_FSTYPES += "tar.xz wic.xz wic.bmap"
>>   WKS_FILE ?= "sdimage-2part.wks"
>> diff --git a/meta-ti-bsp/conf/machine/j784s4-evm.conf 
>> b/meta-ti-bsp/conf/machine/j784s4-evm.conf
>> index 73f3eb8c..796ca116 100644
>> --- a/meta-ti-bsp/conf/machine/j784s4-evm.conf
>> +++ b/meta-ti-bsp/conf/machine/j784s4-evm.conf
>> @@ -9,6 +9,8 @@ SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
>>   TFA_K3_USART = "0x8"
>>   OPTEE_K3_USART = "0x8"
>> +PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
>> +
> 
> Don't think this is needed as we already do this in j784s4.inc.

Part of the cleanup that you rebased on top of is cleaning this up. 
Please move these changes to the include file.



> Otherwise,
> 
> Acked-by: Andrew Davis <afd@ti.com>
> 
>>   KERNEL_DEVICETREE = " \
>>       ti/k3-j784s4-evm.dtb \
>>   "

-- 
Ryan Eatmon                reatmon@ti.com
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [EXTERNAL] Re: [meta-ti] [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches
  2023-01-26 20:48     ` [meta-ti] " Denys Dmytriyenko
@ 2023-01-26 22:37       ` Sapp, Randolph
  2023-01-26 23:02         ` Denys Dmytriyenko
  0 siblings, 1 reply; 19+ messages in thread
From: Sapp, Randolph @ 2023-01-26 22:37 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: afd, denys, reatmon, detheridge, meta-ti, k-bhargav

On Thu, Jan 26 2023 at 03:48:04 PM -0500, Denys Dmytriyenko 
<denis@denix.org> wrote:
> On Thu, Jan 26, 2023 at 11:06:17AM -0600, Andrew Davis via 
> lists.yoctoproject.org wrote:
>>  On 1/25/23 9:08 PM, Randolph Sapp wrote:
>>  >Copy over current patches from oe-core for mesa since we're going 
>> to be
>>  >overriding the SRC_URI string and we still need those.
>>  >
>> 
>>  We control the repo we will be pointing at, I'd say just add these
>>  patches over there directly so this commit would be not needed.
> 
> No, these are upstream mesa patches, not the one needed for pvr.
> 
> Hence, you don't need to carry them locally, since you don't copy the 
> entire
> upstream mesa recipe.

Ah, but we do need to carry them since we clobber the mesa SRC_URI to 
load our new source. Now, yes, these should probably be carried in our 
mesa branch instead of in meta-ti. I'll adjust that.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain
  2023-01-26 20:12       ` Andrew Davis
@ 2023-01-26 22:40         ` Sapp, Randolph
  0 siblings, 0 replies; 19+ messages in thread
From: Sapp, Randolph @ 2023-01-26 22:40 UTC (permalink / raw)
  To: Andrew Davis; +Cc: denys, reatmon, detheridge, meta-ti, k-bhargav

On Thu, Jan 26 2023 at 02:12:33 PM -0600, Andrew Davis <afd@ti.com> 
wrote:
> If the binaries depend on a lib then yocto will detect that and set 
> it as a runtime dependency
> for you. If not in the sysroot dir when we install the binaries then 
> yocto will do
> the opposite and complain that it cannot find some libraries that 
> binaries in the package
> link against. We solve both by using DEPENDS here.

Nothing should be building directly against these libs so the sysroot 
point is void. We should let yocto resolve the run-time dependencies 
anyway.




^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [EXTERNAL] Re: [meta-ti] [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches
  2023-01-26 22:37       ` [EXTERNAL] " Sapp, Randolph
@ 2023-01-26 23:02         ` Denys Dmytriyenko
  2023-01-26 23:45           ` [EXTERNAL] " Sapp, Randolph
  0 siblings, 1 reply; 19+ messages in thread
From: Denys Dmytriyenko @ 2023-01-26 23:02 UTC (permalink / raw)
  To: Sapp, Randolph; +Cc: afd, denys, reatmon, detheridge, meta-ti, k-bhargav

On Thu, Jan 26, 2023 at 04:37:44PM -0600, Sapp, Randolph wrote:
> On Thu, Jan 26 2023 at 03:48:04 PM -0500, Denys Dmytriyenko
> <denis@denix.org> wrote:
> >On Thu, Jan 26, 2023 at 11:06:17AM -0600, Andrew Davis via
> >lists.yoctoproject.org wrote:
> >> On 1/25/23 9:08 PM, Randolph Sapp wrote:
> >> >Copy over current patches from oe-core for mesa since we're
> >>going to be
> >> >overriding the SRC_URI string and we still need those.
> >> >
> >>
> >> We control the repo we will be pointing at, I'd say just add these
> >> patches over there directly so this commit would be not needed.
> >
> >No, these are upstream mesa patches, not the one needed for pvr.
> >
> >Hence, you don't need to carry them locally, since you don't copy
> >the entire
> >upstream mesa recipe.
> 
> Ah, but we do need to carry them since we clobber the mesa SRC_URI
> to load our new source. Now, yes, these should probably be carried
> in our mesa branch instead of in meta-ti. I'll adjust that.

No, not really.

In mesa*.bbappend you include the pvr-meda.inc, which has this SRC_URI:

+SRC_URI = "git://gitlab.freedesktop.org/StaticRocket/mesa.git;protocol=https;branch=${BRANCH} \
+           file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \
+           file://0002-meson.build-make-TLS-ELF-optional.patch \
+           file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
+           file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
+           file://0001-util-format-Check-for-NEON-before-using-it.patch \
+           file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
+           "

So, specifically:

1. No, you don't need to carry patches locally when they are already alongside 
the original .bb recipe, when you are doing a .bbappend

2. You don't need to merge them to your own tree, as long as you specify them 
in the SRC_URI list, when using a .bbappend

-- 
Denys


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [EXTERNAL] Re: [EXTERNAL] Re: [meta-ti] [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches
  2023-01-26 23:02         ` Denys Dmytriyenko
@ 2023-01-26 23:45           ` Sapp, Randolph
  0 siblings, 0 replies; 19+ messages in thread
From: Sapp, Randolph @ 2023-01-26 23:45 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: afd, denys, reatmon, detheridge, meta-ti, k-bhargav

On Thu, Jan 26 2023 at 06:02:09 PM -0500, Denys Dmytriyenko 
<denis@denix.org> wrote:
> So, specifically:
> 
> 1. No, you don't need to carry patches locally when they are already 
> alongside
> the original .bb recipe, when you are doing a .bbappend
> 
> 2. You don't need to merge them to your own tree, as long as you 
> specify them
> in the SRC_URI list, when using a .bbappend

Huh, the more you know. Alright, we'll keep them out of our tree then 
and I'll drop the commit in the next revision.

(I was already hesitant to add yocto patches to our stuff since right 
now it's pretty distro agnostic and Yocto often adds extra parameters 
to packages specifically for their build system.)




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2023-01-26 23:46 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26  3:08 [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Randolph Sapp
2023-01-26  3:08 ` [kirkstone PATCH 1/4] meta-ti-bsp: mesa: Add current patches Randolph Sapp
2023-01-26 17:06   ` Andrew Davis
2023-01-26 20:48     ` [meta-ti] " Denys Dmytriyenko
2023-01-26 22:37       ` [EXTERNAL] " Sapp, Randolph
2023-01-26 23:02         ` Denys Dmytriyenko
2023-01-26 23:45           ` [EXTERNAL] " Sapp, Randolph
2023-01-26  3:08 ` [kirkstone PATCH 2/4] meta-ti-bsp: graphics: Resolve dependency chain Randolph Sapp
2023-01-26 17:54   ` Andrew Davis
2023-01-26 19:38     ` Sapp, Randolph
2023-01-26 20:12       ` Andrew Davis
2023-01-26 22:40         ` Sapp, Randolph
2023-01-26  3:08 ` [kirkstone PATCH 3/4] meta-ti-bsp: machine: Remove all gpu features Randolph Sapp
2023-01-26 18:02   ` Andrew Davis
2023-01-26 21:38     ` Ryan Eatmon
2023-01-26  3:08 ` [kirkstone PATCH 4/4] meta-ti-bsp: machine: Attempt to update DC alias Randolph Sapp
2023-01-26 18:07   ` Andrew Davis
2023-01-26 18:13 ` [kirkstone PATCH 0/4] Graphics, graphics, and more graphics Andrew Davis
2023-01-26 20:46   ` [meta-ti] " Denys Dmytriyenko

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.