From 1d88a846b1f9aa2d154fa8f466d1cdb838e1fec4 Mon Sep 17 00:00:00 2001 From: travankor Date: Sun, 22 Dec 2019 18:54:02 -0700 Subject: [PATCH] mesa: Enable open-source ARM GPU drivers. This commit enables the following GPU drivers for these ARM SoCs: Etnaviv: Freescale/NXP i.MX (Librem 5) Freedreno: Qualcomm Snapdragon (Windows 10 ARM Laptops) Lima: Samsung Exynos, Allwinner (Pinephone) Panfrost: Rockchip (Pinebook Pro, ARM Chromebooks) V3D: Broadcom (Raspberry Pi 4) --- srcpkgs/mesa-etnaviv-dri | 1 + srcpkgs/mesa-freedreno-dri | 1 + srcpkgs/mesa-kmsro-dri | 1 + srcpkgs/mesa-lima-dri | 1 + srcpkgs/mesa-panfrost-dri | 1 + srcpkgs/mesa-v3d-dri | 1 + srcpkgs/mesa/template | 75 +++++++++++++++++++++++++++++++++++--- 7 files changed, 76 insertions(+), 5 deletions(-) create mode 120000 srcpkgs/mesa-etnaviv-dri create mode 120000 srcpkgs/mesa-freedreno-dri create mode 120000 srcpkgs/mesa-kmsro-dri create mode 120000 srcpkgs/mesa-lima-dri create mode 120000 srcpkgs/mesa-panfrost-dri create mode 120000 srcpkgs/mesa-v3d-dri diff --git a/srcpkgs/mesa-etnaviv-dri b/srcpkgs/mesa-etnaviv-dri new file mode 120000 index 00000000000..1ad1bbec7ab --- /dev/null +++ b/srcpkgs/mesa-etnaviv-dri @@ -0,0 +1 @@ +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-freedreno-dri b/srcpkgs/mesa-freedreno-dri new file mode 120000 index 00000000000..1ad1bbec7ab --- /dev/null +++ b/srcpkgs/mesa-freedreno-dri @@ -0,0 +1 @@ +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-kmsro-dri b/srcpkgs/mesa-kmsro-dri new file mode 120000 index 00000000000..1ad1bbec7ab --- /dev/null +++ b/srcpkgs/mesa-kmsro-dri @@ -0,0 +1 @@ +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-lima-dri b/srcpkgs/mesa-lima-dri new file mode 120000 index 00000000000..1ad1bbec7ab --- /dev/null +++ b/srcpkgs/mesa-lima-dri @@ -0,0 +1 @@ +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-panfrost-dri b/srcpkgs/mesa-panfrost-dri new file mode 120000 index 00000000000..1ad1bbec7ab --- /dev/null +++ b/srcpkgs/mesa-panfrost-dri @@ -0,0 +1 @@ +mesa \ No newline at end of file diff --git a/srcpkgs/mesa-v3d-dri b/srcpkgs/mesa-v3d-dri new file mode 120000 index 00000000000..1ad1bbec7ab --- /dev/null +++ b/srcpkgs/mesa-v3d-dri @@ -0,0 +1 @@ +mesa \ No newline at end of file diff --git a/srcpkgs/mesa/template b/srcpkgs/mesa/template index c0f66143f3f..92fb254e402 100644 --- a/srcpkgs/mesa/template +++ b/srcpkgs/mesa/template @@ -67,17 +67,18 @@ ppc*) subpackages+=" mesa-opencl mesa-vulkan-overlay-layer" ;; aarch64*) - configure_args+=" -Dgallium-drivers=nouveau,tegra,swrast,vc4" + # Enable all ARM drivers + configure_args+=" -Dgallium-drivers=etnaviv,freedreno,kmsro,lima,panfrost,nouveau,swrast,tegra,v3d,vc4" configure_args+=" -Dvulkan-drivers= -Ddri-drivers=" configure_args+=" -Dgallium-xa=false -Ddri3=true" - subpackages+=" mesa-tegra-dri mesa-nouveau-dri mesa-vc4-dri" + subpackages+=" mesa-kmsro-dri mesa-tegra-dri mesa-nouveau-dri mesa-v3d-dri mesa-vc4-dri" + subpackages+=" mesa-etnaviv-dri mesa-freedreno-dri mesa-lima-dri mesa-panfrost-dri" ;; armv7l*) - # Enable Videocore IV and swrast for RaspberryPi - configure_args+=" -Dgallium-drivers=swrast,vc4" + configure_args+=" -Dgallium-drivers=etnaviv,freedreno,kmsro,lima,panfrost,swrast,vc4" configure_args+=" -Dvulkan-drivers= -Ddri-drivers= -Dgallium-xvmc=false" configure_args+=" -Dgallium-xa=false -Dgallium-vdpau=false -Dgallium-va=false" - subpackages+=" mesa-vc4-dri" + subpackages+=" mesa-etnaviv-dri mesa-freedreno-dri mesa-kmsro-dri mesa-lima-dri mesa-panfrost-dri mesa-vc4-dri" ;; *) # Enable swrast driver. @@ -196,6 +197,23 @@ mesa-ati-dri_package() { } } +mesa-etnaviv-dri_package() { + short_desc="Mesa DRI drivers for Vivante GPUs" + depends="mesa-${verison}_${revision}" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/etnaviv*" + } +} + +mesa-freedreno-dri_package() { + short_desc="Mesa DRI drivers for Adreno GPUs" + depends="mesa-${verison}_${revision}" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/msm*" + vmove "usr/lib/xorg/modules/drivers/kgsl*" + } +} + mesa-intel-dri_package() { short_desc="Mesa DRI drivers for Intel GPUs" depends="mesa-${version}_${revision}" @@ -207,6 +225,37 @@ mesa-intel-dri_package() { } } +mesa-kmsro-dri_package() { + short_desc="KMS Render-only Mesa DRI drivers" + depends="mesa-${version}_${revision}" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/armada*" + vmove "usr/lib/xorg/modules/drivers/exynos*" + vmove "usr/lib/xorg/modules/drivers/hx8357d*" + vmove "usr/lib/xorg/modules/drivers/ili9225*" + vmove "usr/lib/xorg/modules/drivers/ili9341*" + vmove "usr/lib/xorg/modules/drivers/imx*" + vmove "usr/lib/xorg/modules/drivers/meson*" + vmove "usr/lib/xorg/modules/drivers/mi0283qt*" + vmove "usr/lib/xorg/modules/drivers/mxsfb*" + vmove "usr/lib/xorg/modules/drivers/pl111*" + vmove "usr/lib/xorg/modules/drivers/repaper*" + vmove "usr/lib/xorg/modules/drivers/rockchip*" + vmove "usr/lib/xorg/modules/drivers/st7586*" + vmove "usr/lib/xorg/modules/drivers/st7735r*" + vmove "usr/lib/xorg/modules/drivers/stm*" + vmove "usr/lib/xorg/modules/drivers/sun4i*" + } +} + +mesa-lima-dri_package() { + short_desc="Mesa DRI drivers for ARM Mali GPUs (Utgard)" + depends="mesa-${verison}_${revision}" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/lima*" + } +} + mesa-nouveau-dri_package() { short_desc="Mesa DRI drivers for NVIDIA GPUs (nouveau dri)" depends="mesa-${version}_${revision}" @@ -222,6 +271,14 @@ mesa-nouveau-dri_package() { } } +mesa-panfrost-dri_package() { + short_desc="Mesa DRI drivers for ARM Mali GPUs (Midgard/Bifrost)" + depends="mesa-${verison}_${revision}" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/panfrost*" + } +} + mesa-vmwgfx-dri_package() { short_desc="Mesa DRI drivers for VMware" depends="mesa-${version}_${revision}" @@ -231,6 +288,14 @@ mesa-vmwgfx-dri_package() { } } +mesa-v3d-dri_package() { + short_desc="Mesa DRI drivers for Videocore VI GPU" + depends="mesa-${verison}_${revision}" + pkg_install() { + vmove "usr/lib/xorg/modules/drivers/v3d*" + } +} + mesa-vc4-dri_package() { short_desc="Mesa DRI drivers for Videocore IV GPU" depends="mesa-${version}_${revision}"