diff options
Diffstat (limited to 'common')
15 files changed, 855 insertions, 59 deletions
diff --git a/common/conf/machine/include/amd-common-configurations.inc b/common/conf/machine/include/amd-common-configurations.inc index 4b67c72b..03a1efcb 100644 --- a/common/conf/machine/include/amd-common-configurations.inc +++ b/common/conf/machine/include/amd-common-configurations.inc @@ -6,12 +6,12 @@ PREFERRED_PROVIDER_jpeg ?= "jpeg" PREFERRED_PROVIDER_jpeg-native ?= "jpeg-native" PREFERRED_VERSION_linux-yocto ?= "4.4%" PREFERRED_VERSION_libav ?= "9.18" -PREFERRED_PROVIDER_llvm ?= "llvm8.0.0" +PREFERRED_PROVIDER_llvm ?= "llvm9.0.0" # Components that depend on LLVM should set versions here # so we know what needs to be changed/validated as LLVM moves -MESA_LLVM_RELEASE_amd = "8.0.0" -CLAMAV_LLVM_RELEASE_amd = "8.0.0" +MESA_LLVM_RELEASE_amd = "9.0.0" +CLAMAV_LLVM_RELEASE_amd = "9.0.0" MULTILIBS ?= "" require conf/multilib.conf diff --git a/common/recipes-core/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch b/common/recipes-core/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch new file mode 100644 index 00000000..774947ae --- /dev/null +++ b/common/recipes-core/llvm/llvm/0002-llvm-allow-env-override-of-exe-path.patch @@ -0,0 +1,115 @@ +From 0570fe02c07244a8724c1e6c0437f893c8aa8e93 Mon Sep 17 00:00:00 2001 +From: Martin Kelly <mkelly@xevo.com> +Date: Fri, 19 May 2017 00:22:57 -0700 +Subject: [PATCH 2/2] llvm: allow env override of exe path + +When using a native llvm-config from inside a sysroot, we need llvm-config to +return the libraries, include directories, etc. from inside the sysroot rather +than from the native sysroot. Thus provide an env override for calling +llvm-config from a target sysroot. + +To let it work in multilib environment, we need to provide a knob to supply +multilib dirname as well + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Martin Kelly <mkelly@xevo.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> +--- + tools/llvm-config/llvm-config.cpp | 35 ++++++++++++++++++++++--------- + 1 file changed, 25 insertions(+), 10 deletions(-) + +diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp +index bec89fef98c..91b4d6e4c43 100644 +--- a/tools/llvm-config/llvm-config.cpp ++++ b/tools/llvm-config/llvm-config.cpp +@@ -226,6 +226,13 @@ Typical components:\n\ + + /// Compute the path to the main executable. + std::string GetExecutablePath(const char *Argv0) { ++ // Hack for Yocto: we need to override the root path when we are using ++ // llvm-config from within a target sysroot. ++ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); ++ if (Sysroot != nullptr) { ++ return Sysroot; ++ } ++ + // This just needs to be some symbol in the binary; C++ doesn't + // allow taking the address of ::main however. + void *P = (void *)(intptr_t)GetExecutablePath; +@@ -284,7 +291,7 @@ int main(int argc, char **argv) { + // bin dir). + sys::fs::make_absolute(CurrentPath); + CurrentExecPrefix = +- sys::path::parent_path(sys::path::parent_path(CurrentPath)).str(); ++ sys::path::parent_path(sys::path::parent_path(sys::path::parent_path(CurrentPath))).str(); + + // Check to see if we are inside a development tree by comparing to possible + // locations (prefix style or CMake style). +@@ -293,7 +300,7 @@ int main(int argc, char **argv) { + DevelopmentTreeLayout = CMakeStyle; + ActiveObjRoot = LLVM_OBJ_ROOT; + } else if (sys::fs::equivalent(CurrentExecPrefix, +- Twine(LLVM_OBJ_ROOT) + "/bin")) { ++ Twine(LLVM_OBJ_ROOT) + "/bin/llvm9.0.0")) { + IsInDevelopmentTree = true; + DevelopmentTreeLayout = CMakeBuildModeStyle; + ActiveObjRoot = LLVM_OBJ_ROOT; +@@ -307,37 +314,45 @@ int main(int argc, char **argv) { + std::string ActivePrefix, ActiveBinDir, ActiveIncludeDir, ActiveLibDir, + ActiveCMakeDir; + std::string ActiveIncludeOption; ++ // Hack for Yocto: we need to override the multilib path when we are using ++ // llvm-config from within a target sysroot. ++ std::string Multilibdir = std::getenv("YOCTO_ALTERNATE_MULTILIB_NAME"); ++ if (Multilibdir.empty()) { ++ Multilibdir = "/lib/llvm9.0.0" LLVM_LIBDIR_SUFFIX; ++ } ++ + if (IsInDevelopmentTree) { +- ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include"; ++ ActiveIncludeDir = std::string(LLVM_SRC_ROOT) + "/include/llvm9.0.0"; + ActivePrefix = CurrentExecPrefix; + + // CMake organizes the products differently than a normal prefix style + // layout. ++ + switch (DevelopmentTreeLayout) { + case CMakeStyle: +- ActiveBinDir = ActiveObjRoot + "/bin"; +- ActiveLibDir = ActiveObjRoot + "/lib" + LLVM_LIBDIR_SUFFIX; ++ ActiveBinDir = ActiveObjRoot + "/bin/llvm9.0.0"; ++ ActiveLibDir = ActiveObjRoot + "/lib/llvm9.0.0" + LLVM_LIBDIR_SUFFIX; + ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; + break; + case CMakeBuildModeStyle: + ActivePrefix = ActiveObjRoot; +- ActiveBinDir = ActiveObjRoot + "/bin/" + build_mode; ++ ActiveBinDir = ActiveObjRoot + "/bin/llvm9.0.0/" + build_mode; + ActiveLibDir = +- ActiveObjRoot + "/lib" + LLVM_LIBDIR_SUFFIX + "/" + build_mode; ++ ActiveObjRoot + "/lib/llvm9.0.0" + LLVM_LIBDIR_SUFFIX + "/" + build_mode; + ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; + break; + } + + // We need to include files from both the source and object trees. + ActiveIncludeOption = +- ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include"); ++ ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include/llvm9.0.0"); + } else { + ActivePrefix = CurrentExecPrefix; +- ActiveIncludeDir = ActivePrefix + "/include"; ++ ActiveIncludeDir = ActivePrefix + "/include/llvm9.0.0"; + SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR)); + sys::fs::make_absolute(ActivePrefix, path); + ActiveBinDir = path.str(); +- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; ++ ActiveLibDir = ActivePrefix + Multilibdir; + ActiveCMakeDir = ActiveLibDir + "/cmake/llvm"; + ActiveIncludeOption = "-I" + ActiveIncludeDir; + } +-- +2.20.1 + diff --git a/common/recipes-core/llvm/llvm_git.bbappend b/common/recipes-core/llvm/llvm_git.bbappend new file mode 100644 index 00000000..cdd24559 --- /dev/null +++ b/common/recipes-core/llvm/llvm_git.bbappend @@ -0,0 +1,19 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" + +SRCREV = "b8d352a08bc6530a9de442af8f55649199481f1b" + +MAJOR_VERSION = "9" +MINOR_VERSION = "0" +PATCH_VERSION = "0" + +EXTRA_OECMAKE += "-DLLVM_VERSION_SUFFIX=''" + +PACKAGES =+ "${PN}-libremarks" + +FILES_${PN}-libremarks = "\ + ${libdir}/${LLVM_DIR}/libRemarks.so* \ +" + +INSANE_SKIP_${PN}-libremarks += "dev-so" diff --git a/common/recipes-graphics/drm/libdrm/amdgpu.ids b/common/recipes-graphics/drm/libdrm/amdgpu.ids new file mode 100644 index 00000000..d8867ea6 --- /dev/null +++ b/common/recipes-graphics/drm/libdrm/amdgpu.ids @@ -0,0 +1,204 @@ +# List of AMDGPU ID's +# +# Syntax: +# device_id, revision_id, product_name <-- single tab after comma + +1.0.0 +6600, 0, AMD Radeon HD 8600/8700M +6600, 81, AMD Radeon (TM) R7 M370 +6601, 0, AMD Radeon (TM) HD 8500M/8700M +6604, 0, AMD Radeon R7 M265 Series +6604, 81, AMD Radeon (TM) R7 M350 +6605, 0, AMD Radeon R7 M260 Series +6605, 81, AMD Radeon (TM) R7 M340 +6606, 0, AMD Radeon HD 8790M +6607, 0, AMD Radeon (TM) HD8530M +6608, 0, AMD FirePro W2100 +6610, 0, AMD Radeon HD 8600 Series +6610, 81, AMD Radeon (TM) R7 350 +6610, 83, AMD Radeon (TM) R5 340 +6611, 0, AMD Radeon HD 8500 Series +6613, 0, AMD Radeon HD 8500 series +6617, C7, AMD Radeon R7 240 Series +6640, 0, AMD Radeon HD 8950 +6640, 80, AMD Radeon (TM) R9 M380 +6646, 0, AMD Radeon R9 M280X +6646, 80, AMD Radeon (TM) R9 M470X +6647, 0, AMD Radeon R9 M270X +6647, 80, AMD Radeon (TM) R9 M380 +6649, 0, AMD FirePro W5100 +6658, 0, AMD Radeon R7 200 Series +665C, 0, AMD Radeon HD 7700 Series +665D, 0, AMD Radeon R7 200 Series +665F, 81, AMD Radeon (TM) R7 300 Series +6660, 0, AMD Radeon HD 8600M Series +6660, 81, AMD Radeon (TM) R5 M335 +6660, 83, AMD Radeon (TM) R5 M330 +6663, 0, AMD Radeon HD 8500M Series +6663, 83, AMD Radeon (TM) R5 M320 +6664, 0, AMD Radeon R5 M200 Series +6665, 0, AMD Radeon R5 M200 Series +6665, 83, AMD Radeon (TM) R5 M320 +6667, 0, AMD Radeon R5 M200 Series +666F, 0, AMD Radeon HD 8500M +6780, 0, ATI FirePro V (FireGL V) Graphics Adapter +678A, 0, ATI FirePro V (FireGL V) Graphics Adapter +6798, 0, AMD Radeon HD 7900 Series +679A, 0, AMD Radeon HD 7900 Series +679B, 0, AMD Radeon HD 7900 Series +679E, 0, AMD Radeon HD 7800 Series +67A0, 0, AMD Radeon FirePro W9100 +67A1, 0, AMD Radeon FirePro W8100 +67B0, 0, AMD Radeon R9 200 Series +67B0, 80, AMD Radeon (TM) R9 390 Series +67B1, 0, AMD Radeon R9 200 Series +67B1, 80, AMD Radeon (TM) R9 390 Series +67B9, 0, AMD Radeon R9 200 Series +67DF, C1, Radeon RX 580 Series +67DF, C2, Radeon RX 570 Series +67DF, C3, Radeon RX 580 Series +67DF, C4, AMD Radeon (TM) RX 480 Graphics +67DF, C5, AMD Radeon (TM) RX 470 Graphics +67DF, C6, Radeon RX 570 Series +67DF, C7, AMD Radeon (TM) RX 480 Graphics +67DF, CF, AMD Radeon (TM) RX 470 Graphics +67DF, D7, Radeon(TM) RX 470 Graphics +67DF, E3, Radeon RX Series +67DF, E7, Radeon RX 580 Series +67DF, EF, Radeon RX 570 Series +67C2, 0, 67C2:00 +67C2, 01, AMD Radeon (TM) Pro V7350x2 +67C2, 02, AMD Radeon (TM) Pro V7300X +67C4, 00, AMD Radeon (TM) Pro WX 7100 Graphics +67C7, 00, AMD Radeon (TM) Pro WX 5100 Graphics +67C0, 00, AMD Radeon (TM) Pro WX 7100 Graphics +67D0, 0, 67D0:00 +67D0, 01, AMD Radeon (TM) Pro V7350x2 +67D0, 02, AMD Radeon (TM) Pro V7300X +67E0, 00, AMD Radeon (TM) Pro WX Series +67E3, 00, AMD Radeon (TM) Pro WX 4100 +67E8, 00, AMD Radeon (TM) Pro WX Series +67E8, 01, AMD Radeon (TM) Pro WX Series +67E8, 80, AMD Radeon (TM) E9260 Graphics +67EB, 00, AMD Radeon (TM) Pro V5300X +67EF, C0, AMD Radeon (TM) RX Graphics +67EF, C1, AMD Radeon (TM) RX 460 Graphics +67EF, C3, Radeon RX Series +67EF, C5, AMD Radeon (TM) RX 460 Graphics +67EF, C7, AMD Radeon (TM) RX Graphics +67EF, CF, AMD Radeon (TM) RX 460 Graphics +67EF, E0, 67EF:E0 +67EF, E1, Radeon RX Series +67EF, E3, Radeon RX Series +67EF, E5, 67EF:E5 +67EF, E7, 67EF:E7 +67EF, EF, AMD Radeon (TM) RX Graphics +67EF, FF, Radeon(TM) RX 460 Graphics +67FF, C0, AMD Radeon (TM) RX Graphics +67FF, C1, AMD Radeon (TM) RX Graphics +67FF, CF, 67FF:CF +67FF, EF, 67FF:EF +67FF, FF, Radeon RX 550 Series +6800, 0, AMD Radeon HD 7970M +6801, 0, AMD Radeon(TM) HD8970M +6808, 0, ATI FirePro V(FireGL V) Graphics Adapter +6809, 0, ATI FirePro V(FireGL V) Graphics Adapter +6810, 0, AMD Radeon(TM) HD 8800 Series +6810, 81, AMD Radeon (TM) R7 370 Series +6811, 0, AMD Radeon(TM) HD8800 Series +6811, 81, AMD Radeon (TM) R7 300 Series +6818, 0, AMD Radeon HD 7800 Series +6819, 0, AMD Radeon HD 7800 Series +6820, 0, AMD Radeon HD 8800M Series +6820, 81, AMD Radeon (TM) R9 M375 +6820, 83, AMD Radeon (TM) R9 M375X +6821, 0, AMD Radeon HD 8800M Series +6821, 87, AMD Radeon (TM) R7 M380 +6821, 83, AMD Radeon R9 (TM) M370X +6822, 0, AMD Radeon E8860 +6823, 0, AMD Radeon HD 8800M Series +6825, 0, AMD Radeon HD 7800M Series +6827, 0, AMD Radeon HD 7800M Series +6828, 0, ATI FirePro V(FireGL V) Graphics Adapter +682B, 0, AMD Radeon HD 8800M Series +682B, 87, AMD Radeon (TM) R9 M360 +682C, 0, AMD FirePro W4100 +682D, 0, AMD Radeon HD 7700M Series +682F, 0, AMD Radeon HD 7700M Series +6835, 0, AMD Radeon R7 Series / HD 9000 Series +6837, 0, AMD Radeon HD7700 Series +683D, 0, AMD Radeon HD 7700 Series +683F, 0, AMD Radeon HD 7700 Series +6860, 00, Radeon Instinct MI25 +6860, 01, Radeon Pro V320 +6860, 02, Radeon Instinct MI25 +6860, 03, Radeon Pro V340 +6860, 04, Radeon Instinct MI25x2 +6860, C0, 6860:C0 +6861, 00, Radeon(TM) Pro WX9100 +6862, 00, Radeon Pro SSG +6863, 00, Radeon Vega Frontier Edition +6864, 00, 6864:00 +6864, 03, Radeon Pro V340 +6864, 04, Instinct MI25x2 +6867, 00, 6867:00 +6868, 00, Radeon(TM) Pro WX8100 +686C, 00, GLXT (Radeon Instinct MI25) MxGPU VFID +686C, 01, GLXT (Radeon Pro V320) MxGPU +686C, 02, GLXT (Radeon Instinct MI25) MxGPU +686C, 03, GLXT (Radeon Pro V340) MxGPU +686C, 04, GLXT (Radeon Instinct MI25x2) MxGPU +686C, C1, 686C:C1 +687F, C0, Radeon RX Vega +687F, C1, Radeon RX Vega +687F, C3, Radeon RX Vega +687F, C7, 687F:C7 +6900, 0, AMD Radeon R7 M260 +6900, 81, AMD Radeon (TM) R7 M360 +6900, 83, AMD Radeon (TM) R7 M340 +6901, 0, AMD Radeon R5 M255 +6907, 0, AMD Radeon R5 M255 +6907, 87, AMD Radeon (TM) R5 M315 +6920, 0, AMD RADEON R9 M395X +6920, 1, AMD RADEON R9 M390X +6921, 0, AMD Radeon R9 M295X +6929, 0, AMD FirePro S7150 +692B, 0, AMD FirePro W7100 +6938, 0, AMD Radeon R9 200 Series +6938, F0, AMD Radeon R9 200 Series +6938, F1, AMD Radeon (TM) R9 380 Series +6939, F0, AMD Radeon R9 200 Series +6939, 0, AMD Radeon R9 200 Series +6939, F1, AMD Radeon (TM) R9 380 Series +6980, 00, Radeon Pro WX3100 +6981, C0, 6981:C0 +6985, 00, AMD Radeon Pro WX3100 +6987, 80, AMD Embedded Radeon E9171 +6995, 00, AMD Radeon Pro WX2100 +6997, 00, Radeon Pro WX2100 +699F, 81, AMD Embedded Radeon E9170 Series +699F, C0, Radeon 500 Series +699F, C1, 699F:C1 +699F, C3, Radeon 500 Series +699F, C7, Radeon RX 550 Series +7300, C1, AMD FirePro (TM) S9300 x2 +7300, C8, AMD Radeon (TM) R9 Fury Series +7300, C9, Radeon (TM) Pro Duo +7300, CB, AMD Radeon (TM) R9 Fury Series +7300, CA, AMD Radeon (TM) R9 Fury Series +9874, C4, AMD Radeon R7 Graphics +9874, C5, AMD Radeon R6 Graphics +9874, C6, AMD Radeon R6 Graphics +9874, C7, AMD Radeon R5 Graphics +9874, 81, AMD Radeon R6 Graphics +9874, 87, AMD Radeon R5 Graphics +9874, 85, AMD Radeon R6 Graphics +9874, 84, AMD Radeon R7 Graphics +15DD, 81, AMD Radeon(TM) RX Vega 11 Graphics +15DD, 82, AMD Radeon(TM) RX Vega 8 Graphics +15DD, 83, AMD Radeon(TM) RX Vega 8 Graphics +15DD, 84, AMD Radeon(TM) RX Vega 6 Graphics +15DD, 85, AMD Radeon(TM) RX Vega 3 Graphics +15DD, 86, AMD Radeon(TM) RX Vega 11 Graphics +15DD, 88, AMD Radeon(TM) RX Vega 8 Graphics +15DD, C1, AMD Radeon(TM) RX Vega 11 Graphics
\ No newline at end of file diff --git a/common/recipes-graphics/drm/libdrm_git.bb b/common/recipes-graphics/drm/libdrm_git.bb new file mode 100644 index 00000000..ef2d578d --- /dev/null +++ b/common/recipes-graphics/drm/libdrm_git.bb @@ -0,0 +1,56 @@ +SUMMARY = "Userspace interface to the kernel DRM services" +DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \ +stands for \"Direct Rendering Manager\", which is the kernel portion of the \ +\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \ +accelerated OpenGL drivers." + +HOMEPAGE = "http://dri.freedesktop.org" +SECTION = "x11/base" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71" +PROVIDES = "drm" +DRM_VERSION = "2.4.99" +PV = "${DRM_VERSION}+git${SRCPV}" + +inherit autotools pkgconfig + +SRCREV = "b2103fa3257daa6acfdc6f4d4d8565abebaec4a8" +DEPENDS = "libpthread-stubs udev libpciaccess freetype libxext fontconfig libxrender libpng pixman" + +SRC_URI = "git://anongit.freedesktop.org/mesa/drm;branch=master \ + file://amdgpu.ids \ +" + +S = "${WORKDIR}/git" + +EXTRA_OECONF = "--disable-cairo-tests \ + --enable-omap-experimental-api \ + --enable-install-test-programs \ + --disable-manpages \ + --disable-valgrind \ + --enable-amdgpu \ + --enable-radeon \ + " + +ALLOW_EMPTY_${PN}-drivers = "1" +PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \ + ${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu" + +RRECOMMENDS_${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \ + ${PN}-exynos ${PN}-freedreno ${PN}-amdgpu" + +FILES_${PN}-tests = "${bindir}/dr* ${bindir}/mode* ${bindir}/*test" +FILES_${PN}-radeon = "${libdir}/libdrm_radeon.so.*" +FILES_${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*" +FILES_${PN}-omap = "${libdir}/libdrm_omap.so.*" +FILES_${PN}-intel = "${libdir}/libdrm_intel.so.*" +FILES_${PN}-exynos = "${libdir}/libdrm_exynos.so.*" +FILES_${PN}-kms = "${libdir}/libkms*.so.*" +FILES_${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*" +FILES_${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.*" + +do_install_append() { + cp ${S}/include/drm/amdgpu_drm.h ${D}/usr/include/libdrm + install -vd ${D}/usr/share/libdrm + cp ${WORKDIR}/amdgpu.ids ${D}/usr/share/libdrm +} diff --git a/common/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/common/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch new file mode 100644 index 00000000..6b85538f --- /dev/null +++ b/common/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch @@ -0,0 +1,40 @@ +From d6630c48a1aed64ff1068524b3aae76fff7b3447 Mon Sep 17 00:00:00 2001 +From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com> +Date: Mon, 19 Aug 2019 17:29:18 +0500 +Subject: [PATCH 1/3] meson.build: check for all linux host_os combinations + +Make sure that we are also looking for our host_os combinations like +linux-musl etc. when assuming support for DRM/KMS. + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> +--- + meson.build | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/meson.build b/meson.build +index 13b561f99de..78d0ea47790 100644 +--- a/meson.build ++++ b/meson.build +@@ -106,7 +106,7 @@ with_any_opengl = with_opengl or with_gles1 or with_gles2 + # Only build shared_glapi if at least one OpenGL API is enabled + with_shared_glapi = get_option('shared-glapi') and with_any_opengl + +-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux'].contains(host_machine.system()) ++system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly'].contains(host_machine.system()) or host_machine.system().startswith('linux') + + dri_drivers = get_option('dri-drivers') + if dri_drivers.contains('auto') +@@ -835,7 +835,7 @@ if cc.compiles('__uint128_t foo(void) { return 0; }', + endif + + # TODO: this is very incomplete +-if ['linux', 'cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) ++if ['cygwin', 'gnu', 'gnu/kfreebsd'].contains(host_machine.system()) or host_machine.system().startswith('linux') + pre_args += '-D_GNU_SOURCE' + endif + +-- +2.11.1 + diff --git a/common/recipes-graphics/mesa/files/0001-radeonsi-disabling-the-displayable-DCC-on-Raven-Ridg.patch b/common/recipes-graphics/mesa/files/0001-radeonsi-disabling-the-displayable-DCC-on-Raven-Ridg.patch new file mode 100644 index 00000000..67f140e5 --- /dev/null +++ b/common/recipes-graphics/mesa/files/0001-radeonsi-disabling-the-displayable-DCC-on-Raven-Ridg.patch @@ -0,0 +1,28 @@ +From 19e44acaf9b1e2609e32ee46fec19dc278188918 Mon Sep 17 00:00:00 2001 +From: Pavan Kumar Ramayanam <pavan.ramayanam@amd.com> +Date: Mon, 19 Aug 2019 14:31:42 +0530 +Subject: [PATCH] radeonsi: disabling the displayable DCC on Raven Ridge1 due + to Vaapi-vaapi fullscreen playback causing hard hang Signed-off-by: + Pavan Kumar Ramayanam <pavan.ramayanam@amd.com> + +--- + src/amd/common/ac_gpu_info.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c +index a501d840b25..9fd792bb4b6 100644 +--- a/src/amd/common/ac_gpu_info.c ++++ b/src/amd/common/ac_gpu_info.c +@@ -475,8 +475,7 @@ bool ac_query_gpu_info(int fd, void *dev_p, + info->ib_start_alignment = ib_align; + + if (info->drm_minor >= 31 && +- (info->family == CHIP_RAVEN || +- info->family == CHIP_RAVEN2)) { ++ (info->family == CHIP_RAVEN2)) { + if (info->num_render_backends == 1) + info->use_display_dcc_unaligned = true; + else +-- +2.17.1 + diff --git a/common/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/common/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch new file mode 100644 index 00000000..9433e450 --- /dev/null +++ b/common/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch @@ -0,0 +1,51 @@ +From d75beb97e470d1a9bd217004a4b0663da24a58bc Mon Sep 17 00:00:00 2001 +From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com> +Date: Mon, 19 Aug 2019 17:32:48 +0500 +Subject: [PATCH 2/3] meson.build: make TLS GLX optional again + +This was optional with autotools, and needs to be disabled +when using musl C library, for instance. + +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> +--- + meson.build | 4 +++- + meson_options.txt | 6 ++++++ + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 78d0ea47790..bb6e3083c20 100644 +--- a/meson.build ++++ b/meson.build +@@ -365,7 +365,9 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat + endif + endif + +-pre_args += '-DGLX_USE_TLS' ++if get_option('glx-tls') ++ pre_args += '-DGLX_USE_TLS' ++endif + if with_glx != 'disabled' + if not (with_platform_x11 and with_any_opengl) + error('Cannot build GLX support without X11 platform support and at least one OpenGL API') +diff --git a/meson_options.txt b/meson_options.txt +index 5cbb85658a2..c0ce8d8c8bf 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -334,6 +334,12 @@ option( + description : 'Enable direct rendering in GLX and EGL for DRI', + ) + option( ++ 'glx-tls', ++ type : 'boolean', ++ value : true, ++ description : 'Enable TLS support in GLX', ++) ++option( + 'I-love-half-baked-turnips', + type : 'boolean', + value : false, +-- +2.11.1 + diff --git a/common/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/common/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch new file mode 100644 index 00000000..dfdd778a --- /dev/null +++ b/common/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch @@ -0,0 +1,46 @@ +From 749880b5122f2cad82731cba6b3845ca364dcb29 Mon Sep 17 00:00:00 2001 +From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com> +Date: Mon, 19 Aug 2019 17:35:19 +0500 +Subject: [PATCH 3/3] Allow enable DRI without DRI drivers + +Signed-off-by: Andrei Gherzan <andrei@gherzan.ro> +Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> +Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> +--- + meson.build | 2 +- + meson_options.txt | 6 ++++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index bb6e3083c20..7f4cfffc64a 100644 +--- a/meson.build ++++ b/meson.build +@@ -136,7 +136,7 @@ with_dri_r200 = dri_drivers.contains('r200') + with_dri_nouveau = dri_drivers.contains('nouveau') + with_dri_swrast = dri_drivers.contains('swrast') + +-with_dri = dri_drivers.length() != 0 and dri_drivers != [''] ++with_dri = get_option('dri') or (_drivers.length() != 0 and _drivers != ['']) + + gallium_drivers = get_option('gallium-drivers') + if gallium_drivers.contains('auto') +diff --git a/meson_options.txt b/meson_options.txt +index c0ce8d8c8bf..29031134617 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -35,6 +35,12 @@ option( + description : 'enable support for dri3' + ) + option( ++ 'dri', ++ type : 'boolean', ++ value : false, ++ description : 'enable support for dri' ++) ++option( + 'dri-drivers', + type : 'array', + value : ['auto'], +-- +2.11.1 + diff --git a/common/recipes-graphics/mesa/mesa.inc b/common/recipes-graphics/mesa/mesa.inc new file mode 100644 index 00000000..50832b4a --- /dev/null +++ b/common/recipes-graphics/mesa/mesa.inc @@ -0,0 +1,249 @@ +SUMMARY = "A free implementation of the OpenGL API" +DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - \ +a system for rendering interactive 3D graphics. \ +A variety of device drivers allows Mesa to be used in many different environments \ +ranging from software emulation to complete hardware acceleration for modern GPUs. \ +Mesa is used as part of the overall Direct Rendering Infrastructure and X.org \ +environment." + +HOMEPAGE = "http://mesa3d.org" +BUGTRACKER = "https://bugs.freedesktop.org" +SECTION = "x11" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://docs/license.html;md5=3a4999caf82cc503ac8b9e37c235782e" + +PE = "2" + +DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native" +EXTRANATIVEPATH += "chrpath-native" +PROVIDES = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ + virtual/mesa \ + " + +inherit meson pkgconfig python3native gettext distro_features_check + +BBCLASSEXTEND = "native nativesdk" + +ANY_OF_DISTRO_FEATURES_class-target = "opengl vulkan" + +PLATFORMS ??= "${@bb.utils.filter('PACKAGECONFIG', 'x11 wayland', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'drm', '', d)} \ + surfaceless" + +export YOCTO_ALTERNATE_EXE_PATH = "${STAGING_LIBDIR}/llvm${MESA_LLVM_RELEASE}/llvm-config" +export YOCTO_ALTERNATE_MULTILIB_NAME = "${base_libdir}" +export LLVM_CONFIG = "${STAGING_BINDIR_NATIVE}/llvm-config${MESA_LLVM_RELEASE}" +export WANT_LLVM_RELEASE = "${MESA_LLVM_RELEASE}" + +MESA_LLVM_RELEASE ?= "${LLVMVERSION}" + +EXTRA_OEMESON = " \ + -Dshared-glapi=true \ + -Dgallium-opencl=disabled \ + -Dglx-read-only-text=true \ + -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ +" + +PACKAGECONFIG_class-target ??= "${@bb.utils.filter('DISTRO_FEATURES', 'wayland vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'opengl egl gles gbm dri gallium', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'x11 dri3', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 vulkan', 'dri3', '', d)} \ + glx-tls \ + " +PACKAGECONFIG_class-native ?= "gbm dri egl opengl" +PACKAGECONFIG_class-nativesdk ?= "gbm dri egl opengl" + +PACKAGECONFIG_remove_libc-musl = "glx-tls" + +# "gbm" requires "dri", "opengl" +PACKAGECONFIG[gbm] = "-Dgbm=true,-Dgbm=false" + +X11_DEPS = "xorgproto virtual/libx11 libxext libxxf86vm libxdamage libxfixes xrandr" +# "x11" requires "opengl" +PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}" +PACKAGECONFIG[glx-tls] = "-Dglx-tls=true, -Dglx-tls=false" +PACKAGECONFIG[xvmc] = "-Dgallium-xvmc=true,-Dgallium-xvmc=false,libxvmc" +PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" + +DRIDRIVERS_class-native = "swrast" +DRIDRIVERS_class-nativesdk = "swrast" +DRIDRIVERS_append_x86_class-target = ",r100,r200,nouveau,i965,i915" +DRIDRIVERS_append_x86-64_class-target = ",r100,r200,nouveau,i965,i915" +# "dri" requires "opengl" +PACKAGECONFIG[dri] = "-Ddri=true -Ddri-drivers=${DRIDRIVERS}, -Ddri=false -Ddri-drivers='', xorgproto libdrm" +PACKAGECONFIG[dri3] = "-Ddri3=true, -Ddri3=false, xorgproto libxshmfence" + +# Vulkan drivers need dri3 enabled +# radeon could be enabled as well but requires gallium-llvm with llvm >= 3.9 +VULKAN_DRIVERS = "" +VULKAN_DRIVERS_append_x86_class-target = ",intel" +VULKAN_DRIVERS_append_x86-64_class-target = ",intel" +PACKAGECONFIG[vulkan] = "-Dvulkan-drivers=${VULKAN_DRIVERS}, -Dvulkan-drivers=''," + +PACKAGECONFIG[opengl] = "-Dopengl=true, -Dopengl=false" + +# "gles" requires "opengl" +PACKAGECONFIG[gles] = "-Dgles1=true -Dgles2=true, -Dgles1=false -Dgles2=false" + +# "egl" requires "dri", "opengl" +PACKAGECONFIG[egl] = "-Degl=true, -Degl=false" + +PACKAGECONFIG[etnaviv] = "" +PACKAGECONFIG[kmsro] = "" + +GALLIUMDRIVERS = "swrast" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'etnaviv', ',etnaviv', '', d)}" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'kmsro', ',kmsro', '', d)}" + +# radeonsi requires LLVM +GALLIUMDRIVERS_LLVM33 = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',radeonsi', '', d)}" +GALLIUMDRIVERS_LLVM33_ENABLED = "${@oe.utils.version_less_or_equal('MESA_LLVM_RELEASE', '3.2', False, len('${GALLIUMDRIVERS_LLVM33}') > 0, d)}" +GALLIUMDRIVERS_LLVM = "r300,svga,nouveau${@',${GALLIUMDRIVERS_LLVM33}' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" + +PACKAGECONFIG[r600] = "" + +GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gallium-llvm', ',${GALLIUMDRIVERS_LLVM}', '', d)}" +GALLIUMDRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'r600', ',r600', '', d)}" +GALLIUMDRIVERS_append = ",virgl" + +PACKAGECONFIG[gallium] = "-Dgallium-drivers=${GALLIUMDRIVERS}, -Dgallium-drivers=''" +PACKAGECONFIG[gallium-llvm] = "-Dllvm=true -Dshared-llvm=true, -Dllvm=false, llvm${MESA_LLVM_RELEASE} llvm-native \ + ${@'elfutils' if ${GALLIUMDRIVERS_LLVM33_ENABLED} else ''}" +PACKAGECONFIG[xa] = "-Dgallium-xa=true, -Dgallium-xa=false" + +PACKAGECONFIG[lima] = "" +GALLIUMDRIVERS_append ="${@bb.utils.contains('PACKAGECONFIG', 'lima', ',lima', '', d)}" + +OSMESA = "${@bb.utils.contains('PACKAGECONFIG', 'gallium', 'gallium', 'classic', d)}" +PACKAGECONFIG[osmesa] = "-Dosmesa=${OSMESA},-Dosmesa=none" + +PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind" + +# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) +FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" + +CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS" + +# Remove the mesa dependency on mesa-dev, as mesa is empty +RDEPENDS_${PN}-dev = "" + +# Add dependency so that GLES3 header don't need to be added manually +RDEPENDS_libgles2-mesa-dev += "libgles3-mesa-dev" + +PACKAGES =+ "libegl-mesa libegl-mesa-dev \ + libosmesa libosmesa-dev \ + libgl-mesa libgl-mesa-dev \ + libglapi libglapi-dev \ + libgbm libgbm-dev \ + libgles1-mesa libgles1-mesa-dev \ + libgles2-mesa libgles2-mesa-dev \ + libgles3-mesa libgles3-mesa-dev \ + libxatracker libxatracker-dev \ + mesa-megadriver mesa-vulkan-drivers \ + " + +do_install_append () { + # Drivers never need libtool .la files + rm -f ${D}${libdir}/dri/*.la + rm -f ${D}${libdir}/egl/*.la + rm -f ${D}${libdir}/gallium-pipe/*.la + rm -f ${D}${libdir}/gbm/*.la + + # it was packaged in libdricore9.1.3-1 and preventing upgrades when debian.bbclass was used + chrpath --delete ${D}${libdir}/dri/*_dri.so || true + + # libwayland-egl has been moved to wayland 1.15+ + rm -f ${D}${libdir}/libwayland-egl* + rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc +} + +# For the packages that make up the OpenGL interfaces, inject variables so that +# they don't get Debian-renamed (which would remove the -mesa suffix), and +# RPROVIDEs/RCONFLICTs on the generic libgl name. +python __anonymous() { + pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() + for p in (("egl", "libegl", "libegl1"), + ("dri", "libgl", "libgl1"), + ("gles", "libgles1", "libglesv1-cm1"), + ("gles", "libgles2", "libglesv2-2"), + ("gles", "libgles3",)): + if not p[0] in pkgconfig: + continue + fullp = p[1] + "-mesa" + pkgs = " ".join(p[1:]) + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) + + d.appendVar("RRECOMMENDS_" + fullp, " mesa-megadriver") + + # For -dev, the first element is both the Debian and original name + fullp += "-dev" + pkgs = p[1] + "-dev" + d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1") + d.appendVar("RREPLACES_" + fullp, pkgs) + d.appendVar("RPROVIDES_" + fullp, pkgs) + d.appendVar("RCONFLICTS_" + fullp, pkgs) +} + +python mesa_populate_packages() { + pkgs = ['mesa', 'mesa-dev', 'mesa-dbg'] + for pkg in pkgs: + d.setVar("RPROVIDES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) + d.setVar("RCONFLICTS_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) + d.setVar("RREPLACES_%s" % pkg, pkg.replace("mesa", "mesa-dri", 1)) + + import re + dri_drivers_root = oe.path.join(d.getVar('PKGD'), d.getVar('libdir'), "dri") + if os.path.isdir(dri_drivers_root): + dri_pkgs = os.listdir(dri_drivers_root) + lib_name = d.expand("${MLPREFIX}mesa-megadriver") + for p in dri_pkgs: + m = re.match(r'^(.*)_dri\.so$', p) + if m: + pkg_name = " ${MLPREFIX}mesa-driver-%s" % legitimize_package_name(m.group(1)) + d.appendVar("RPROVIDES_%s" % lib_name, pkg_name) + d.appendVar("RCONFLICTS_%s" % lib_name, pkg_name) + d.appendVar("RREPLACES_%s" % lib_name, pkg_name) + + pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe") + do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='') +} + +PACKAGESPLITFUNCS_prepend = "mesa_populate_packages " + +PACKAGES_DYNAMIC += "^mesa-driver-.*" + +FILES_mesa-megadriver = "${libdir}/dri/* ${datadir}/drirc.d/00-mesa-defaults.conf" +FILES_mesa-vulkan-drivers = "${libdir}/libvulkan_*.so ${datadir}/vulkan" +FILES_libegl-mesa = "${libdir}/libEGL.so.*" +FILES_libgbm = "${libdir}/libgbm.so.*" +FILES_libgles1-mesa = "${libdir}/libGLESv1*.so.*" +FILES_libgles2-mesa = "${libdir}/libGLESv2.so.*" +FILES_libgl-mesa = "${libdir}/libGL.so.*" +FILES_libglapi = "${libdir}/libglapi.so.*" +FILES_libosmesa = "${libdir}/libOSMesa.so.*" +FILES_libxatracker = "${libdir}/libxatracker.so.*" + +FILES_${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan" +FILES_libegl-mesa-dev = "${libdir}/libEGL.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" +FILES_libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" +FILES_libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" +FILES_libglapi-dev = "${libdir}/libglapi.*" +FILES_libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" +FILES_libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" +FILES_libgles3-mesa-dev = "${includedir}/GLES3" +FILES_libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc" +FILES_libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ + ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ + ${libdir}/pkgconfig/xatracker.pc" + +# Fix upgrade path from mesa to mesa-megadriver +RREPLACES_mesa-megadriver = "mesa" +RCONFLICTS_mesa-megadriver = "mesa" +RPROVIDES_mesa-megadriver = "mesa" diff --git a/common/recipes-graphics/mesa/mesa_git.bb b/common/recipes-graphics/mesa/mesa_git.bb new file mode 100644 index 00000000..e0d71538 --- /dev/null +++ b/common/recipes-graphics/mesa/mesa_git.bb @@ -0,0 +1,19 @@ +require ${BPN}.inc + +S = "${WORKDIR}/git" + +SRCREV = "e9cf8c1d3010e9eada5a7921239ad7895f249b5c" +SRC_URI = "git://gitlab.freedesktop.org/mesa/mesa.git;branch=master;protocol=https \ + file://0001-meson.build-check-for-all-linux-host_os-combinations.patch \ + file://0002-meson.build-make-TLS-GLX-optional-again.patch \ + file://0003-Allow-enable-DRI-without-DRI-drivers.patch \ + file://0001-radeonsi-disabling-the-displayable-DCC-on-Raven-Ridg.patch \ + " + +#because we cannot rely on the fact that all apps will use pkgconfig, +#make eglplatform.h independent of MESA_EGL_NO_X11_HEADER +do_install_append() { + if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)}; then + sed -i -e 's/^#if defined(MESA_EGL_NO_X11_HEADERS)$/#if defined(MESA_EGL_NO_X11_HEADERS) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h + fi +} diff --git a/common/recipes-graphics/mesa/mesa_19.0.1.bbappend b/common/recipes-graphics/mesa/mesa_git.bbappend index 07695036..168a471a 100644 --- a/common/recipes-graphics/mesa/mesa_19.0.1.bbappend +++ b/common/recipes-graphics/mesa/mesa_git.bbappend @@ -1,7 +1,7 @@ DEPENDS_append_amd = " libvdpau libomxil" -PACKAGECONFIG[va] = "--enable-va,--disable-va,libva" -PACKAGECONFIG_append_amd = " xvmc gallium r600 gallium-llvm xa" +PACKAGECONFIG[va] = "-Dgallium-va=true,-Dgallium-va=false,libva" +PACKAGECONFIG_append_amd = " xvmc gallium r600 gallium-llvm xa osmesa" PACKAGECONFIG_append_radeon = " va" PACKAGECONFIG_append_amdgpu = " va" @@ -13,21 +13,23 @@ LIBVA_PLATFORMS .= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' libva-x11', LIBVA_PLATFORMS .= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libva-wayland', '', d)}" RDEPENDS_mesa-megadriver += "${@bb.utils.contains('PACKAGECONFIG', 'va', '${LIBVA_PLATFORMS}', '', d)}" -EXTRA_OECONF_append_amd = " \ - --enable-vdpau \ - --enable-osmesa \ - --enable-glx \ - --enable-omx-bellagio \ - --with-omx-bellagio-libdir=${libdir}/bellagio" -EXTRA_OECONF_remove_amd = "--enable-texture-float" +EXTRA_OEMESON_append_amd = " \ + -Dgallium-vdpau=true \ + -Dglx=dri \ + -Dgallium-omx=bellagio \ + -Domx-libs-path=${libdir}/bellagio" # Package all the libXvMC gallium extensions together # they provide the shared lib libXvMCGallium and splitting # them up creates trouble in rpm packaging +# +# libXvMC files are non-versioned so we put *.so directly in the +# main package as opposed to the -dev package. +# PACKAGES =+ "libxvmcgallium-${PN} libxvmcgallium-${PN}-dev" -FILES_libxvmcgallium-${PN} = "${libdir}/libXvMC*${SOLIBS}" -FILES_libxvmcgallium-${PN}-dev = "${libdir}/libXvMC*${SOLIBSDEV} \ - ${libdir}/libXvMC*.la" +FILES_libxvmcgallium-${PN} = "${libdir}/libXvMC*.so" +FILES_libxvmcgallium-${PN}-dev = "${libdir}/libXvMC*.la" + PACKAGES =+ "libvdpau-${PN} libvdpau-${PN}-dev" FILES_libvdpau-${PN} = "${libdir}/vdpau/libvdpau*${SOLIBS}" @@ -45,9 +47,14 @@ FILES_libomx-${PN}-dev = "${libdir}/bellagio/libomx_*.la" FILES_${PN}-driconfigs = "${datadir}/drirc.d/*" FILES_${PN}-dbg += "${libdir}/bellagio/.debug" -# Set DRIDRIVERS with anonymous python so we can effectively +# Set GALLIUMDRIVERS with anonymous python so we can effectively # override the _append_x86-64 assignement from mesa.inc. python () { - d.setVar("DRIDRIVERS", "swrast,radeon") - d.setVar("GALLIUMDRIVERS", "swrast,r300,r600,radeonsi") + d.setVar("GALLIUMDRIVERS", "swrast,r300,r600,radeonsi,svga") +} + +# meta/classes/meson.bbclass hardcodes llvm-config version to "8.0.0" +# lets set it to our MESA_LLVM_RELEASE that we set in amd-common-configurations.inc +do_write_config_append() { + sed -i "/llvm-config/s/[0-9]\+\.[0-9]\+\.[0-9]\+/${MESA_LLVM_RELEASE}/" ${WORKDIR}/meson.cross } diff --git a/common/recipes-graphics/vdpau/libvdpau_git.bbappend b/common/recipes-graphics/vdpau/libvdpau_git.bbappend new file mode 100644 index 00000000..d44c262e --- /dev/null +++ b/common/recipes-graphics/vdpau/libvdpau_git.bbappend @@ -0,0 +1 @@ +SRCREV = "af517f56d64118520aa0c8456318dd9ec3307e94" diff --git a/common/recipes-graphics/xorg-driver/xf86-video-amd_git.bb b/common/recipes-graphics/xorg-driver/xf86-video-amd_git.bb index 4634e89c..07eb04e5 100644 --- a/common/recipes-graphics/xorg-driver/xf86-video-amd_git.bb +++ b/common/recipes-graphics/xorg-driver/xf86-video-amd_git.bb @@ -22,8 +22,8 @@ PV_radeon = "radeon-7.8.0" PACKAGECONFIG_append_radeon = " udev glamor" SRC_URI_amdgpu = "git://anongit.freedesktop.org/xorg/driver/xf86-video-amdgpu" -SRCREV_amdgpu = "9f37a44473ded8c669897379acbc750362c15ec6" -PV_amdgpu = "amdgpu-18.0.1" +SRCREV_amdgpu = "98f172eb2d2353e19edd8167f22215ce596811f8" +PV_amdgpu = "amdgpu-19.0.1" PACKAGECONFIG_append_amdgpu = " udev glamor" PV = "git${SRCPV}" diff --git a/common/recipes-graphics/xorg-lib/libvdpau_1.1.1.bb b/common/recipes-graphics/xorg-lib/libvdpau_1.1.1.bb deleted file mode 100644 index 2797f14c..00000000 --- a/common/recipes-graphics/xorg-lib/libvdpau_1.1.1.bb +++ /dev/null @@ -1,39 +0,0 @@ -DESCRIPTION = "Implements VDPAU library" -HOMEPAGE = "http://people.freedesktop.org" -LICENSE = "MIT" -DEPENDS = "xtrans libx11 libxext libice libsm libxscrnsaver libxt \ - libxmu libxpm libxau libxfixes libxcomposite libxrender \ - libxcursor libxdamage libfontenc libxfont libxft libxi \ - libxinerama libxrandr libxres libxtst libxv libxvmc \ - libxxf86dga libxxf86vm libdmx libpciaccess libxkbfile \ - xorgproto \ - " -LIC_FILES_CHKSUM = "file://COPYING;md5=83af8811a28727a13f04132cc33b7f58" - -SRC_URI = "http://people.freedesktop.org/~aplattner/vdpau/libvdpau-${PV}.tar.gz" -SRC_URI[md5sum] = "ac8b21012035c04fd1ec8a9ae6934264" -SRC_URI[sha256sum] = "5fe093302432ef05086ca2ee429c789b7bf843e166d482d166e56859b08bef55" - -inherit autotools pkgconfig - -S = "${WORKDIR}/libvdpau-${PV}" - -FILES_${PN} += "${libdir}/vdpau/libvdpau_nouveau${SOLIBS} \ - ${libdir}/vdpau/libvdpau_r600${SOLIBS} \ - ${libdir}/vdpau/libvdpau_radeonsi${SOLIBS} \ - ${libdir}/vdpau/libvdpau_trace${SOLIBS} \ - " - -FILES_${PN}-dev += "${libdir}/vdpau/libvdpau_nouveau${SOLIBSDEV} \ - ${libdir}/vdpau/libvdpau_nouveau.la \ - ${libdir}/vdpau/libvdpau_r600${SOLIBSDEV} \ - ${libdir}/vdpau/libvdpau_r600.la \ - ${libdir}/vdpau/libvdpau_radeonsi${SOLIBSDEV} \ - ${libdir}/vdpau/libvdpau_radeonsi.la \ - ${libdir}/vdpau/libvdpau_trace${SOLIBSDEV} \ - ${libdir}/vdpau/libvdpau_trace.la \ - " - -FILES_${PN}-dbg += "${libdir}/vdpau/.debug" - -EXTRA_OECONF += "--enable-dri2" |