summaryrefslogtreecommitdiff
path: root/user/grub/quirk-01_radeon_agpmode
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-09-09 00:25:03 -0500
committerMax Rees <maxcrees@me.com>2019-09-09 00:25:03 -0500
commitcf356b050604815c7d9df80aa2897d0b39ec751b (patch)
treeea9b72bdb532789ef1854d83c66b1ad7049c9ac0 /user/grub/quirk-01_radeon_agpmode
parent3c2ccced9f54ab390c55c89bc3a70923de7f195c (diff)
downloadpackages-cf356b050604815c7d9df80aa2897d0b39ec751b.tar.gz
packages-cf356b050604815c7d9df80aa2897d0b39ec751b.tar.bz2
packages-cf356b050604815c7d9df80aa2897d0b39ec751b.tar.xz
packages-cf356b050604815c7d9df80aa2897d0b39ec751b.zip
user/grub: add quirks system and radeon quirk (#49)
Diffstat (limited to 'user/grub/quirk-01_radeon_agpmode')
-rw-r--r--user/grub/quirk-01_radeon_agpmode28
1 files changed, 28 insertions, 0 deletions
diff --git a/user/grub/quirk-01_radeon_agpmode b/user/grub/quirk-01_radeon_agpmode
new file mode 100644
index 000000000..879f1619e
--- /dev/null
+++ b/user/grub/quirk-01_radeon_agpmode
@@ -0,0 +1,28 @@
+#!/bin/sh
+# vi: noet:
+# Horst Burkhardt <horst@adelielinux.org> 2018
+# Max Rees <maxcrees@me.com> 2019
+#
+# AGP acceleration in the Radeon KMS driver has been broken on Apple PPC
+# since the 2.6 series, and most developers are in agreement that since
+# UniNorth is underdocumented, it probably won't ever be fixed. Disable
+# it on all Apple machines except ones where it is known not to apply.
+#
+# https://bts.adelielinux.org/show_bug.cgi?id=49
+set -e
+
+case "$(uname -m)" in
+ppc|ppc64)
+ if grep -q 'MacRISC[23]' /proc/cpuinfo; then
+ case "$(awk '$1 == "machine" { print $3 }' /proc/cpuinfo)" in
+ PowerBook1,1) ;;
+ PowerMac1,1) ;;
+ PowerMac1,2) ;;
+ PowerMac11,2) ;;
+ PowerMac12,1) ;;
+ RackMac3,1) ;;
+ iMac,1) ;;
+ *) export GRUB_CMDLINE_LINUX="radeon.agpmode=-1 $GRUB_CMDLINE_LINUX";;
+ esac
+ fi;;
+esac