Skip to contentSkip to conversation

Graphics rework attempt #8

PATCH New Denys Dmytriyenko 1 participant 7 messages Feb 24, 2023 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

v8 cover Graphics rework attempt #8

From: Denys Dmytriyenko <[email protected]>

Previous v7 revision of this series had few minor comments. Even though it was marked for kirkstone only, it accidentally got merged to master and caused breakage.

This v8 revision makes the same changes work in kirkstone and master, addresses previous feedback and ties up loose ends.

Here's a very detailed cover letter for v7, which is still applicable here:
https://lists.yoctoproject.org/g/meta-ti/message/15707

Denys Dmytriyenko (2):
mesa: locally overlay 22.0-specific patches from oe-core/kirkstone conf/machine: fix use of screen and touchscreen machine features

Randolph Sapp (3):
meta-ti-bsp: graphics: Resolve dependency chain
meta-ti-bsp: machine: remove default preferences for egl,gles,gbm
meta-ti-bsp: machine: set SGX display controller alias

Ryan Eatmon (1):
conf: machine: Fallback to software rendering

 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/am64xx.inc   |   2 -
 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 +-
 ...bb => ti-img-rogue-driver_1.18.6276027.bb} |  20 +--
 .../ti-sgx-ddk-km_1.17.4948957.bb             |   8 +-
 ...bb => ti-img-rogue-umlibs_1.18.6276027.bb} |  68 ++------
 .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     |  30 +---
 ...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.%.bbappend                |   1 +
 .../recipes-graphics/mesa/mesa_22.%.bbappend  |   1 +
 .../recipes-graphics/mesa/pvr-mesa.inc        |  47 ++++++
 23 files changed, 468 insertions(+), 136 deletions(-)
 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%)
 rename meta-ti-bsp/recipes-graphics/libgles/{ti-img-rogue-umlibs_1.15.6133109.bb => ti-img-rogue-umlibs_1.18.6276027.bb} (22%)
 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.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
Signature · 1 line
2.25.1
#1 lore raw

PATCH v8 1/6 mesa: locally overlay 22.0-specific patches from oe-core/kirkstone

From: Denys Dmytriyenko <[email protected]>

Locally overlay verbatim copies of mesa 22.0 patches from oe-core/kirkstone, so the same codebase works in kirkstone and master. Since upstream version of mesa in master is now 22.3 and no longer carries these patches, but they are still needed for 22.0-based PVR fork of mesa used with Rogue driver.

---
v8 - new patch, wasn't in the series before

 ...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
meta-ti-bsp/recipes-graphics/mesa/files/0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch new file +158 -0
new file mode 100644
index 00000000..dac2de4e
@@ -0,0 +1,158 @@
+From 7796c2c56c960ac55e49246f0349ac52539ada55 Mon Sep 17 00:00:00 2001
+From: Leandro Ribeiro <[email protected]>
+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 <[email protected]>
+Reviewed-by: Simon Ser <[email protected]>
+Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15822>
+
+Signed-off-by: Martin Jansa <[email protected]>
+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
+
meta-ti-bsp/recipes-graphics/mesa/files/0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch new file +34 -0
new file mode 100644
index 00000000..3b0bfa32
@@ -0,0 +1,34 @@
+From 253b042d2bf10e9abfa9cc508e0782aefd834145 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+
+---
+ 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);
meta-ti-bsp/recipes-graphics/mesa/files/0001-meson-misdetects-64bit-atomics-on-mips-clang.patch new file +25 -0
new file mode 100644
index 00000000..b08e4d86
@@ -0,0 +1,25 @@
+From d34bdbd80e5a1f309d2ba280cdc66ff0ee0e5c43 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+
+---
+ 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>
meta-ti-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file +43 -0

43 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/files/0001-util-format-Check-for-NEON-before-using-it.patch new file +47 -0

47 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-ELF-optional.patch new file +61 -0

61 lines not on this page · raw message

Signature · 1 line
2.25.1
#2 lore raw

PATCH v8 2/6 meta-ti-bsp: graphics: Resolve dependency chain

In reply to Denys Dmytriyenko

From: Randolph Sapp <[email protected]>

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.

---
v8 changes:
* generate proper diff of ti-img-rogue-umlibs upgrade from 1.15 to 1.18
* in pvr-mesa.inc add FILESEXTRAPATHS to locate local patches
* set LIC_FILES_CHKSUM corresponding to 22.0
* clear out video-codecs PACKAGECONFIG non-existent in 22.0
* fixup RRECOMMENDS nested overrides order
* mark pvr-mesa machine-specific and set correct PV

 ...bb => ti-img-rogue-driver_1.18.6276027.bb} | 20 +++---
 .../ti-sgx-ddk-km_1.17.4948957.bb             |  8 +--
 ...bb => ti-img-rogue-umlibs_1.18.6276027.bb} | 68 +++++--------------
 .../libgles/ti-sgx-ddk-um_1.17.4948957.bb     | 30 +-------
 .../mesa/mesa-gl_22.%.bbappend                |  1 +
 .../recipes-graphics/mesa/mesa_22.%.bbappend  |  1 +
 .../recipes-graphics/mesa/pvr-mesa.inc        | 48 +++++++++++++
 7 files changed, 84 insertions(+), 92 deletions(-)
 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%)
 rename meta-ti-bsp/recipes-graphics/libgles/{ti-img-rogue-umlibs_1.15.6133109.bb => ti-img-rogue-umlibs_1.18.6276027.bb} (22%)
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend
 create mode 100644 meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.18.6276027.bb renamed from meta-ti-bsp/recipes-bsp/powervr-drivers/ti-img-rogue-driver_1.15.6133109.bb +9 -11
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
@@ -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"
meta-ti-bsp/recipes-bsp/powervr-drivers/ti-sgx-ddk-km_1.17.4948957.bb +4 -4
index c22e3096..13b8757c 100644
@@ -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"
meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.18.6276027.bb renamed from meta-ti-bsp/recipes-graphics/libgles/ti-img-rogue-umlibs_1.15.6133109.bb +18 -50

89 lines not on this page · raw message

meta-ti-bsp/recipes-graphics/libgles/ti-sgx-ddk-um_1.17.4948957.bb +3 -27
index 1c479ee0..f1fbed15 100644
@@ -3,22 +3,18 @@ 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"
 
 PR = "r38"
 
-BRANCH = "ti-img-sgx/kirkstone/${PV}"
+BRANCH = "ti-img-sgx/kirkstone-mesa/${PV}"
 
 SRC_URI = " \
     git://git.ti.com/git/graphics/omap5-sgx-ddk-um-linux.git;protocol=https;branch=${BRANCH} \
     file://pvrsrvkm.rules \
 "
-SRCREV = "905809029b877fea42e91b9738825a6294ff1775"
+SRCREV = "bbae7217051341f515515ec190e165119102f45a"
 
 TARGET_PRODUCT:ti33x = "ti335x"
 TARGET_PRODUCT:ti43x = "ti437x"
@@ -33,26 +29,7 @@ inherit update-rc.d
 PACKAGECONFIG ??= "udev"
 PACKAGECONFIG[udev] = ",,,udev"
 
-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"
 
@@ -60,7 +37,6 @@ S = "${WORKDIR}/git"
 
 do_install () {
     oe_runmake install DESTDIR=${D} TARGET_PRODUCT=${TARGET_PRODUCT}
-    ln -sf libGLESv2.so.2 ${D}${libdir}/libGLESv2.so.1
 
     without_sysvinit=${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}
     with_udev=${@bb.utils.contains('PACKAGECONFIG', 'udev', 'true', 'false', d)}
meta-ti-bsp/recipes-graphics/mesa/mesa-gl_22.%.bbappend new file +1 -0
new file mode 100644
index 00000000..912e9e9d
@@ -0,0 +1 @@
+require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
meta-ti-bsp/recipes-graphics/mesa/mesa_22.%.bbappend new file +1 -0
new file mode 100644
index 00000000..912e9e9d
@@ -0,0 +1 @@
+require ${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/gpudriver', 'ti-img-rogue-driver ti-sgx-ddk-km', 'pvr-mesa.inc', '', d)}
meta-ti-bsp/recipes-graphics/mesa/pvr-mesa.inc new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.25.1
#3 lore raw

PATCH v8 3/6 meta-ti-bsp: machine: remove default preferences for egl,gles,gbm

In reply to Denys Dmytriyenko

From: Randolph Sapp <[email protected]>

Remove default preferences for virtual/egl, virtual/libgles and virtual/libgbm from machine configs to follow the new dependency chains via mesa in oder to support accelerated and software-rendered graphics, which is selected by virtual/gpudriver preference.

---
v8 - leave gpu machine feature intact, update changelog accordingly

 meta-ti-bsp/conf/machine/am62xx-lp-evm.conf   | 2 --
 meta-ti-bsp/conf/machine/include/am62xx.inc   | 4 ----
 meta-ti-bsp/conf/machine/include/am65xx.inc   | 4 ----
 meta-ti-bsp/conf/machine/include/j721e.inc    | 4 ----
 meta-ti-bsp/conf/machine/include/j721s2.inc   | 4 ----
 meta-ti-bsp/conf/machine/include/j784s4.inc   | 4 ----
 meta-ti-bsp/conf/machine/include/omap-a15.inc | 4 ----
 meta-ti-bsp/conf/machine/include/ti33x.inc    | 4 ----
 meta-ti-bsp/conf/machine/include/ti43x.inc    | 4 ----
 9 files changed, 34 deletions(-)
meta-ti-bsp/conf/machine/am62xx-lp-evm.conf +0 -2
index ef8e8692..ec9ce596 100644
@@ -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 \
meta-ti-bsp/conf/machine/include/am62xx.inc +0 -4
index 411e5265..2a06fc0f 100644
@@ -6,10 +6,6 @@ MACHINE_FEATURES += "screen touchscreen gpu"
 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"
meta-ti-bsp/conf/machine/include/am65xx.inc +0 -4
index 424864d3..33e6f1ad 100644
@@ -6,10 +6,6 @@ MACHINE_FEATURES += "screen touchscreen gpu"
 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 = " \
meta-ti-bsp/conf/machine/include/j721e.inc +0 -4
index eba10d8d..74cdc0e7 100644
@@ -3,10 +3,6 @@ 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
meta-ti-bsp/conf/machine/include/j721s2.inc +0 -4
index fc6493b8..b0953c1a 100644
@@ -3,10 +3,6 @@ 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"
meta-ti-bsp/conf/machine/include/j784s4.inc +0 -4
index d268b810..48d20a21 100644
@@ -3,10 +3,6 @@ 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"
meta-ti-bsp/conf/machine/include/omap-a15.inc +0 -4
index 0843fb28..01769bb3 100644
@@ -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"
meta-ti-bsp/conf/machine/include/ti33x.inc +0 -4
index cfacc30d..24154d06 100644
@@ -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"
meta-ti-bsp/conf/machine/include/ti43x.inc +0 -4
index 74a964db..96a599ed 100644
@@ -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"
Signature · 1 line
2.25.1
#4 lore raw

PATCH v8 4/6 meta-ti-bsp: machine: set SGX display controller alias

In reply to Denys Dmytriyenko

From: Randolph Sapp <[email protected]>

Set SGX display controller alias variables accordingly, as SGX has a few different aliases across platforms.

---
v8 - rephrase changelog to be clear and assertive

 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(+)
meta-ti-bsp/conf/machine/include/omap-a15.inc +3 -0
index 01769bb3..2588aac2 100644
@@ -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"
meta-ti-bsp/conf/machine/include/ti33x.inc +3 -0
index 24154d06..da2273e1 100644
@@ -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"
 
meta-ti-bsp/conf/machine/include/ti43x.inc +3 -0
index 96a599ed..277416b9 100644
@@ -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"
 
Signature · 1 line
2.25.1
#5 lore raw

PATCH v8 5/6 conf: machine: Fallback to software rendering

In reply to Denys Dmytriyenko

From: Ryan Eatmon <[email protected]>

While we are working to update our platforms to support Weston 10 and beyond, we are falling back to software rendering for platforms that do not currently have a solution for GPU drivers (namely the boards that use SGX).

---
v8 - no changes

 meta-ti-bsp/conf/machine/include/am65xx.inc   | 2 +-
 meta-ti-bsp/conf/machine/include/omap-a15.inc | 2 +-
 meta-ti-bsp/conf/machine/include/ti33x.inc    | 2 +-
 meta-ti-bsp/conf/machine/include/ti43x.inc    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
meta-ti-bsp/conf/machine/include/am65xx.inc +1 -1
index 33e6f1ad..0ae00761 100644
@@ -6,7 +6,7 @@ MACHINE_FEATURES += "screen touchscreen gpu"
 SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
-PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-sgx-ddk-km"
+PREFERRED_PROVIDER_virtual/gpudriver ?= ""
 
 KERNEL_DEVICETREE = " \
     ti/k3-am654-base-board.dtb \
meta-ti-bsp/conf/machine/include/omap-a15.inc +1 -1
index 2588aac2..bc6add02 100644
@@ -12,7 +12,7 @@ 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"
+PREFERRED_PROVIDER_virtual/gpudriver ?= ""
 PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
 
 KERNEL_IMAGETYPE = "zImage"
meta-ti-bsp/conf/machine/include/ti33x.inc +1 -1
index da2273e1..95499552 100644
@@ -13,7 +13,7 @@ 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"
+PREFERRED_PROVIDER_virtual/gpudriver ?= ""
 PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc"
 
 KERNEL_IMAGETYPE = "zImage"
meta-ti-bsp/conf/machine/include/ti43x.inc +1 -1
index 277416b9..ec6d9c07 100644
@@ -13,7 +13,7 @@ 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"
+PREFERRED_PROVIDER_virtual/gpudriver ?= ""
 PVR_DISPLAY_CONTROLLER_ALIAS ?= "omapdrm"
 
 KERNEL_IMAGETYPE = "zImage"
Signature · 1 line
2.25.1
#6 lore raw

PATCH v8 6/6 conf/machine: fix use of screen and touchscreen machine features

In reply to Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

Some machine configs didn't specify their use of screen and touchscreen machine features correctly, fix them.

---
v8 - new patch for this series

 meta-ti-bsp/conf/machine/include/am62xx.inc | 2 +-
 meta-ti-bsp/conf/machine/include/am64xx.inc | 2 --
 meta-ti-bsp/conf/machine/include/j721e.inc  | 2 +-
 meta-ti-bsp/conf/machine/include/j721s2.inc | 2 +-
 meta-ti-bsp/conf/machine/include/j784s4.inc | 2 +-
 5 files changed, 4 insertions(+), 6 deletions(-)
meta-ti-bsp/conf/machine/include/am62xx.inc +1 -1
index 2a06fc0f..98df24b2 100644
@@ -1,7 +1,7 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am62xx"
 
-MACHINE_FEATURES += "screen touchscreen gpu"
+MACHINE_FEATURES += "screen gpu"
 
 SERIAL_CONSOLES = "115200;ttyS2"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
meta-ti-bsp/conf/machine/include/am64xx.inc +0 -2
index 0fd15b90..a2e5d673 100644
@@ -1,8 +1,6 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":am64xx"
 
-MACHINE_FEATURES += "screen touchscreen"
-
 SERIAL_CONSOLES = "115200;ttyS2 115200;ttyS1"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
meta-ti-bsp/conf/machine/include/j721e.inc +1 -1
index 74cdc0e7..8f9c24e6 100644
@@ -1,7 +1,7 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":j721e"
 
-MACHINE_FEATURES += "gpu"
+MACHINE_FEATURES += "screen gpu"
 
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
meta-ti-bsp/conf/machine/include/j721s2.inc +1 -1
index b0953c1a..70569a16 100644
@@ -1,7 +1,7 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":j721s2"
 
-MACHINE_FEATURES += "gpu"
+MACHINE_FEATURES += "screen gpu"
 
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
meta-ti-bsp/conf/machine/include/j784s4.inc +1 -1
index 48d20a21..d03ee4a4 100644
@@ -1,7 +1,7 @@
 require conf/machine/include/k3.inc
 SOC_FAMILY:append = ":j784s4"
 
-MACHINE_FEATURES += "gpu"
+MACHINE_FEATURES += "screen gpu"
 
 PREFERRED_PROVIDER_virtual/gpudriver ?= "ti-img-rogue-driver"
 
Signature · 1 line
2.25.1