summaryrefslogtreecommitdiffstats
path: root/tools/display_driver_helper
diff options
context:
space:
mode:
authorAnssi Hannula <anssi@mageia.org>2012-04-05 02:49:43 +0000
committerAnssi Hannula <anssi@mageia.org>2012-04-05 02:49:43 +0000
commitc61397fbd9ccea27c9879b6951cc518b664666e8 (patch)
tree7c3b8f511160a4b831a3d2aa2cdf05cc3d1072b2 /tools/display_driver_helper
parent904fa5196c05a4ec59f4bc29ed1246e7409498f0 (diff)
downloaddrakx-kbd-mouse-x11-c61397fbd9ccea27c9879b6951cc518b664666e8.tar
drakx-kbd-mouse-x11-c61397fbd9ccea27c9879b6951cc518b664666e8.tar.gz
drakx-kbd-mouse-x11-c61397fbd9ccea27c9879b6951cc518b664666e8.tar.bz2
drakx-kbd-mouse-x11-c61397fbd9ccea27c9879b6951cc518b664666e8.tar.xz
drakx-kbd-mouse-x11-c61397fbd9ccea27c9879b6951cc518b664666e8.zip
display_driver_helper: return false for --is-kms-allowed when radeon
firmware is needed but not installed
Diffstat (limited to 'tools/display_driver_helper')
-rw-r--r--tools/display_driver_helper16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/display_driver_helper b/tools/display_driver_helper
index 7fe63c5..b15fad6 100644
--- a/tools/display_driver_helper
+++ b/tools/display_driver_helper
@@ -330,6 +330,22 @@ is_kms_allowed() {
# Check all drivers for conflicts only.
check_xorg $driver 0 || return 1
done
+
+ # Perform full check for KMS drivers of present hardware.
+ # Needed for e.g. checking if radeon firmware is present.
+ for modalias in $(get_hw_display_modaliases); do
+ for modulename in $(/sbin/modprobe -Rq "$modalias"); do
+ for driver in $KMS_DRIVERS; do
+ if [ "$driver" = "$modulename" ]; then
+ check_driver "$modulename" "$modalias" || return 1
+ # Driver was ok but needs KMS disabled:
+ [ -n "$IS_KMS" ] || return 1
+ break
+ fi
+ done
+ done
+ done
+
return 0
}