diff --git a/packages/graphics/mesa/package.mk b/packages/graphics/mesa/package.mk index a50889f748..f10ad3fd5a 100644 --- a/packages/graphics/mesa/package.mk +++ b/packages/graphics/mesa/package.mk @@ -13,8 +13,8 @@ PKG_LONGDESC="Mesa is a 3-D graphics library with an API." PKG_TOOLCHAIN="meson" if listcontains "${GRAPHIC_DRIVERS}" "(lima|panfrost)"; then - PKG_VERSION="ef919d8dcb9272ad7b23f5dbd8b7fb2f83393b42" # master-19.3 - PKG_SHA256="9b881e5c7617941ae89876cbb2c31982f19c7289353a5fdca4101f8b01ade69d" + PKG_VERSION="71dd52e0560e3d32dd040301ae99e0ae2da4384e" # master-20.0 + PKG_SHA256="200e8ce31b71e62e42259a9f0bf5e6ce197bc059d6c9d3d389a77112405842b6" PKG_URL="https://gitlab.freedesktop.org/mesa/mesa/-/archive/$PKG_VERSION/mesa-$PKG_VERSION.tar.gz" fi diff --git a/projects/Allwinner/devices/A64/options b/projects/Allwinner/devices/A64/options index 2d9c32c14e..916de3b3a9 100644 --- a/projects/Allwinner/devices/A64/options +++ b/projects/Allwinner/devices/A64/options @@ -31,5 +31,11 @@ # ATF platform ATF_PLATFORM="sun50i_a64" + # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) + OPENGLES="libmali" + # Mali GPU family MALI_FAMILY="400" + + # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) + KODIPLAYER_DRIVER="$OPENGLES" diff --git a/projects/Allwinner/devices/H3/options b/projects/Allwinner/devices/H3/options index 9656c4cbdb..8cecb974f4 100644 --- a/projects/Allwinner/devices/H3/options +++ b/projects/Allwinner/devices/H3/options @@ -37,5 +37,11 @@ # Kernel target KERNEL_TARGET="zImage" + # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) + OPENGLES="libmali" + # Mali GPU family MALI_FAMILY="400" + + # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) + KODIPLAYER_DRIVER="$OPENGLES" diff --git a/projects/Allwinner/devices/H6/options b/projects/Allwinner/devices/H6/options index 82487625c2..c068b54d9a 100644 --- a/projects/Allwinner/devices/H6/options +++ b/projects/Allwinner/devices/H6/options @@ -31,5 +31,8 @@ # ATF platform ATF_PLATFORM="sun50i_h6" - # Mali GPU family - MALI_FAMILY="t720" + # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) + OPENGLES="mesa" + + # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) + KODIPLAYER_DRIVER="$OPENGLES" diff --git a/projects/Allwinner/devices/H6/patches/linux/01-add-mali-node.patch b/projects/Allwinner/devices/H6/patches/linux/01-add-mali-node.patch deleted file mode 100644 index c71fa76284..0000000000 --- a/projects/Allwinner/devices/H6/patches/linux/01-add-mali-node.patch +++ /dev/null @@ -1,52 +0,0 @@ -diff -Nur a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi ---- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi 2018-03-28 20:27:22.000000000 +0200 -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi 2018-04-16 19:28:43.842331161 +0200 -@@ -162,6 +228,19 @@ - }; - }; - -+ gpu: gpu@1800000 { -+ compatible = "arm,mali-t720", "arm,mali-midgard"; -+ reg = <0x01800000 0x4000>; -+ interrupts = , -+ , -+ ; -+ interrupt-names = "job", "mmu", "gpu"; -+ -+ clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; -+ clock-names = "clk_mali", "clk_bus_mali"; -+ resets = <&ccu RST_BUS_GPU>; -+ }; -+ - syscon: syscon@3000000 { - compatible = "allwinner,sun50i-h6-system-controller", - "syscon"; -diff -Nur a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts ---- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts 2018-03-28 20:27:22.000000000 +0200 -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts 2018-04-14 15:34:15.545094216 +0200 -@@ -89,6 +89,10 @@ - status = "okay"; - }; - -+&gpu { -+ mali-supply = <®_dcdcc>; -+}; -+ - &hdmi { - status = "okay"; - }; - -diff -Nur a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts ---- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts 2018-03-28 20:27:22.000000000 +0200 -+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts 2018-04-14 15:34:15.545094216 +0200 -@@ -89,6 +89,10 @@ - status = "okay"; - }; - -+&gpu { -+ mali-supply = <®_dcdcc>; -+}; -+ - &hdmi { - status = "okay"; - }; diff --git a/projects/Allwinner/devices/H6/patches/linux/07-opi3.patch b/projects/Allwinner/devices/H6/patches/linux/07-opi3.patch index 840c75230a..f324521525 100644 --- a/projects/Allwinner/devices/H6/patches/linux/07-opi3.patch +++ b/projects/Allwinner/devices/H6/patches/linux/07-opi3.patch @@ -12,17 +12,6 @@ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64 index 17d496990108..93bdd33694fb 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts -@@ -58,6 +58,10 @@ - status = "okay"; - }; - -+&gpu { -+ mali-supply = <®_dcdcc>; -+}; -+ - &mmc0 { - vmmc-supply = <®_cldo1>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ @@ -65,6 +69,14 @@ status = "okay"; }; diff --git a/projects/Allwinner/devices/H6/patches/linux/08-arm64-dts-allwinner-OrangePiOnePlus-updates.patch b/projects/Allwinner/devices/H6/patches/linux/08-arm64-dts-allwinner-OrangePiOnePlus-updates.patch index 43c32bc988..450e02d174 100644 --- a/projects/Allwinner/devices/H6/patches/linux/08-arm64-dts-allwinner-OrangePiOnePlus-updates.patch +++ b/projects/Allwinner/devices/H6/patches/linux/08-arm64-dts-allwinner-OrangePiOnePlus-updates.patch @@ -2,7 +2,7 @@ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts b/arc index 12e17567ab56..fd9dcefcd223 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts -@@ -9,4 +9,77 @@ +@@ -9,4 +9,73 @@ / { model = "OrangePi One Plus"; compatible = "xunlong,orangepi-one-plus", "allwinner,sun50i-h6"; @@ -60,10 +60,6 @@ index 12e17567ab56..fd9dcefcd223 100644 + status = "okay"; +}; + -+&gpu { -+ mali-supply = <®_dcdcc>; -+}; -+ +&hdmi { + status = "okay"; +}; diff --git a/projects/Allwinner/linux/linux.aarch64.conf b/projects/Allwinner/linux/linux.aarch64.conf index f7486d5692..fbceaa5ac6 100644 --- a/projects/Allwinner/linux/linux.aarch64.conf +++ b/projects/Allwinner/linux/linux.aarch64.conf @@ -52,6 +52,7 @@ CONFIG_IRQ_DOMAIN=y CONFIG_IRQ_DOMAIN_HIERARCHY=y CONFIG_GENERIC_MSI_IRQ=y CONFIG_GENERIC_MSI_IRQ_DOMAIN=y +CONFIG_IRQ_MSI_IOMMU=y CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_IRQ_FORCED_THREADING=y CONFIG_SPARSE_IRQ=y @@ -3461,6 +3462,8 @@ CONFIG_DRM_FBDEV_OVERALLOC=100 # CONFIG_DRM_DP_CEC is not set CONFIG_DRM_GEM_CMA_HELPER=y CONFIG_DRM_KMS_CMA_HELPER=y +CONFIG_DRM_GEM_SHMEM_HELPER=y +CONFIG_DRM_SCHED=y # # I2C encoder or helper chips @@ -3566,7 +3569,7 @@ CONFIG_DRM_DW_HDMI_CEC=y # CONFIG_TINYDRM_ST7735R is not set # CONFIG_DRM_PL111 is not set # CONFIG_DRM_LIMA is not set -# CONFIG_DRM_PANFROST is not set +CONFIG_DRM_PANFROST=y # CONFIG_DRM_LEGACY is not set CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y @@ -4496,6 +4499,7 @@ CONFIG_SYNC_FILE=y # CONFIG_AUXDISPLAY is not set # CONFIG_UIO is not set +# CONFIG_VFIO is not set # CONFIG_VIRT_DRIVERS is not set # CONFIG_VIRTIO_MENU is not set @@ -4679,7 +4683,25 @@ CONFIG_PLATFORM_MHU=y # CONFIG_PL320_MBOX is not set # CONFIG_ALTERA_MBOX is not set # CONFIG_MAILBOX_TEST is not set -# CONFIG_IOMMU_SUPPORT is not set +CONFIG_IOMMU_IOVA=y +CONFIG_IOMMU_API=y +CONFIG_IOMMU_SUPPORT=y + +# +# Generic IOMMU Pagetable Support +# +CONFIG_IOMMU_IO_PGTABLE=y +CONFIG_IOMMU_IO_PGTABLE_LPAE=y +# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set +# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set +# end of Generic IOMMU Pagetable Support + +# CONFIG_IOMMU_DEBUGFS is not set +# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set +CONFIG_OF_IOMMU=y +CONFIG_IOMMU_DMA=y +# CONFIG_ARM_SMMU is not set +# CONFIG_ARM_SMMU_V3 is not set # # Remoteproc drivers @@ -5836,6 +5858,7 @@ CONFIG_NEED_DMA_MAP_STATE=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y CONFIG_DMA_DECLARE_COHERENT=y CONFIG_ARCH_HAS_SETUP_DMA_OPS=y +CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y diff --git a/projects/Allwinner/options b/projects/Allwinner/options index c5976ed8d6..f559f5616b 100644 --- a/projects/Allwinner/options +++ b/projects/Allwinner/options @@ -40,9 +40,6 @@ # OpenGL(X) implementation to use (no / mesa) OPENGL="no" - # OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) - OPENGLES="libmali" - # Displayserver to use (x11 / no) DISPLAYSERVER="no" @@ -52,10 +49,7 @@ # Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia) # Space separated list is supported, # e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeonsi nvidia" - GRAPHIC_DRIVERS="" - - # KODI Player implementation to use (default / bcm2835-driver / libfslvpuwrap) - KODIPLAYER_DRIVER="$OPENGLES" + GRAPHIC_DRIVERS="panfrost" # additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) # Space separated list is supported, diff --git a/projects/Allwinner/patches/linux/0001-backport-from-5.5.patch b/projects/Allwinner/patches/linux/0001-backport-from-5.5.patch index 3b4172cff5..bc2bcd9958 100644 --- a/projects/Allwinner/patches/linux/0001-backport-from-5.5.patch +++ b/projects/Allwinner/patches/linux/0001-backport-from-5.5.patch @@ -5022,3 +5022,187 @@ index cc15a5cf107d..15cf1f10221b 100644 -- 2.24.0 + +From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= +Subject: [PATCH v7 1/2] arm64: dts: allwinner: Add ARM Mali GPU node for H6 +Date: Wed, 30 Oct 2019 16:07:41 +0100 + +Add the mali gpu node to the H6 device-tree. + +Signed-off-by: Clément Péron +--- + arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +index 0d5ea19336a1..a029daf67345 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +@@ -149,6 +149,20 @@ + allwinner,sram = <&ve_sram 1>; + }; + ++ gpu: gpu@1800000 { ++ compatible = "allwinner,sun50i-h6-mali", ++ "arm,mali-t720"; ++ reg = <0x01800000 0x4000>; ++ interrupts = , ++ , ++ ; ++ interrupt-names = "job", "mmu", "gpu"; ++ clocks = <&ccu CLK_GPU>, <&ccu CLK_BUS_GPU>; ++ clock-names = "core", "bus"; ++ resets = <&ccu RST_BUS_GPU>; ++ status = "disabled"; ++ }; ++ + syscon: syscon@3000000 { + compatible = "allwinner,sun50i-h6-system-control", + "allwinner,sun50i-a64-system-control"; + + +From: =?utf-8?b?Q2zDqW1lbnQgUMOpcm9u?= +Subject: [PATCH v7 2/2] arm64: dts: allwinner: Add mali GPU supply for H6 + boards +Date: Wed, 30 Oct 2019 16:07:42 +0100 + +Enable and add supply to the Mali GPU node on all the +H6 boards. + +Regarding the datasheet the maximum time for supply to reach +its voltage is 32ms. + +Signed-off-by: Clément Péron +--- + arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 6 ++++++ + arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 6 ++++++ + arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 6 ++++++ + arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts | 6 ++++++ + 4 files changed, 24 insertions(+) + +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +index 1d05d570142f..e5ed1d4bfef8 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +@@ -89,6 +89,11 @@ + status = "okay"; + }; + ++&gpu { ++ mali-supply = <®_dcdcc>; ++ status = "okay"; ++}; ++ + &hdmi { + status = "okay"; + }; +@@ -225,6 +230,7 @@ + }; + + reg_dcdcc: dcdcc { ++ regulator-enable-ramp-delay = <32000>; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1080000>; + regulator-name = "vdd-gpu"; +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +index eb379cd402ac..f5ae5182f0c5 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts +@@ -102,6 +102,11 @@ + status = "okay"; + }; + ++&gpu { ++ mali-supply = <®_dcdcc>; ++ status = "okay"; ++}; ++ + &hdmi { + status = "okay"; + }; +@@ -237,6 +242,7 @@ + }; + + reg_dcdcc: dcdcc { ++ regulator-enable-ramp-delay = <32000>; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1080000>; + regulator-name = "vdd-gpu"; +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi +index ec9b6a578e3f..df4cbd7ef96c 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi +@@ -55,6 +55,11 @@ + status = "okay"; + }; + ++&gpu { ++ mali-supply = <®_dcdcc>; ++ status = "okay"; ++}; ++ + &mmc0 { + vmmc-supply = <®_cldo1>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; +@@ -163,6 +168,7 @@ + }; + + reg_dcdcc: dcdcc { ++ regulator-enable-ramp-delay = <32000>; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1080000>; + regulator-name = "vdd-gpu"; +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +index 30102daf83cc..74899ede00fb 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-pine-h64.dts +@@ -85,6 +85,11 @@ + status = "okay"; + }; + ++&gpu { ++ mali-supply = <®_dcdcc>; ++ status = "okay"; ++}; ++ + &hdmi { + status = "okay"; + }; +@@ -221,6 +226,7 @@ + }; + + reg_dcdcc: dcdcc { ++ regulator-enable-ramp-delay = <32000>; + regulator-min-microvolt = <810000>; + regulator-max-microvolt = <1080000>; + regulator-name = "vdd-gpu"; + + +From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= +Date: Sat, 2 Nov 2019 13:04:27 +0100 +Subject: arm64: allwinner: h6: Enable GPU node for Tanix TX6 + +Unlike other H6 boards, Tanix TX6 doesn't have a PMIC so we can enable +the GPU without providing a specific power supply. + +Signed-off-by: Clément Péron +Signed-off-by: Maxime Ripard +--- + arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +index 7e7cb10e3d96..bccfe1e65b6a 100644 +--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts ++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +@@ -53,6 +53,10 @@ + status = "okay"; + }; + ++&gpu { ++ status = "okay"; ++}; ++ + &hdmi { + status = "okay"; + };