soc-qcom-sc7180: set non-strict iommu for eMMC, SD card and USB (MR 4526)

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Anton Bambura 2023-11-01 03:54:36 +02:00 committed by Oliver Smith
parent cc3dd7de87
commit 2770d39f10
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,18 @@
#!/bin/sh
# This script relaxes iommu for the devices, relaxing memory
# protection, but we consider it a fine tradeoff because those
# hardware blocks don't have firmware on them.
# It Increases eMMC speed by 15% according to gnome disks benchmark
# with sample size 1000 MiB and number of samples 2.
iommus="
/sys/devices/platform/soc@0/7c4000.mmc/iommu_group/type
/sys/devices/platform/soc@0/8804000.mmc/iommu_group/type
/sys/devices/platform/soc@0/a6f8800.usb/a600000.usb/iommu_group/type
"
for iommu in $iommus; do
[ -f "$iommu" ] && echo "DMA-FQ" > "$iommu"
done

View file

@ -1,7 +1,7 @@
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=soc-qcom-sc7180
pkgdesc="Common package for Qualcomm Snapdragon 7cx devices"
pkgver=1
pkgver=1.1
pkgrel=0
url="https://postmarketos.org"
license="BSD-3-Clause"
@ -11,9 +11,13 @@ subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-vulkan
"
source="00-sc7180-nonstrict-iommu.sh"
package() {
mkdir -p "$pkgdir"
install -Dm755 "$srcdir"/00-sc7180-nonstrict-iommu.sh \
-t "$pkgdir"/usr/share/mkinitfs/hooks
}
nonfree_firmware() {
@ -30,3 +34,6 @@ vulkan() {
mkdir "$subpkgdir"
}
sha512sums="
8d76fc3ed580e5950bcb8561c08bf56c52b8693605dee04f174a49154e270b5ac6d4303bc00499864f30c352e9a0c06c449253e0b8ba974e3d85554f306c84fc 00-sc7180-nonstrict-iommu.sh
"