diff options
Diffstat (limited to 'meta-amd-bsp/recipes-graphics')
31 files changed, 1277 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-graphics/amdvlk/amdvlk_1.0.bb b/meta-amd-bsp/recipes-graphics/amdvlk/amdvlk_1.0.bb new file mode 100644 index 00000000..42074425 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/amdvlk/amdvlk_1.0.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "AMD Vulkan ICD Library" +LICENSE = "BSD" +RDEPENDS_${PN} = "libdrm vulkan" + +LIC_FILES_CHKSUM = "file://amd_icd64.json;md5=10cb7871f46c13ca7d2c9547969347b6" + +SRC_URI = "file://amdvlk64.so \ + file://amd_icd64.json \ +" + +S = "${WORKDIR}" + +do_install() { + install -d ${D}/${sysconfdir}/vulkan/icd.d + install -m 0644 ${S}/amd_icd64.json ${D}/${sysconfdir}/vulkan/icd.d/ + install -vd ${D}/${libdir} + install -m 0755 ${S}/amdvlk64.so ${D}/${libdir} +} + +INSANE_SKIP_${PN} += "already-stripped ldflags file-rdeps" + +FILES_${PN} += "${libdir}" +FILES_SOLIBSDEV = "" diff --git a/meta-amd-bsp/recipes-graphics/amdvlk/files/amd_icd64.json b/meta-amd-bsp/recipes-graphics/amdvlk/files/amd_icd64.json new file mode 100644 index 00000000..15c0c973 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/amdvlk/files/amd_icd64.json @@ -0,0 +1,8 @@ +{ + "file_format_version": "1.0.0", + "ICD": { + "library_path": "/usr/lib64/amdvlk64.so", + "api_version": "1.1.96" + } +} + diff --git a/meta-amd-bsp/recipes-graphics/amdvlk/files/amdvlk64.so b/meta-amd-bsp/recipes-graphics/amdvlk/files/amdvlk64.so Binary files differnew file mode 100644 index 00000000..b0b96918 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/amdvlk/files/amdvlk64.so diff --git a/meta-amd-bsp/recipes-graphics/drm/libdrm/amdgpu.ids b/meta-amd-bsp/recipes-graphics/drm/libdrm/amdgpu.ids new file mode 100644 index 00000000..d8867ea6 --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/drm/libdrm_git.bb b/meta-amd-bsp/recipes-graphics/drm/libdrm_git.bb new file mode 100644 index 00000000..ef2d578d --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/libva/libva-utils_2.4.0.bbappend b/meta-amd-bsp/recipes-graphics/libva/libva-utils_2.4.0.bbappend new file mode 100644 index 00000000..08c41975 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/libva/libva-utils_2.4.0.bbappend @@ -0,0 +1 @@ +DEPENDS_append_amd = " libva-x11" diff --git a/meta-amd-bsp/recipes-graphics/libva/libva-x11_2.4.0.bb b/meta-amd-bsp/recipes-graphics/libva/libva-x11_2.4.0.bb new file mode 100644 index 00000000..cea8e3b8 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/libva/libva-x11_2.4.0.bb @@ -0,0 +1,43 @@ +SUMMARY = "Package for dependency resolution between Mesa and Libva" +DESCRIPTION = "There exists a cyclic dependency between Mesa and Libva \ + when libva is built with glx enabled and mesa \ + is enabling its vaapi backend. This package strives \ + to cover up the dependency chain, by building the x11 components \ + of libva separately. So, libva-x11 -> mesa -> libva" + +HOMEPAGE = "https://01.org/linuxmedia/vaapi" +BUGTRACKER = "https://github.com/intel/libva/issues" + +SECTION = "x11" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=2e48940f94acb0af582e5ef03537800f" + +inherit autotools pkgconfig + +SRC_URI = "https://github.com/intel/${BPN}/releases/download/libva/libva-${PV}.tar.bz2" + +SRC_URI[md5sum] = "cfc69c2a5f526dd1858e098fb8eebfa6" +SRC_URI[sha256sum] = "99263056c21593a26f2ece812aee6fe60142b49e6cd46cb33c8dddf18fc19391" + +S = "${WORKDIR}/libva-${PV}" + +DEPENDS = "libdrm virtual/mesa virtual/libx11 libxext libxfixes" + +EXTRA_OECONF = "--disable-wayland --disable-drm --enable-x11 --enable-glx" + +FILES_${PN}-dbg += "${libdir}/dri/.debug" + +do_install_append(){ + # Remove all the additional components that can cause a conflict with the + # actual libva package. + rm -rf ${D}${libdir}/libva.* + rm -rf ${D}${libdir}/pkgconfig/libva.* + cd ${D}${includedir}/va + rm -f va_dec_hevc.h va_enc_h264.h va_enc_vp8.h va_fei_hevc.h \ + va_tpi.h va_backend.h va_dec_jpeg.h va_enc_hevc.h \ + va_enc_vp9.h va_version.h va_backend_vpp.h va_dec_vp8.h \ + va_drmcommon.h va_enc_jpeg.h va_fei.h va.h va_vpp.h \ + va_compat.h va_dec_vp9.h va_egl.h va_enc_mpeg2.h \ + va_fei_h264.h va_str.h + cd - +} diff --git a/meta-amd-bsp/recipes-graphics/libva/libva_2.4.0.bbappend b/meta-amd-bsp/recipes-graphics/libva/libva_2.4.0.bbappend new file mode 100644 index 00000000..f8ffae4a --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/libva/libva_2.4.0.bbappend @@ -0,0 +1,8 @@ +# Remove everything related to x11 +# we provide that through libva-x11 +PACKAGECONFIG_remove_amd = "x11" +EXTRA_OECONF_append_amd = " --disable-glx" +PACKAGES_remove_amd = "libva-x11 libva-glx" +# This package (without x11) is no more dependent on mesa +DEPENDS_remove_amd = "virtual/mesa" +RRECOMMENDS_${PN}_append_amd = " libva-utils" diff --git a/meta-amd-bsp/recipes-graphics/mesa-demos/mesa-demos_%.bbappend b/meta-amd-bsp/recipes-graphics/mesa-demos/mesa-demos_%.bbappend new file mode 100644 index 00000000..fb3ac604 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/mesa-demos/mesa-demos_%.bbappend @@ -0,0 +1,2 @@ +DEPENDS_append_amd = " mesa-glut glew" +PACKAGECONFIG_append_amd = " glut glew glu" diff --git a/meta-amd-bsp/recipes-graphics/mesa/files/0001-meson.build-check-for-all-linux-host_os-combinations.patch b/meta-amd-bsp/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/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/mesa/files/0001-radeonsi-disabling-the-displayable-DCC-on-Raven-Ridg.patch b/meta-amd-bsp/recipes-graphics/mesa/files/0001-radeonsi-disabling-the-displayable-DCC-on-Raven-Ridg.patch new file mode 100644 index 00000000..67f140e5 --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch b/meta-amd-bsp/recipes-graphics/mesa/files/0002-meson.build-make-TLS-GLX-optional-again.patch new file mode 100644 index 00000000..9433e450 --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch b/meta-amd-bsp/recipes-graphics/mesa/files/0003-Allow-enable-DRI-without-DRI-drivers.patch new file mode 100644 index 00000000..dfdd778a --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/mesa/libglu/0001-libglu-src-libutil-error.c-add-missing-include-stdde.patch b/meta-amd-bsp/recipes-graphics/mesa/libglu/0001-libglu-src-libutil-error.c-add-missing-include-stdde.patch new file mode 100644 index 00000000..c2e00de2 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/mesa/libglu/0001-libglu-src-libutil-error.c-add-missing-include-stdde.patch @@ -0,0 +1,27 @@ +From e25ad2173b66d28519e1771dba30d0126d7d833e Mon Sep 17 00:00:00 2001 +From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com> +Date: Wed, 21 Aug 2019 17:03:26 +0500 +Subject: [PATCH] libglu/src/libutil/error.c: add missing include <stddef.h> + for NULL def + +Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> +--- + src/libutil/error.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/libutil/error.c b/src/libutil/error.c +index 7212748..c71ffdf 100644 +--- a/src/libutil/error.c ++++ b/src/libutil/error.c +@@ -31,7 +31,7 @@ + #include "gluos.h" + #include "gluint.h" + #include <GL/glu.h> +- ++#include <stddef.h> + + struct token_string + { +-- +2.11.1 + diff --git a/meta-amd-bsp/recipes-graphics/mesa/libglu_9.0.0.bbappend b/meta-amd-bsp/recipes-graphics/mesa/libglu_9.0.0.bbappend new file mode 100644 index 00000000..f8076b21 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/mesa/libglu_9.0.0.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-libglu-src-libutil-error.c-add-missing-include-stdde.patch" diff --git a/meta-amd-bsp/recipes-graphics/mesa/mesa.inc b/meta-amd-bsp/recipes-graphics/mesa/mesa.inc new file mode 100644 index 00000000..50832b4a --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/mesa/mesa_git.bb b/meta-amd-bsp/recipes-graphics/mesa/mesa_git.bb new file mode 100644 index 00000000..e0d71538 --- /dev/null +++ b/meta-amd-bsp/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/meta-amd-bsp/recipes-graphics/mesa/mesa_git.bbappend b/meta-amd-bsp/recipes-graphics/mesa/mesa_git.bbappend new file mode 100644 index 00000000..168a471a --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/mesa/mesa_git.bbappend @@ -0,0 +1,60 @@ +DEPENDS_append_amd = " libvdpau libomxil" + +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" + +PACKAGECONFIG_remove_amd = "vulkan" +PACKAGECONFIG_remove_amdfalconx86 = "xvmc" + +LIBVA_PLATFORMS = "libva" +LIBVA_PLATFORMS .= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' libva-x11', '', d)}" +LIBVA_PLATFORMS .= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', ' libva-wayland', '', d)}" +RDEPENDS_mesa-megadriver += "${@bb.utils.contains('PACKAGECONFIG', 'va', '${LIBVA_PLATFORMS}', '', d)}" + +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*.so" +FILES_libxvmcgallium-${PN}-dev = "${libdir}/libXvMC*.la" + + +PACKAGES =+ "libvdpau-${PN} libvdpau-${PN}-dev" +FILES_libvdpau-${PN} = "${libdir}/vdpau/libvdpau*${SOLIBS}" +FILES_libvdpau-${PN}-dev = "${libdir}/vdpau/libvdpau*${SOLIBSDEV} \ + ${libdir}/vdpau/libvdpau*.la" +FILES_${PN}-dbg += "${libdir}/vdpau/.debug" + +# +# libomx files are non-versioned so we put *.so directly in the +# main package as opposed to the -dev package. +# +PACKAGES =+ "libomx-${PN} libomx-${PN}-dev ${PN}-driconfigs" +FILES_libomx-${PN} = "${libdir}/bellagio/libomx_*.so" +FILES_libomx-${PN}-dev = "${libdir}/bellagio/libomx_*.la" +FILES_${PN}-driconfigs = "${datadir}/drirc.d/*" +FILES_${PN}-dbg += "${libdir}/bellagio/.debug" + +# Set GALLIUMDRIVERS with anonymous python so we can effectively +# override the _append_x86-64 assignement from mesa.inc. +python () { + 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/meta-amd-bsp/recipes-graphics/vdpau/libvdpau_git.bbappend b/meta-amd-bsp/recipes-graphics/vdpau/libvdpau_git.bbappend new file mode 100644 index 00000000..087d1573 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/vdpau/libvdpau_git.bbappend @@ -0,0 +1,3 @@ +SRCREV = "af517f56d64118520aa0c8456318dd9ec3307e94" + +EXTRA_OECONF += "--enable-dri2" diff --git a/meta-amd-bsp/recipes-graphics/vdpauinfo/vdpauinfo_1.0.bb b/meta-amd-bsp/recipes-graphics/vdpauinfo/vdpauinfo_1.0.bb new file mode 100644 index 00000000..7495859d --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/vdpauinfo/vdpauinfo_1.0.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "VDPAU info tool" +HOMEPAGE = "http://people.freedesktop.org" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5b6e110c362fe46168199f3490e52c3c" + +SRC_URI = "http://people.freedesktop.org/~aplattner/vdpau/vdpauinfo-${PV}.tar.gz" +SRC_URI[md5sum] = "4eba3e7bf5062b9c245276860493804f" +SRC_URI[sha256sum] = "4054960b7ae618c351ff1ce3e7831b5cbda964ae1fbf9969b7146404d3044bc4" + +inherit autotools pkgconfig + +DEPENDS += "virtual/libx11 libvdpau mesa" + +RDEPENDS_${PN} += "libvdpau-mesa" diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-headers_1.1.92.0.bb b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-headers_1.1.92.0.bb new file mode 100644 index 00000000..5b56e972 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-headers_1.1.92.0.bb @@ -0,0 +1,19 @@ +SUMMARY = "Vulkan API headers" +DESCRIPTION = "Vulkan spec API headers" +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Headers" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Headers.git;nobranch=1" +SRCREV = "114c3546e195819bd53a34b39f5194b2989a5b12" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +inherit cmake distro_features_check + +PACKAGES += "vulkan-registry" +FILES_vulkan-registry = "${datadir}/vulkan/registry" diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan-tools_1.1.92.0.bb b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-tools_1.1.92.0.bb new file mode 100644 index 00000000..484f11c0 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/vulkan/vulkan-tools_1.1.92.0.bb @@ -0,0 +1,32 @@ +SUMMARY = "Vulkan utilities" +DESCRIPTION = "Vulkan tools and utilities that can assist \ +development by enabling developers to verify their applications \ +correct use of the Vulkan API." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Tools" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Tools.git;nobranch=1" +SRCREV = "9bbdd552f0fd62741aa1f1e02ab3eafc45cf3c1e" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +inherit cmake python3native distro_features_check +ANY_OF_DISTRO_FEATURES = "x11 wayland" + +DEPENDS += "vulkan vulkan-headers" + +EXTRA_OECMAKE = "-DBUILD_CUBE=OFF -DBUILD_ICD=OFF" + +# must choose x11 or wayland or both +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" + +# Can't be built with ccache +CCACHE_DISABLE = "1" diff --git a/meta-amd-bsp/recipes-graphics/vulkan/vulkan_1.1.92.1.bb b/meta-amd-bsp/recipes-graphics/vulkan/vulkan_1.1.92.1.bb new file mode 100644 index 00000000..171948a4 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/vulkan/vulkan_1.1.92.1.bb @@ -0,0 +1,38 @@ +SUMMARY = "3D graphics and compute API common loader" +DESCRIPTION = "Vulkan is a new generation graphics and compute API \ +that provides efficient access to modern GPUs. These packages \ +provide only the common vendor-agnostic library loader, headers and \ +the vulkaninfo utility." +HOMEPAGE = "https://www.khronos.org/vulkan/" +BUGTRACKER = "https://github.com/KhronosGroup/Vulkan-Loader" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57 \ + file://loader/loader.c;endline=25;md5=151b392f46568aaedb4ad22b246237ec" + +SRC_URI = "git://github.com/KhronosGroup/Vulkan-Loader.git;nobranch=1" +SRCREV = "4cd7e44fc1ca6c4d8361720b43a3588ddf9fc4b6" + +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES = "vulkan" + +inherit cmake python3native lib_package distro_features_check +ANY_OF_DISTRO_FEATURES = "x11 wayland" + +DEPENDS += "vulkan-headers" + +EXTRA_OECMAKE = "-DVULKAN_HEADERS_INSTALL_DIR=${STAGING_EXECPREFIXDIR}" + +# must choose x11 or wayland or both +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '' ,d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '' ,d)}" +PACKAGECONFIG[x11] = "-DBUILD_WSI_XLIB_SUPPORT=ON -DBUILD_WSI_XCB_SUPPORT=ON, -DBUILD_WSI_XLIB_SUPPORT=OFF -DBUILD_WSI_XCB_SUPPORT=OFF, libxcb libx11 libxrandr" +PACKAGECONFIG[wayland] = "-DBUILD_WSI_WAYLAND_SUPPORT=ON, -DBUILD_WSI_WAYLAND_SUPPORT=OFF, wayland" + +RRECOMMENDS_${PN} = "mesa-vulkan-drivers" +INSANE_SKIP_${PN}-dev += "dev-elf" + +# Can't be built with ccache +CCACHE_DISABLE = "1" diff --git a/meta-amd-bsp/recipes-graphics/x11-common/xserver-nodm-init_%.bbappend b/meta-amd-bsp/recipes-graphics/x11-common/xserver-nodm-init_%.bbappend new file mode 100644 index 00000000..3bb9fae6 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/x11-common/xserver-nodm-init_%.bbappend @@ -0,0 +1,6 @@ +# Force X to be run on vt7 +do_install_append_amdgpu() { + if [ -f ${D}${sysconfdir}/default/xserver-nodm ]; then + echo "INPUT_EXTRA_ARGS=vt7" >> ${D}${sysconfdir}/default/xserver-nodm + fi +} diff --git a/meta-amd-bsp/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend b/meta-amd-bsp/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend new file mode 100644 index 00000000..8a8069ce --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xinput-calibrator/xinput-calibrator_git.bbappend @@ -0,0 +1,4 @@ +do_install_append_amd() { + # Do not install the boot time auto launcher + rm -rf ${D}${sysconfdir}/xdg/autostart +} diff --git a/meta-amd-bsp/recipes-graphics/xorg-app/xrandr/0001-Fixed-CRTC-disable-in-xrandr-causing-scale-issue.patch b/meta-amd-bsp/recipes-graphics/xorg-app/xrandr/0001-Fixed-CRTC-disable-in-xrandr-causing-scale-issue.patch new file mode 100644 index 00000000..3ba30c34 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xorg-app/xrandr/0001-Fixed-CRTC-disable-in-xrandr-causing-scale-issue.patch @@ -0,0 +1,87 @@ +From 3e946f562ba38993b57ea46bc7089c4f6bc7951b Mon Sep 17 00:00:00 2001 +From: Arsalan-Awan <Arsalan_Awan@mentor.com> +Date: Mon, 5 Mar 2018 18:37:37 +0500 +Subject: [PATCH] Fixed CRTC disable in xrandr causing scale issue + +Whenever scale value is increased when it is between 0.0 - 1.0 +and is kept within 0.0 - 1.0 range, the display does not expand +to fullscreen. It rather becomes smaller and leaves blank spaces on +the right and bottom sides. And the following error message shows up: + +X Error of failed request: BadMatch (invalid parameter attributes) + Major opcode of failed request: 139 (RANDR) + Minor opcode of failed request: 7 (RRSetScreenSize) + Serial number of failed request: 36 + Current serial number in output stream: 38 + +Before xrandr attempts to apply the transformation matrix requested +by "scale", "transform" or "scale-from" options, it disables the +CRTCs for which the transformed image's dimensions are larger than the +target display's resolution/mode. But, when the image is smaller, it +does not disable the CRTCs, and proceeds with applying the +transformation (involves framebuffer dimension changes). This works well +for all the scale values and transitions except for the above mentioned +transitions. + +This patch fixes such issues! + +Signed-off-by: Arsalan-Awan <Arsalan_Awan@mentor.com> +--- + xrandr.c | 31 +++++-------------------------- + 1 file changed, 5 insertions(+), 26 deletions(-) + +diff --git a/xrandr.c b/xrandr.c +index dcfdde0..d2872ef 100644 +--- a/xrandr.c ++++ b/xrandr.c +@@ -1723,8 +1723,7 @@ apply (void) + XGrabServer (dpy); + + /* +- * Turn off any crtcs which are to be disabled or which are +- * larger than the target size ++ * Turn off any crtcs which are to be disabled + */ + for (c = 0; c < res->ncrtc; c++) + { +@@ -1736,33 +1735,13 @@ apply (void) + continue; + + /* +- * If this crtc is to be left enabled, make +- * sure the old size fits then new screen ++ * Once the scale value is changed in xrandr, omitting the ++ * following if statement causes the display to fail to ++ * turn back ON after it goes to sleep due to inactivity. + */ + if (crtc->mode_info) +- { +- XRRModeInfo *old_mode = find_mode_by_xid (crtc_info->mode); +- int x, y, w, h; +- box_t bounds; +- +- if (!old_mode) +- panic (RRSetConfigFailed, crtc); +- +- /* old position and size information */ +- mode_geometry (old_mode, crtc_info->rotation, +- &crtc->current_transform.transform, +- &bounds); +- +- x = crtc_info->x + bounds.x1; +- y = crtc_info->y + bounds.y1; +- w = bounds.x2 - bounds.x1; +- h = bounds.y2 - bounds.y1; +- +- /* if it fits, skip it */ +- if (x + w <= fb_width && y + h <= fb_height) +- continue; + crtc->changing = True; +- } ++ + s = crtc_disable (crtc); + if (s != RRSetConfigSuccess) + panic (s, crtc); +-- +2.7.4 + diff --git a/meta-amd-bsp/recipes-graphics/xorg-app/xrandr_1.5.0.bbappend b/meta-amd-bsp/recipes-graphics/xorg-app/xrandr_1.5.0.bbappend new file mode 100644 index 00000000..a20e79d8 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xorg-app/xrandr_1.5.0.bbappend @@ -0,0 +1,3 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += " file://0001-Fixed-CRTC-disable-in-xrandr-causing-scale-issue.patch" diff --git a/meta-amd-bsp/recipes-graphics/xorg-driver/xf86-video-amd_git.bb b/meta-amd-bsp/recipes-graphics/xorg-driver/xf86-video-amd_git.bb new file mode 100644 index 00000000..07eb04e5 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xorg-driver/xf86-video-amd_git.bb @@ -0,0 +1,41 @@ +SUMMARY = "X.Org X server -- AMD graphics chipsets driver" + +DESCRIPTION = "xf86-video-amd is an Xorg driver for AMD integrated \ +graphics chipsets. The driver supports depths 8, 15, 16 and 24. On \ +some chipsets, the driver supports hardware accelerated 3D via the \ +Direct Rendering Infrastructure (DRI)." + +require recipes-graphics/xorg-driver/xorg-driver-video.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=aabff1606551f9461ccf567739af63dc" + +DEPENDS += "virtual/libx11 drm xorgproto \ + virtual/libgl libpciaccess \ +" + +PACKAGECONFIG[udev] = "--enable-udev,--disable-udev,udev" +PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor" + +SRC_URI_radeon = "git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati" +SRCREV_radeon = "5cbe1ee8e499e1b6b2646e341946292721d07e69" +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 = "98f172eb2d2353e19edd8167f22215ce596811f8" +PV_amdgpu = "amdgpu-19.0.1" +PACKAGECONFIG_append_amdgpu = " udev glamor" + +PV = "git${SRCPV}" + +S = "${WORKDIR}/git" + +RDEPENDS_${PN} += "mesa-driver-radeon \ + mesa-driver-radeonsi \ + mesa-driver-swrast \ +" + +COMPATIBLE_HOST = '(i.86|x86_64).*-linux' + +PACKAGES += "${PN}-conf" +FILES_${PN}-conf = "${datadir}/X11" diff --git a/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf new file mode 100644 index 00000000..edb7b36a --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config/amd/xorg.conf @@ -0,0 +1,107 @@ +Section "Monitor" + Identifier "Monitor0" + VendorName "Monitor Vendor" + ModelName "Monitor Model" +EndSection + +Section "Device" + ### Available Driver options are:- + ### Values: <i>: integer, <f>: float, <bool>: "True"/"False", + ### <string>: "String", <freq>: "<f> Hz/kHz/MHz", + ### <percent>: "<f>%" + ### [arg]: arg optional + #Option "NoAccel" # [<bool>] + #Option "SWcursor" # [<bool>] + #Option "Dac6Bit" # [<bool>] + #Option "Dac8Bit" # [<bool>] + #Option "BusType" # [<str>] + #Option "CPPIOMode" # [<bool>] + #Option "CPusecTimeout" # <i> + #Option "AGPMode" # <i> + #Option "AGPFastWrite" # [<bool>] + #Option "AGPSize" # <i> + #Option "GARTSize" # <i> + #Option "RingSize" # <i> + #Option "BufferSize" # <i> + #Option "EnableDepthMoves" # [<bool>] + #Option "EnablePageFlip" # [<bool>] + #Option "NoBackBuffer" # [<bool>] + #Option "DMAForXv" # [<bool>] + #Option "FBTexPercent" # <i> + #Option "DepthBits" # <i> + #Option "PCIAPERSize" # <i> + #Option "AccelDFS" # [<bool>] + #Option "IgnoreEDID" # [<bool>] + #Option "CustomEDID" # [<str>] + #Option "DisplayPriority" # [<str>] + #Option "PanelSize" # [<str>] + #Option "ForceMinDotClock" # <freq> + #Option "ColorTiling" # [<bool>] + #Option "VideoKey" # <i> + #Option "RageTheatreCrystal" # <i> + #Option "RageTheatreTunerPort" # <i> + #Option "RageTheatreCompositePort" # <i> + #Option "RageTheatreSVideoPort" # <i> + #Option "TunerType" # <i> + #Option "RageTheatreMicrocPath" # <str> + #Option "RageTheatreMicrocType" # <str> + #Option "ScalerWidth" # <i> + #Option "RenderAccel" # [<bool>] + #Option "SubPixelOrder" # [<str>] + #Option "ClockGating" # [<bool>] + #Option "VGAAccess" # [<bool>] + #Option "ReverseDDC" # [<bool>] + #Option "LVDSProbePLL" # [<bool>] + Option "AccelMethod" "glamor" + #Option "DRI" # [<bool>] + #Option "ConnectorTable" # <str> + #Option "DefaultConnectorTable" # [<bool>] + #Option "DefaultTMDSPLL" # [<bool>] + #Option "TVDACLoadDetect" # [<bool>] + #Option "ForceTVOut" # [<bool>] + #Option "TVStandard" # <str> + #Option "IgnoreLidStatus" # [<bool>] + #Option "DefaultTVDACAdj" # [<bool>] + #Option "Int10" # [<bool>] + #Option "EXAVSync" # [<bool>] + #Option "ATOMTVOut" # [<bool>] + #Option "R4xxATOM" # [<bool>] + #Option "ForceLowPowerMode" # [<bool>] + #Option "DynamicPM" # [<bool>] + #Option "NewPLL" # [<bool>] + #Option "ZaphodHeads" # <str> + Identifier "Card0" + Driver "radeon" + BusID "PCI:0:1:0" +EndSection + +Section "Screen" + Identifier "Screen0" + Device "Card0" + Monitor "Monitor0" + SubSection "Display" + Viewport 0 0 + Depth 1 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 4 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 8 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 15 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 16 + EndSubSection + SubSection "Display" + Viewport 0 0 + Depth 24 + EndSubSection +EndSection + diff --git a/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend new file mode 100644 index 00000000..0c0d1067 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend @@ -0,0 +1,51 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +# Additional options that you want +# to set in final xorg configuration. +# Convention is option,value. If there's +# no value requred simply skip just +# like DRI3. +AMDGPU_OPTS = "DRI3, TearFree,on" +RADEON_OPTS = "" + +do_install_append_amdgpu () { + if [ "${RT_KERNEL_AMD}" = "yes" ]; then + sed -i -e 's/^\tDriver "radeon"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf + sed -i -e 's/^\tDriver "amdgpu"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf + else + sed -i -e 's/^\tDriver "radeon"/\tDriver "amdgpu"/' ${D}/${sysconfdir}/X11/xorg.conf + sed -i -e 's/^\tDriver "fbdev"/\tDriver "amdgpu"/' ${D}/${sysconfdir}/X11/xorg.conf + set_xorg_opts "${AMDGPU_OPTS}" + fi +} + +do_install_append_radeon () { + if [ "${RT_KERNEL_AMD}" = "yes" ]; then + sed -i -e 's/^\tDriver "radeon"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf + sed -i -e 's/^\tDriver "amdgpu"/\tDriver "fbdev"/' ${D}/${sysconfdir}/X11/xorg.conf + else + sed -i -e 's/^\tDriver "amdgpu"/\tDriver "radeon"/' ${D}/${sysconfdir}/X11/xorg.conf + sed -i -e 's/^\tDriver "fbdev"/\tDriver "radeon"/' ${D}/${sysconfdir}/X11/xorg.conf + set_xorg_opts "${RADEON_OPTS}" + fi +} + +set_xorg_opts() { + for opt_val in ${1}; do + opt=$(echo ${opt_val} | cut -d',' -f1) + val=$(echo ${opt_val} | cut -d',' -f2) + if [ "${val}" = "" ]; then + sed -i -e "/^\tIdentifier \"Card0\"/i \\\tOption \"${opt}\"" ${D}/${sysconfdir}/X11/xorg.conf + else + sed -i -e "/^\tIdentifier \"Card0\"/i \\\tOption \"${opt}\" \"${val}\"" ${D}/${sysconfdir}/X11/xorg.conf + fi + done +} + +do_install_append_r1000 () { + sed -i -e 's/^\tBusID "PCI:0:1:0"/\t#BusID "PCI:1:0:0"/' ${D}/${sysconfdir}/X11/xorg.conf +} + +do_install_append_v1000 () { + sed -i -e 's/^\tBusID "PCI:0:1:0"/\t#BusID "PCI:1:0:0"/' ${D}/${sysconfdir}/X11/xorg.conf +} diff --git a/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend new file mode 100644 index 00000000..9f8848f4 --- /dev/null +++ b/meta-amd-bsp/recipes-graphics/xorg-xserver/xserver-xorg_%.bbappend @@ -0,0 +1,3 @@ +PACKAGECONFIG[glamor] = "--enable-glamor,--disable-glamor,libepoxy" +PACKAGECONFIG_append_amdgpu = " glamor xshmfence dri3" +PACKAGECONFIG_append_radeon = " glamor xshmfence" |