package/mesa3d: add config option for DRI3 support
PATCH 1/2 package/mesa3d: add config option for DRI3 support
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)
package/mesa3d/Config.in +8 -0
@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3D +config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support" + help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool
@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)
@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCE
package/mesa3d/mesa3d.mk +7 -5
@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'
@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \
@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
Signature · 1 line
2.31.1
PATCH 2/2 package/mesa3d: gallium/kmsro drivers require dri3 for X11
- add upstream patch 0005-meson-kmsro-require-dri3-for-X11.patch ([1])
- simplfy libxshmfence dependency, always depend on it if selected
- select BR2_PACKAGE_MESA3D_DRI3 for all gallium/kmsro drivers in case X11 is selected, see meson.build:
240 with_gallium_kmsro = with_gallium_v3d or with_gallium_vc4 or with_gallium_etnaviv or with_gallium_panfrost or with_gallium_lima or with_gallium_freedreno [...]
524 if with_gallium_kmsro and (with_platform_x11 and not with_dri3)
525 error('kmsro requires dri3 for X11 support')
526 endif
- select BR2_PACKAGE_XLIB_LIBXSHMFENCE for all gallium/kmsro drivers in case X11 is selected, see meson.build:
1897 if with_dri3
[...]
1907 dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
Fixes:
- https://bugs.busybox.net/show_bug.cgi?id=13831
[1] https://gitlab.freedesktop.org/mesa/mesa/-/commit/479bda78480d472e1f311bf0ea5b5fafb47ac7ba
--- ...005-meson-kmsro-require-dri3-for-X11.patch | 42 +++++++++++++++++++ package/mesa3d/Config.in | 18 ++++++++ package/mesa3d/mesa3d.mk | 8 ++-- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 package/mesa3d/0005-meson-kmsro-require-dri3-for-X11.patch
package/mesa3d/0005-meson-kmsro-require-dri3-for-X11.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 945f32f09a010407035582712109d616dae31f6d Mon Sep 17 00:00:00 2001 +From: Erico Nunes <[email protected]> +Date: Thu, 10 Jun 2021 21:20:28 +0200 +Subject: [PATCH] meson: kmsro: require dri3 for X11 + +The current implementation in kmsro relies on buffer sharing using +WINSYS_HANDLE_TYPE_FD, which in x11 is only used by default when dri3 +is enabled. +Since the current implementation will not work without it, we can +prevent user error by checking that it is not disabled at configuration +time. + +Closes #4861 + +Signed-off-by: Erico Nunes <[email protected]> +Reviewed-by: Adam Jackson <[email protected]> +Reviewed-by: Eric Engestrom <[email protected]> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11305> +[Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/commit/479bda78480d472e1f311bf0ea5b5fafb47ac7ba.patch] +Signed-off-by: Peter Seiderer <[email protected]> +--- + meson.build | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/meson.build b/meson.build +index e1e94e7..37b8868 100644 +--- a/meson.build ++++ b/meson.build +@@ -521,6 +521,10 @@ if with_dri + endif + endif + ++if with_gallium_kmsro and (with_platform_x11 and not with_dri3) ++ error('kmsro requires dri3 for X11 support') ++endif ++ + _vdpau = get_option('gallium-vdpau') + if _vdpau == 'true' + _vdpau = 'enabled' +-- +2.31.1 +
package/mesa3d/Config.in +18 -0
@@ -105,7 +105,10 @@ comment "Gallium drivers" config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV bool "Gallium Etnaviv driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_ETNAVIV help Mesa driver for Vivante GPUs.
@@ -118,7 +121,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO # can't see is just spurious. However, that dependency is about # the toolchain having sync4 primitives, which is always a given # for arm/aarch64. + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_FREEDRENO help Mesa driver for Freedreno GPUs.
@@ -145,7 +151,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA bool "Gallium lima driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 help Mesa driver for ARM Mali Utgard GPUs.
@@ -160,7 +169,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST bool "Gallium panfrost driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 help Mesa driver for ARM Mali Midgard and Bifrost GPUs.
@@ -247,7 +259,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D bool "Gallium v3d driver" depends on (BR2_arm && BR2_ARM_CPU_HAS_NEON) || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_VC4 select BR2_PACKAGE_MESA3D_OPENGL_EGL help
@@ -261,7 +276,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 bool "Gallium vc4 driver" depends on BR2_arm || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_VC4 select BR2_PACKAGE_MESA3D_OPENGL_EGL help
package/mesa3d/mesa3d.mk +4 -4
@@ -29,6 +29,10 @@ MESA3D_CONF_OPTS = \ -Dgallium-omx=disabled \ -Dpower8=disabled +ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) +MESA3D_DEPENDENCIES += xlib_libxshmfence +endif + # Codesourcery ARM 2014.05 fail to link libmesa_dri_drivers.so with --as-needed linker # flag due to a linker bug between binutils 2.24 and 2.25 (2.24.51.20140217). ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
@@ -130,9 +134,6 @@ ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ -Ddri-drivers= else -ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) -MESA3D_DEPENDENCIES += xlib_libxshmfence -endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \ -Dglx-direct=true \
@@ -143,7 +144,6 @@ ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) MESA3D_CONF_OPTS += \ -Dvulkan-drivers= else -MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
Signature · 1 line
2.31.1
PATCH 2/2 package/mesa3d: gallium/kmsro drivers require dri3 for X11
Quoted 4 lines · Peter Seiderer
- add upstream patch 0005-meson-kmsro-require-dri3-for-X11.patch ([1])
- simplfy libxshmfence dependency, always depend on it if selected
Maybe that should be done in a separate commit, with a better explanation why.
Quoted 9 lines
- select
BR2_PACKAGE_MESA3D_DRI3for all gallium/kmsro drivers in case X11 is selected, see meson.build:240
with_gallium_kmsro=with_gallium_v3dorwith_gallium_vc4orwith_gallium_etnavivorwith_gallium_panfrostorwith_gallium_limaorwith_gallium_freedreno[...]
524 ifwith_gallium_kmsroand (with_platform_x11and notwith_dri3)
525 error('kmsro requires dri3 for X11 support')
526 endif
Now *that's* an excellent explanation!
Quoted 7 lines
- select
BR2_PACKAGE_XLIB_LIBXSHMFENCEfor all gallium/kmsro drivers in case X11 is selected, see meson.build:1897 if
with_dri3
[...]
1907dep_xshmfence=dependency('xshmfence', version : '>= 1.1')
nitpick: I don't see the "in case X11 is selected" part in the quoted code.
Quoted 68 lines
Fixes:
- https://bugs.busybox.net/show_bug.cgi?id=13831
[1] https://gitlab.freedesktop.org/mesa/mesa/-/commit/479bda78480d472e1f311bf0ea5b5fafb47ac7ba
Signed-off-by Peter Seiderer <[email protected]>--- ...005-meson-kmsro-require-dri3-for-X11.patch | 42 +++++++++++++++++++ package/mesa3d/Config.in | 18 ++++++++ package/mesa3d/mesa3d.mk | 8 ++-- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 package/mesa3d/0005-meson-kmsro-require-dri3-for-X11.patchpackage/mesa3d/0005-meson-kmsro-require-dri3-for-X11.patch new file +42
-0@@ -0,0 +1,42 @@ +From 945f32f09a010407035582712109d616dae31f6d Mon Sep 17 00:00:00 2001 +From: Erico Nunes <[email protected]> +Date: Thu, 10 Jun 2021 21:20:28 +0200 +Subject: [PATCH] meson: kmsro: require dri3 for X11 + +The current implementation in kmsro relies on buffer sharing using +WINSYS_HANDLE_TYPE_FD, which in x11 is only used by default when dri3 +is enabled. +Since the current implementation will not work without it, we can +prevent user error by checking that it is not disabled at configuration +time. + +Closes #4861 + +Signed-off-by: Erico Nunes <[email protected]> +Reviewed-by: Adam Jackson <[email protected]> +Reviewed-by: Eric Engestrom <[email protected]> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11305> +[Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/commit/479bda78480d472e1f311bf0ea5b5fafb47ac7ba.patch] +Signed-off-by: Peter Seiderer <[email protected]> +--- + meson.build | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/meson.build b/meson.build +index e1e94e7..37b8868 100644 +--- a/meson.build ++++ b/meson.build +@@ -521,6 +521,10 @@ if with_dri + endif + endif + ++if with_gallium_kmsro and (with_platform_x11 and not with_dri3) ++ error('kmsro requires dri3 for X11 support') ++endif ++ + _vdpau = get_option('gallium-vdpau') + if _vdpau == 'true' + _vdpau = 'enabled' +-- +2.31.1 +package/mesa3d/Config.in +0
-0
package/mesa3d/Config.in comment "Gallium drivers" · line 111
Quoted 7 lines
package/mesa3d/Config.in +3
-0@@ -105,7 +105,10 @@ comment "Gallium drivers" config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV bool "Gallium Etnaviv driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7
Given the quoted code above, I think all of these should be moved toBR2_PACKAGE_MESA3D_GALLIUM_DRIVER. The "depends on" would have to be copied, not moved. Having it in the BR2_PACKAGE_MESA3D_GALLIUM_DRIVER is kind of redundant, but it serves as a reminder to people adding gallium drivers that they need to copy that dependency.
Quoted 26 lines
package/mesa3d/Config.in +6
-0select BR2_PACKAGE_LIBDRM_ETNAVIV help Mesa driver for Vivante GPUs.@@ -118,7 +121,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO # can't see is just spurious. However, that dependency is about # the toolchain having sync4 primitives, which is always a given # for arm/aarch64. + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_FREEDRENO help Mesa driver for Freedreno GPUs.@@ -145,7 +151,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA bool "Gallium lima driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 help Mesa driver for ARM Mali Utgard GPUs.
package/mesa3d/Config.in config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU · line 175
Quoted 7 lines
package/mesa3d/Config.in +3
-0@@ -160,7 +169,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST bool "Gallium panfrost driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7
This, for example, makes me suspect that the libxshmfence select should really
be part of DRI3.
Regards,
Arnout
Quoted 59 lines
package/mesa3d/Config.in +6
-0help Mesa driver for ARM Mali Midgard and Bifrost GPUs.@@ -247,7 +259,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D bool "Gallium v3d driver" depends on (BR2_arm && BR2_ARM_CPU_HAS_NEON) || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_VC4 select BR2_PACKAGE_MESA3D_OPENGL_EGL help@@ -261,7 +276,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 bool "Gallium vc4 driver" depends on BR2_arm || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_VC4 select BR2_PACKAGE_MESA3D_OPENGL_EGL helppackage/mesa3d/mesa3d.mk +4
-4@@ -29,6 +29,10 @@ MESA3D_CONF_OPTS = \ -Dgallium-omx=disabled \ -Dpower8=disabled +ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) +MESA3D_DEPENDENCIES += xlib_libxshmfence +endif + # Codesourcery ARM 2014.05 fail to link libmesa_dri_drivers.so with --as-needed linker # flag due to a linker bug between binutils 2.24 and 2.25 (2.24.51.20140217). ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)@@ -130,9 +134,6 @@ ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ -Ddri-drivers= else -ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) -MESA3D_DEPENDENCIES += xlib_libxshmfence -endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \ -Dglx-direct=true \@@ -143,7 +144,6 @@ ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) MESA3D_CONF_OPTS += \ -Dvulkan-drivers= else -MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
PATCH 2/2 package/mesa3d: gallium/kmsro drivers require dri3 for X11
Hello Arnout,
Quoted 7 lines · Arnout Vandecappelle
Quoted 4 lines · Peter Seiderer
- add upstream patch 0005-meson-kmsro-require-dri3-for-X11.patch ([1])
- simplfy libxshmfence dependency, always depend on it if selected
Maybe that should be done in a separate commit, with a better explanation why.
- simplfy libxshmfence dependency, always depend on it if selected to avoid code duplication in the mk file
Hope this explanation is better?
First considered an separate patch, but the it would only reduce the duplication at two places...., but with this patch adding more libxshmfence at more places it makes more sense..., but can extract as as separate patch?
Quoted 5 lines
Quoted 5 lines
- select
BR2_PACKAGE_MESA3D_DRI3for all gallium/kmsro drivers in case X11 is selected, see meson.build:
Quoted 12 lines
Quoted 5 lines
240
with_gallium_kmsro=with_gallium_v3dorwith_gallium_vc4orwith_gallium_etnavivorwith_gallium_panfrostorwith_gallium_limaorwith_gallium_freedreno[...]
524 ifwith_gallium_kmsroand (with_platform_x11and notwith_dri3)
525 error('kmsro requires dri3 for X11 support')
526 endifNow *that's* an excellent explanation!
Quoted 4 lines
- select
BR2_PACKAGE_XLIB_LIBXSHMFENCEfor all gallium/kmsro drivers in case X11 is selected, see meson.build:
1873 if with_platform_x11
[...]
1894 if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
[...]
Quoted 5 lines
Quoted 3 lines
1897 if
with_dri3
[...]
1907dep_xshmfence=dependency('xshmfence', version : '>= 1.1')nitpick: I don't see the "in case X11 is selected" part in the quoted code.
Will fix in next patch iteration...
Quoted 110 lines
Quoted 69 lines
Fixes:
- https://bugs.busybox.net/show_bug.cgi?id=13831
[1] https://gitlab.freedesktop.org/mesa/mesa/-/commit/479bda78480d472e1f311bf0ea5b5fafb47ac7ba
Signed-off-by Peter Seiderer <[email protected]>--- ...005-meson-kmsro-require-dri3-for-X11.patch | 42 +++++++++++++++++++ package/mesa3d/Config.in | 18 ++++++++ package/mesa3d/mesa3d.mk | 8 ++-- 3 files changed, 64 insertions(+), 4 deletions(-) create mode 100644 package/mesa3d/0005-meson-kmsro-require-dri3-for-X11.patchpackage/mesa3d/0005-meson-kmsro-require-dri3-for-X11.patch new file +42
-0@@ -0,0 +1,42 @@ +From 945f32f09a010407035582712109d616dae31f6d Mon Sep 17 00:00:00 2001 +From: Erico Nunes <[email protected]> +Date: Thu, 10 Jun 2021 21:20:28 +0200 +Subject: [PATCH] meson: kmsro: require dri3 for X11 + +The current implementation in kmsro relies on buffer sharing using +WINSYS_HANDLE_TYPE_FD, which in x11 is only used by default when dri3 +is enabled. +Since the current implementation will not work without it, we can +prevent user error by checking that it is not disabled at configuration +time. + +Closes #4861 + +Signed-off-by: Erico Nunes <[email protected]> +Reviewed-by: Adam Jackson <[email protected]> +Reviewed-by: Eric Engestrom <[email protected]> +Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11305> +[Upstream: https://gitlab.freedesktop.org/mesa/mesa/-/commit/479bda78480d472e1f311bf0ea5b5fafb47ac7ba.patch] +Signed-off-by: Peter Seiderer <[email protected]> +--- + meson.build | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/meson.build b/meson.build +index e1e94e7..37b8868 100644 +--- a/meson.build ++++ b/meson.build +@@ -521,6 +521,10 @@ if with_dri + endif + endif + ++if with_gallium_kmsro and (with_platform_x11 and not with_dri3) ++ error('kmsro requires dri3 for X11 support') ++endif ++ + _vdpau = get_option('gallium-vdpau') + if _vdpau == 'true' + _vdpau = 'enabled' +-- +2.31.1 +package/mesa3d/Config.in +0
-0package/mesa3d/Config.in comment "Gallium drivers" · line 111
Quoted 7 lines
package/mesa3d/Config.in +3
-0@@ -105,7 +105,10 @@ comment "Gallium drivers" config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV bool "Gallium Etnaviv driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7Given the quoted code above, I think all of these should be moved to
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER. The "depends on" would have to be copied, not moved. Having it in theBR2_PACKAGE_MESA3D_GALLIUM_DRIVERis kind of redundant, but it serves as a reminder to people adding gallium drivers that they need to copy that dependency.Quoted 27 lines
package/mesa3d/Config.in +6
-0select BR2_PACKAGE_LIBDRM_ETNAVIV help Mesa driver for Vivante GPUs.@@ -118,7 +121,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_FREEDRENO # can't see is just spurious. However, that dependency is about # the toolchain having sync4 primitives, which is always a given # for arm/aarch64. + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_FREEDRENO help Mesa driver for Freedreno GPUs.@@ -145,7 +151,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_IRIS config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_LIMA bool "Gallium lima driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 help Mesa driver for ARM Mali Utgard GPUs.@@ -160,7 +169,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
Quoted 9 lines
package/mesa3d/Config.in config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU · line 175
Quoted 6 lines
package/mesa3d/Config.in +3
-0config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_PANFROST bool "Gallium panfrost driver" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7This, for example, makes me suspect that the libxshmfence select should really
be part of DRI3.
As far as I read the meson.build file there is at least one place where dri3 is required without X11...., and (at least for an older version) the libxshmfence dependency was not triggered by DRI3 but by GLX, see [1]...
The other advantage is that the new added depends is near the new added select...
Regards,
Peter
[1] https://patchwork.ozlabs.org/project/buildroot/patch/20210110222833.26301-5-ps.report at gmx.net/
Quoted 68 lines
Regards,
ArnoutQuoted 52 lines
package/mesa3d/Config.in +6
-0help Mesa driver for ARM Mali Midgard and Bifrost GPUs.@@ -247,7 +259,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_TEGRA config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D bool "Gallium v3d driver" depends on (BR2_arm && BR2_ARM_CPU_HAS_NEON) || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_VC4 select BR2_PACKAGE_MESA3D_OPENGL_EGL help@@ -261,7 +276,10 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_V3D config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 bool "Gallium vc4 driver" depends on BR2_arm || BR2_aarch64 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 || !BR2_PACKAGE_XORG7 # libxshmfence select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBDRM_VC4 select BR2_PACKAGE_MESA3D_OPENGL_EGL helppackage/mesa3d/mesa3d.mk +4
-3@@ -29,6 +29,10 @@ MESA3D_CONF_OPTS = \ -Dgallium-omx=disabled \ -Dpower8=disabled +ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) +MESA3D_DEPENDENCIES += xlib_libxshmfence +endif + # Codesourcery ARM 2014.05 fail to link libmesa_dri_drivers.so with --as-needed linker # flag due to a linker bug between binutils 2.24 and 2.25 (2.24.51.20140217). ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)@@ -130,9 +134,6 @@ ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ -Ddri-drivers= else -ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) -MESA3D_DEPENDENCIES += xlib_libxshmfence -endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \ -Dglx-direct=true \package/mesa3d/mesa3d.mk ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) · line 149
Quoted 7 lines
package/mesa3d/mesa3d.mk +0
-1@@ -143,7 +144,6 @@ ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),) MESA3D_CONF_OPTS += \ -Dvulkan-drivers= else -MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 1/2 package/mesa3d: add config option for DRI3 support
In reply to Peter SeidererHi Peter,
Quoted 14 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0
package/mesa3d/Config.in menuconfig BR2_PACKAGE_MESA3D · line 20
Quoted 5 lines
package/mesa3d/Config.in +2
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3D +config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support"
Does it make sense to have this as a user-selectable option? Wouldn't it be
better to make this a blind option? (The latter has the advantage that we can easily refactor it later, without legacy handling and stuff.)
I just did a build with just DRI3 selected and it didn't install anything to
target or staging. This suggests that the option isn't useful on its own.
More importantly: have you checked that DRI3 doesn't have any dependencies of
itself? Check the meson files to see if there are dependencies that are implied directly by dri3 (i.e., maybe the xshmfence dependency comes from dri3 rather than the individual dri driver). Those things should be moved around as well, similar how they are put in BR2_PACKAGE_MESA3D_DRI_DRIVER instead of the individual drivers.
Series marked as Changes Requested.
Regards,
Arnout
Quoted 64 lines
package/mesa3d/Config.in +6
-0+ help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-5@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
PATCH 1/2 package/mesa3d: add config option for DRI3 support
Hello Arnout,
Quoted 18 lines · Arnout Vandecappelle
Hi Peter,
Quoted 15 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D
Quoted 8 lines
package/mesa3d/Config.in menuconfig BR2_PACKAGE_MESA3D · line 20
Quoted 4 lines
package/mesa3d/Config.in +2
-0if BR2_PACKAGE_MESA3D +config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support"Does it make sense to have this as a user-selectable option? Wouldn't it be
better to make this a blind option? (The latter has the advantage that we can easily refactor it later, without legacy handling and stuff.)
As it is an feature option exposed by mesa3d I believe it makes sense...
Quoted 3 lines
I just did a build with just DRI3 selected and it didn't install anything to
target or staging. This suggests that the option isn't useful on its own.
Same for numerous other options in buildroot which enable/disable compile time feature include in packages, see e.g. the BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5, BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2, ... and many others...
Quoted 7 lines
More importantly: have you checked that DRI3 doesn't have any dependencies of
itself? Check the meson files to see if there are dependencies that are implied directly by dri3 (i.e., maybe the xshmfence dependency comes from dri3 rather than the individual dri driver). Those things should be moved around as well, similar how they are put inBR2_PACKAGE_MESA3D_DRI_DRIVERinstead of the individual drivers.
But this mimics the mesa3d internal logic (without an mesa3d exposed feature option)....
Regards,
Peter
Quoted 71 lines
Series marked as Changes Requested.
Regards,
ArnoutQuoted 64 lines
package/mesa3d/Config.in +6
-0+ help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-5@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
PATCH 1/2 package/mesa3d: add config option for DRI3 support
Quoted 24 lines · Peter Seiderer
Hello Arnout,
Quoted 20 lines · Arnout Vandecappelle
Hi Peter,
Quoted 17 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3D
Quoted 8 lines
Quoted 6 lines
package/mesa3d/Config.in menuconfig BR2_PACKAGE_MESA3D · line 20
Quoted 2 lines
package/mesa3d/Config.in +2
-0+config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support"Does it make sense to have this as a user-selectable option? Wouldn't it be
better to make this a blind option? (The latter has the advantage that we can easily refactor it later, without legacy handling and stuff.)As it is an feature option exposed by mesa3d I believe it makes sense...
I think putting "option exposed by mesa3d" and "make sense" in the same
sentence is a bit of a stretch :-) The proper thing for mesa3d to do would be to enable dri3 automatically if a driver needs it. That we have to pass it explicitly is just silly IMHO.
Quoted 6 lines
Quoted 2 lines
I just did a build with just DRI3 selected and it didn't install anything to
target or staging. This suggests that the option isn't useful on its own.Same for numerous other options in buildroot which enable/disable compile time feature include in packages, see e.g. the
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5,BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2, ... and many others...
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5 *will* install libcrypto to staging and
target, so I fail to see your point.
What I'm saying is: having it as a user-visible option only makes sense if a
user can do something with that option. Since mesa3d doesn't install anything when dri3 is selected, I suspect that it's useless as a user-visible option. And as I wrote, making it user-visible has a cost: it means that changing/removing the option later becomes more difficult (legacy handling and all that).
Of course, I could still be wrong. Maybe dri3 does something useful. But to me
it looks more like the shared-glapi option, that is meaningless by itself but that enables a subsystem that is required by some drivers.
Quoted 9 lines
Quoted 6 lines
More importantly: have you checked that DRI3 doesn't have any dependencies of
itself? Check the meson files to see if there are dependencies that are implied directly by dri3 (i.e., maybe the xshmfence dependency comes from dri3 rather than the individual dri driver). Those things should be moved around as well, similar how they are put inBR2_PACKAGE_MESA3D_DRI_DRIVERinstead of the individual drivers.But this mimics the mesa3d internal logic (without an mesa3d exposed feature option)....
I'm not sure what you mean. What I mean is: in meson.build there is:
if with_platform_x11
...
if (with_egl or
with_dri3 or (
with_gallium_vdpau or with_gallium_xvmc or with_gallium_xa or with_gallium_omx != 'disabled'))
dep_xcb_xfixes = dependency('xcb-xfixes')
endif
This means, IMHO, that in Config.in we need:
config BR2_PACKAGE_MESA3D_DRI3
bool
depends on ...
select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
and there are a bunch more like that.
Regards,
Arnout
Quoted 76 lines
Regards,
PeterQuoted 71 lines
Series marked as Changes Requested.
Regards,
ArnoutQuoted 64 lines
package/mesa3d/Config.in +6
-0+ help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-5@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
PATCH 1/2 package/mesa3d: add config option for DRI3 support
Hello Arnout,
Quoted 43 lines · Arnout Vandecappelle
Quoted 24 lines · Peter Seiderer
Hello Arnout,
Quoted 20 lines · Arnout Vandecappelle
Hi Peter,
Quoted 17 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3DQuoted 8 lines
Quoted 6 lines
package/mesa3d/Config.in menuconfig BR2_PACKAGE_MESA3D · line 20
Quoted 2 lines
package/mesa3d/Config.in +2
-0+config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support"Does it make sense to have this as a user-selectable option? Wouldn't it be
better to make this a blind option? (The latter has the advantage that we can easily refactor it later, without legacy handling and stuff.)As it is an feature option exposed by mesa3d I believe it makes sense...
I think putting "option exposed by mesa3d" and "make sense" in the same
sentence is a bit of a stretch :-) The proper thing for mesa3d to do would be to enable dri3 automatically if a driver needs it. That we have to pass it explicitly is just silly IMHO.Quoted 3 lines
Quoted 2 lines
I just did a build with just DRI3 selected and it didn't install anything to
target or staging. This suggests that the option isn't useful on its own.
Quoted 6 lines
Quoted 3 lines
Same for numerous other options in buildroot which enable/disable compile time feature include in packages, see e.g. the
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5,BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2, ... and many others...
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5*will* install libcrypto to staging and
target, so I fail to see your point.
With:
BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-aarch64" # BR2_PACKAGE_LIBOPENSSL_BIN is not set
# BR2_PACKAGE_LIBOPENSSL_ENGINES is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEA is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_SEED is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_DES is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOL is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3 is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST is not set # BR2_PACKAGE_LIBOPENSSL_UNSECURE is not set # BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINE is not set # BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP is not set
$ grep libcrypto build/libopenssl-1.1.1k/.files-list.txt libopenssl,./usr/lib/libcrypto.so.1.1 libopenssl,./usr/lib/libcrypto.a libopenssl,./usr/lib/libcrypto.so libopenssl,./usr/lib/pkgconfig/libcrypto.pc
With:
BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-aarch64" # BR2_PACKAGE_LIBOPENSSL_BIN is not set
# BR2_PACKAGE_LIBOPENSSL_ENGINES is not set BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEA=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SEED=y BR2_PACKAGE_LIBOPENSSL_ENABLE_DES=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160=y BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3=y BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK=y BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST=y
# BR2_PACKAGE_LIBOPENSSL_UNSECURE is not set # BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINE is not set BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP=y
$ grep libcrypto build/libopenssl-1.1.1k/.files-list.txt libopenssl,./usr/lib/libcrypto.so.1.1 libopenssl,./usr/lib/libcrypto.a libopenssl,./usr/lib/libcrypto.so libopenssl,./usr/lib/pkgconfig/libcrypto.pc
I would describe the _ENABLE_... options as enabling/disabling (compile time) features of libcrypto...
Regards,
Peter
Quoted 123 lines
What I'm saying is: having it as a user-visible option only makes sense if a
user can do something with that option. Since mesa3d doesn't install anything when dri3 is selected, I suspect that it's useless as a user-visible option. And as I wrote, making it user-visible has a cost: it means that changing/removing the option later becomes more difficult (legacy handling and all that).Of course, I could still be wrong. Maybe dri3 does something useful. But to me
it looks more like the shared-glapi option, that is meaningless by itself but that enables a subsystem that is required by some drivers.Quoted 9 lines
Quoted 6 lines
More importantly: have you checked that DRI3 doesn't have any dependencies of
itself? Check the meson files to see if there are dependencies that are implied directly by dri3 (i.e., maybe the xshmfence dependency comes from dri3 rather than the individual dri driver). Those things should be moved around as well, similar how they are put inBR2_PACKAGE_MESA3D_DRI_DRIVERinstead of the individual drivers.But this mimics the mesa3d internal logic (without an mesa3d exposed feature option)....
I'm not sure what you mean. What I mean is: in meson.build there is:
if
with_platform_x11
...
if (with_eglor
with_dri3or (
with_gallium_vdpauorwith_gallium_xvmcorwith_gallium_xaorwith_gallium_omx!= 'disabled'))
dep_xcb_xfixes= dependency('xcb-xfixes')
endifThis means, IMHO, that in Config.in we need:
config
BR2_PACKAGE_MESA3D_DRI3
bool
depends on ...
selectBR2_PACKAGE_XLIB_LIBXFIXESifBR2_PACKAGE_XORG7and there are a bunch more like that.
Regards,
ArnoutQuoted 76 lines
Regards,
PeterQuoted 71 lines
Series marked as Changes Requested.
Regards,
ArnoutQuoted 64 lines
package/mesa3d/Config.in +6
-0+ help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-5@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
PATCH 1/2 package/mesa3d: add config option for DRI3 support
Quoted 130 lines · Peter Seiderer
Hello Arnout,
Quoted 43 lines · Arnout Vandecappelle
Quoted 24 lines · Peter Seiderer
Hello Arnout,
Quoted 20 lines · Arnout Vandecappelle
Hi Peter,
Quoted 17 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3DQuoted 8 lines
Quoted 6 lines
package/mesa3d/Config.in menuconfig BR2_PACKAGE_MESA3D · line 20
Quoted 2 lines
package/mesa3d/Config.in +2
-0+config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support"Does it make sense to have this as a user-selectable option? Wouldn't it be
better to make this a blind option? (The latter has the advantage that we can easily refactor it later, without legacy handling and stuff.)As it is an feature option exposed by mesa3d I believe it makes sense...
I think putting "option exposed by mesa3d" and "make sense" in the same
sentence is a bit of a stretch :-) The proper thing for mesa3d to do would be to enable dri3 automatically if a driver needs it. That we have to pass it explicitly is just silly IMHO.Quoted 3 lines
Quoted 2 lines
I just did a build with just DRI3 selected and it didn't install anything to
target or staging. This suggests that the option isn't useful on its own.Quoted 6 lines
Quoted 3 lines
Same for numerous other options in buildroot which enable/disable compile time feature include in packages, see e.g. the
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5,BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2, ... and many others...
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5*will* install libcrypto to staging and
target, so I fail to see your point.With:
BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-aarch64" #
BR2_PACKAGE_LIBOPENSSL_BINis not set
#BR2_PACKAGE_LIBOPENSSL_ENGINESis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHAis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEAis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SEEDis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_DESis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOLis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISHis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SSLis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSLis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_PSKis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_CASTis not set #BR2_PACKAGE_LIBOPENSSL_UNSECUREis not set #BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINEis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_COMPis not set$ grep libcrypto build/libopenssl-1.1.1k/.files-list.txt libopenssl,./usr/lib/libcrypto.so.1.1 libopenssl,./usr/lib/libcrypto.a libopenssl,./usr/lib/libcrypto.so libopenssl,./usr/lib/pkgconfig/libcrypto.pcWith:
BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-aarch64" #
BR2_PACKAGE_LIBOPENSSL_BINis not set
#BR2_PACKAGE_LIBOPENSSL_ENGINESis not set BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEA=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SEED=y BR2_PACKAGE_LIBOPENSSL_ENABLE_DES=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160=y BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3=y BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK=y BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST=y
#BR2_PACKAGE_LIBOPENSSL_UNSECUREis not set #BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINEis not set BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP=y$ grep libcrypto build/libopenssl-1.1.1k/.files-list.txt libopenssl,./usr/lib/libcrypto.so.1.1 libopenssl,./usr/lib/libcrypto.a libopenssl,./usr/lib/libcrypto.so libopenssl,./usr/lib/pkgconfig/libcrypto.pc
Quoted 2 lines
I would describe the _ENABLE_... options as enabling/disabling (compile time) features of libcrypto...
Exactly: by enabling the RC4 option, something additional gets built into
libcrypto. But I think the dri3 option doesn't really enable anything at all...
- dri3 enabled but none of the drivers using it enabled: has no effect on what is installed to taret/staging (i.e. anything that does get installed is exactly the same as without that optoin.
- dri3 not enabled but one of the drivers using it is enabled: build fails.
I'm not sure of this, but I suspect this is the case. that's why I suspect that
it makes no sense as a user-visible option:
Quoted 5 lines
Quoted 5 lines
What I'm saying is: having it as a user-visible option only makes sense if a
user can do something with that option. Since mesa3d doesn't install anything when dri3 is selected, I suspect that it's useless as a user-visible option. And as I wrote, making it user-visible has a cost: it means that changing/removing the option later becomes more difficult (legacy handling and all that).
Regards,
Arnout
Quoted 118 lines
Quoted 117 lines
Of course, I could still be wrong. Maybe dri3 does something useful. But to me
it looks more like the shared-glapi option, that is meaningless by itself but that enables a subsystem that is required by some drivers.Quoted 9 lines
Quoted 6 lines
More importantly: have you checked that DRI3 doesn't have any dependencies of
itself? Check the meson files to see if there are dependencies that are implied directly by dri3 (i.e., maybe the xshmfence dependency comes from dri3 rather than the individual dri driver). Those things should be moved around as well, similar how they are put inBR2_PACKAGE_MESA3D_DRI_DRIVERinstead of the individual drivers.But this mimics the mesa3d internal logic (without an mesa3d exposed feature option)....
I'm not sure what you mean. What I mean is: in meson.build there is:
if
with_platform_x11
...
if (with_eglor
with_dri3or (
with_gallium_vdpauorwith_gallium_xvmcorwith_gallium_xaorwith_gallium_omx!= 'disabled'))
dep_xcb_xfixes= dependency('xcb-xfixes')
endifThis means, IMHO, that in Config.in we need:
config
BR2_PACKAGE_MESA3D_DRI3
bool
depends on ...
selectBR2_PACKAGE_XLIB_LIBXFIXESifBR2_PACKAGE_XORG7and there are a bunch more like that.
Regards,
ArnoutQuoted 76 lines
Regards,
PeterQuoted 71 lines
Series marked as Changes Requested.
Regards,
ArnoutQuoted 64 lines
package/mesa3d/Config.in +6
-0+ help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-5@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
PATCH 1/2 package/mesa3d: add config option for DRI3 support
Quoted 131 lines · Arnout Vandecappelle
Quoted 130 lines · Peter Seiderer
Hello Arnout,
Quoted 43 lines · Arnout Vandecappelle
Quoted 24 lines · Peter Seiderer
Hello Arnout,
Quoted 20 lines · Arnout Vandecappelle
Hi Peter,
Quoted 17 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3DQuoted 8 lines
Quoted 6 lines
package/mesa3d/Config.in menuconfig BR2_PACKAGE_MESA3D · line 20
Quoted 2 lines
package/mesa3d/Config.in +2
-0+config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support"Does it make sense to have this as a user-selectable option? Wouldn't it be
better to make this a blind option? (The latter has the advantage that we can easily refactor it later, without legacy handling and stuff.)As it is an feature option exposed by mesa3d I believe it makes sense...
I think putting "option exposed by mesa3d" and "make sense" in the same
sentence is a bit of a stretch :-) The proper thing for mesa3d to do would be to enable dri3 automatically if a driver needs it. That we have to pass it explicitly is just silly IMHO.Quoted 3 lines
Quoted 2 lines
I just did a build with just DRI3 selected and it didn't install anything to
target or staging. This suggests that the option isn't useful on its own.Quoted 6 lines
Quoted 3 lines
Same for numerous other options in buildroot which enable/disable compile time feature include in packages, see e.g. the
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5,BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2, ... and many others...
BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5*will* install libcrypto to staging and
target, so I fail to see your point.With:
BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-aarch64" #
BR2_PACKAGE_LIBOPENSSL_BINis not set
#BR2_PACKAGE_LIBOPENSSL_ENGINESis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHAis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEAis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SEEDis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_DESis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOLis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISHis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SSLis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3is not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSLis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_PSKis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_CASTis not set #BR2_PACKAGE_LIBOPENSSL_UNSECUREis not set #BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINEis not set #BR2_PACKAGE_LIBOPENSSL_ENABLE_COMPis not set$ grep libcrypto build/libopenssl-1.1.1k/.files-list.txt libopenssl,./usr/lib/libcrypto.so.1.1 libopenssl,./usr/lib/libcrypto.a libopenssl,./usr/lib/libcrypto.so libopenssl,./usr/lib/pkgconfig/libcrypto.pcWith:
BR2_PACKAGE_OPENSSL=y BR2_PACKAGE_LIBOPENSSL=y BR2_PACKAGE_LIBOPENSSL_TARGET_ARCH="linux-aarch64" #
BR2_PACKAGE_LIBOPENSSL_BINis not set
#BR2_PACKAGE_LIBOPENSSL_ENGINESis not set BR2_PACKAGE_LIBOPENSSL_ENABLE_CHACHA=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC5=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RC4=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MD2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MD4=y BR2_PACKAGE_LIBOPENSSL_ENABLE_MDC2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_BLAKE2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_IDEA=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SEED=y BR2_PACKAGE_LIBOPENSSL_ENABLE_DES=y BR2_PACKAGE_LIBOPENSSL_ENABLE_RMD160=y BR2_PACKAGE_LIBOPENSSL_ENABLE_WHIRLPOOL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_BLOWFISH=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL2=y BR2_PACKAGE_LIBOPENSSL_ENABLE_SSL3=y BR2_PACKAGE_LIBOPENSSL_ENABLE_WEAK_SSL=y BR2_PACKAGE_LIBOPENSSL_ENABLE_PSK=y BR2_PACKAGE_LIBOPENSSL_ENABLE_CAST=y
#BR2_PACKAGE_LIBOPENSSL_UNSECUREis not set #BR2_PACKAGE_LIBOPENSSL_DYNAMIC_ENGINEis not set BR2_PACKAGE_LIBOPENSSL_ENABLE_COMP=y$ grep libcrypto build/libopenssl-1.1.1k/.files-list.txt libopenssl,./usr/lib/libcrypto.so.1.1 libopenssl,./usr/lib/libcrypto.a libopenssl,./usr/lib/libcrypto.so libopenssl,./usr/lib/pkgconfig/libcrypto.pc
Quoted 5 lines
Quoted 2 lines
I would describe the _ENABLE_... options as enabling/disabling (compile time) features of libcrypto...
Exactly: by enabling the RC4 option, something additional gets built into
libcrypto. But I think the dri3 option doesn't really enable anything at all...
If an option does not enable anything why is it needed, why does it make a difference?
Quoted 4 lines
- dri3 enabled but none of the drivers using it enabled: has no effect on what is installed to taret/staging (i.e. anything that does get installed is exactly the same as without that optoin.
??? See above about feature option..., and why should disable/enable make a runtime difference, see original bug report [1], [2]...
Quoted 2 lines
- dri3 not enabled but one of the drivers using it is enabled: build fails.
No build failure... only a runtime failure, see original bug report [1], [2]...
Regards,
Peter
[1] https://bugs.busybox.net/show_bug.cgi?id=13831
[2] https://gitlab.freedesktop.org/mesa/mesa/-/issues/4861
Quoted 136 lines
I'm not sure of this, but I suspect this is the case. that's why I suspect that
it makes no sense as a user-visible option:Quoted 5 lines
Quoted 5 lines
What I'm saying is: having it as a user-visible option only makes sense if a
user can do something with that option. Since mesa3d doesn't install anything when dri3 is selected, I suspect that it's useless as a user-visible option. And as I wrote, making it user-visible has a cost: it means that changing/removing the option later becomes more difficult (legacy handling and all that).Regards,
ArnoutQuoted 109 lines
Quoted 109 lines
Of course, I could still be wrong. Maybe dri3 does something useful. But to me
it looks more like the shared-glapi option, that is meaningless by itself but that enables a subsystem that is required by some drivers.Quoted 9 lines
Quoted 6 lines
More importantly: have you checked that DRI3 doesn't have any dependencies of
itself? Check the meson files to see if there are dependencies that are implied directly by dri3 (i.e., maybe the xshmfence dependency comes from dri3 rather than the individual dri driver). Those things should be moved around as well, similar how they are put inBR2_PACKAGE_MESA3D_DRI_DRIVERinstead of the individual drivers.But this mimics the mesa3d internal logic (without an mesa3d exposed feature option)....
I'm not sure what you mean. What I mean is: in meson.build there is:
if
with_platform_x11
...
if (with_eglor
with_dri3or (
with_gallium_vdpauorwith_gallium_xvmcorwith_gallium_xaorwith_gallium_omx!= 'disabled'))
dep_xcb_xfixes= dependency('xcb-xfixes')
endifThis means, IMHO, that in Config.in we need:
config
BR2_PACKAGE_MESA3D_DRI3
bool
depends on ...
selectBR2_PACKAGE_XLIB_LIBXFIXESifBR2_PACKAGE_XORG7and there are a bunch more like that.
Regards,
ArnoutQuoted 68 lines
Regards,
PeterQuoted 64 lines
Series marked as Changes Requested.
Regards,
ArnoutQuoted 57 lines
package/mesa3d/Config.in +6
-0+ help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-4@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ elseQuoted 9 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
package/mesa3d/mesa3d.mk MESA3D_CONF_OPTS += \ · line 150
Quoted 7 lines
package/mesa3d/mesa3d.mk +0
-1MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Quoted 4 lines · Peter Seiderer
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>
As discussed in another thread, I applied a heavily modified version of both
patches to master, thanks. Please try again if master works for you.
Regards,
Arnout
Quoted 72 lines
--- package/mesa3d/Config.in | 8 ++++++++ package/mesa3d/mesa3d.mk | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +8
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3D if BR2_PACKAGE_MESA3D +config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support" + help + Enable DRI3 support. + # Some Gallium driver needs libelf when built with LLVM support config BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS bool@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ !BR2_PACKAGE_MESA3D_OSMESA_GALLIUM + select BR2_PACKAGE_MESA3D_DRI3 if \ + (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4) select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \ (BR2_PACKAGE_XORG7 && BR2_TOOLCHAIN_HAS_SYNC_4)@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 # memfd.h depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert depends on BR2_PACKAGE_XORG7 # xorgproto + select BR2_PACKAGE_MESA3D_DRI3 select BR2_PACKAGE_MESA3D_VULKAN_DRIVER select BR2_PACKAGE_XORGPROTO select BR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +7
-4@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) MESA3D_CONF_OPTS += -Db_asneeded=false endif +ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif + ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y) MESA3D_DEPENDENCIES += host-llvm llvm MESA3D_MESON_EXTRA_BINARIES += llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers= else ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y) MESA3D_DEPENDENCIES += xlib_libxshmfence -MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabled endif MESA3D_CONF_OPTS += \ -Dshared-glapi=enabled \
package/mesa3d/mesa3d.mk MESA3D_CONF_OPTS += \ · line 150
Quoted 7 lines
package/mesa3d/mesa3d.mk +0
-1@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \ else MESA3D_DEPENDENCIES += xlib_libxshmfence MESA3D_CONF_OPTS += \ - -Ddri3=enabled \ -Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi!
Got back to this topic this morning.
According to this line for V3D/VC4:
select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7
Mesa3D will be built with DRI3 support only if xorg is going to be used too. Though I'm actually using xorg, and can confirm that is compiling properly with X, I may have a switch to wayland anytime soon. Is xorg really required?
I must admit that the build did not complete, due to an error with libnss. So it's just what I got from the build logs.
Regards,
Michael
Am 12/17/21 um 10:00 PM schrieb Arnout Vandecappelle:
Quoted 79 lines · Peter Seiderer
Quoted 4 lines
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>As discussed in another thread, I applied a heavily modified version
of both patches to master, thanks. Please try again if master works for you.Regards,
ArnoutQuoted 65 lines
---
package/mesa3d/Config.in | 8 ++++++++
package/mesa3d/mesa3d.mk| 12 +++++++-----2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3Dif
BR2_PACKAGE_MESA3Dpackage/mesa3d/Config.in +5
-0+config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support" + help + Enable DRI3 support. +# Some Gallium driver needs libelf when built with LLVM support config
BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
boolpackage/mesa3d/Config.in +0
-0@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \!BR2_PACKAGE_MESA3D_OSMESA_GALLIUM
+ selectBR2_PACKAGE_MESA3D_DRI3if \
+ (BR2_PACKAGE_XORG7&&BR2_TOOLCHAIN_HAS_SYNC_4) selectBR2_PACKAGE_XLIB_LIBXSHMFENCEif \
(BR2_PACKAGE_XORG7&&BR2_TOOLCHAIN_HAS_SYNC_4)package/mesa3d/Config.in +0
-0@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTELdepends on
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17#memfd.hdepends onBR2_TOOLCHAIN_USES_GLIBC# ifunc,static_assertdepends onBR2_PACKAGE_XORG7# xorgproto
+ selectBR2_PACKAGE_MESA3D_DRI3
selectBR2_PACKAGE_MESA3D_VULKAN_DRIVER
selectBR2_PACKAGE_XORGPROTO
selectBR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +0
-0@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
MESA3D_CONF_OPTS+= -Db_asneeded=false
endifpackage/mesa3d/mesa3d.mk +6
-0+ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif +ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
MESA3D_DEPENDENCIES+= host-llvm llvm
MESA3D_MESON_EXTRA_BINARIES+= llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'package/mesa3d/mesa3d.mk +1
-1@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers=else
ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
MESA3D_DEPENDENCIES+=xlib_libxshmfencepackage/mesa3d/mesa3d.mk +0
-3-MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabledendif
MESA3D_CONF_OPTS+= \
-Dshared-glapi=enabled \
Quoted 8 lines
Quoted 8 lines
package/mesa3d/mesa3d.mk +0
-0@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \else
MESA3D_DEPENDENCIES+=xlib_libxshmfence
MESA3D_CONF_OPTS+= \
- -Ddri3=enabled \
-Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Got back to this topic this morning.
According to this line for V3D/VC4:
select BR2_PACKAGE_MESA3D_DRI3 if BR2_PACKAGE_XORG7
Mesa3D will be built with DRI3 support only if xorg is going to be used too. Though I'm actually using xorg, and can confirm that is compiling properly with X, I may have a switch to wayland anytime soon. Is xorg really required?
I must admit that the build did not complete, due to an error with libnss. So it's just what I got from the build logs.
Regards,
Michael
p.s. Thunderbird caused a mess with the last mail, somehow. Sorry.
Am 12/19/21 um 8:14 AM schrieb Michael Taubert:
Quoted 94 lines
Hi!
Got back to this topic this morning.
According to this line:
select
BR2_PACKAGE_MESA3D_DRI3ifBR2_PACKAGE_XORG7Mesa3D will be built with DRI3 support only if xorg is going to be used too. Though I'm actually using xorg, and can confirm that is compiling properly with X, I may have a switch to wayland anytime soon. Is xorg really required?
I must admit that it
Regards,
MichaelAm 12/17/21 um 10:00 PM schrieb Arnout Vandecappelle:
Quoted 78 lines · Peter Seiderer
Quoted 4 lines
Add config option for DRI3 support and use it instead of DRI3 enable/disable logic in *.mk file.
Signed-off-by Peter Seiderer <[email protected]>As discussed in another thread, I applied a heavily modified version of both patches to master, thanks. Please try again if master works for you.
Regards,
ArnoutQuoted 65 lines
---
package/mesa3d/Config.in | 8 ++++++++
package/mesa3d/mesa3d.mk| 12 +++++++-----2 files changed, 15 insertions(+), 5 deletions(-)package/mesa3d/Config.in +0
-0@@ -16,6 +16,11 @@ menuconfig BR2_PACKAGE_MESA3Dif
BR2_PACKAGE_MESA3Dpackage/mesa3d/Config.in +5
-0+config BR2_PACKAGE_MESA3D_DRI3 + bool "Enable DRI3 support" + help + Enable DRI3 support. +# Some Gallium driver needs libelf when built with LLVM support config
BR2_PACKAGE_MESA3D_NEEDS_ELFUTILS
boolpackage/mesa3d/Config.in +0
-0@@ -65,6 +70,8 @@ config BR2_PACKAGE_MESA3D_DRI_DRIVER !BR2_PACKAGE_MESA3D_OPENGL_GLX && \ !BR2_PACKAGE_MESA3D_OPENGL_EGL && \!BR2_PACKAGE_MESA3D_OSMESA_GALLIUM
+ selectBR2_PACKAGE_MESA3D_DRI3if \
+ (BR2_PACKAGE_XORG7&&BR2_TOOLCHAIN_HAS_SYNC_4) selectBR2_PACKAGE_XLIB_LIBXSHMFENCEif \
(BR2_PACKAGE_XORG7&&BR2_TOOLCHAIN_HAS_SYNC_4)package/mesa3d/Config.in +0
-0@@ -359,6 +366,7 @@ config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTELdepends on
BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17#memfd.hdepends onBR2_TOOLCHAIN_USES_GLIBC# ifunc,static_assertdepends onBR2_PACKAGE_XORG7# xorgproto
+ selectBR2_PACKAGE_MESA3D_DRI3
selectBR2_PACKAGE_MESA3D_VULKAN_DRIVER
selectBR2_PACKAGE_XORGPROTO
selectBR2_PACKAGE_XLIB_LIBXSHMFENCEpackage/mesa3d/mesa3d.mk +0
-0@@ -35,6 +35,12 @@ ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y)
MESA3D_CONF_OPTS+= -Db_asneeded=false
endifpackage/mesa3d/mesa3d.mk +6
-0+ifeq ($(BR2_PACKAGE_MESA3D_DRI3),y) +MESA3D_CONF_OPTS += -Ddri3=enabled +else +MESA3D_CONF_OPTS += -Ddri3=disabled +endif +ifeq ($(BR2_PACKAGE_MESA3D_LLVM),y)
MESA3D_DEPENDENCIES+= host-llvm llvm
MESA3D_MESON_EXTRA_BINARIES+= llvm-config='$(STAGING_DIR)/usr/bin/llvm-config'package/mesa3d/mesa3d.mk +1
-1@@ -122,13 +128,10 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) MESA3D_CONF_OPTS += \ - -Ddri-drivers= -Ddri3=disabled + -Ddri-drivers=else
ifeq ($(BR2_PACKAGE_XLIB_LIBXSHMFENCE),y)
MESA3D_DEPENDENCIES+=xlib_libxshmfencepackage/mesa3d/mesa3d.mk +0
-3-MESA3D_CONF_OPTS += -Ddri3=enabled -else -MESA3D_CONF_OPTS += -Ddri3=disabledendif
MESA3D_CONF_OPTS+= \
-Dshared-glapi=enabled \
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
package/mesa3d/mesa3d.mk +0
-0@@ -142,7 +145,6 @@ MESA3D_CONF_OPTS += \else
MESA3D_DEPENDENCIES+=xlib_libxshmfence
MESA3D_CONF_OPTS+= \
- -Ddri3=enabled \
-Dvulkan-drivers=$(subst $(space),$(comma),$(MESA3D_VULKAN_DRIVERS-y)) endif
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 4 lines · Michael Taubert
Hi!
Got back to this topic this morning.
Quoted 8 lines
According to this line for V3D/VC4:
select
BR2_PACKAGE_MESA3D_DRI3ifBR2_PACKAGE_XORG7Mesa3D will be built with DRI3 support only if xorg is going to be used too. Though I'm actually using xorg, and can confirm that is compiling properly with X, I may have a switch to wayland anytime soon. Is xorg really required?
AFAIU, dri3 requires xshmfence, and our xshmfence package depends on xorg7. A
similar condition existed already, so I kept it.
If someone can get it working without xshmfence (thus without xorg7), they can
send a patch :-)
Note that it's possible to select BR2_PACKAGE_XORG7 without selecting any X
library. By itself, it doesn't actually do anything. Perhaps we should even get rid of that option, I don't know.
Regards,
Arnout
Quoted 8 lines
I must admit that the build did not complete, due to an error with libnss. So it's just what I got from the build logs.
Regards,
Michaelp.s. Thunderbird caused a mess with the last mail, somehow. Sorry.
[snip]
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot