summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-10 19:46:46 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-07-10 19:55:07 +0200
commit329f7a3734331cb57895a675d4fc87c261f338bd (patch)
tree0118bdfbe40599c3836d02d2808ec8a26c8db50f
parent82e3d3379b7204bd81033c96b6279b537186ed85 (diff)
drv_module_reload: Unbind the right console driver
We want to unbind fbcon, but only fbcon and only if it's there. This was broken by the recent patch in 3.16-rc to kick out the vgacon driver. I've forgotten to push out the relevant fix from the machine used to create the kick vgacon patches. v2: Dropped duplicated /, spotted by Damien. Reported-by: Damien Lespiau <damien.lespiau@intel.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rwxr-xr-xtests/drv_module_reload14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/drv_module_reload b/tests/drv_module_reload
index 66cd6bbb..5cbff891 100755
--- a/tests/drv_module_reload
+++ b/tests/drv_module_reload
@@ -10,13 +10,13 @@ SOURCE_DIR="$( dirname "${BASH_SOURCE[0]}" )"
# no other drm service should be running, so we can just unbind
-# vtcon0 is vga, vtcon1 fbcon and let's pray that won't change due to boot load
-# time changes
-if ! echo 0 > /sys/class/vtconsole/vtcon1/bind ; then
- echo -e "no kms unload support"
- echo "please enable CONFIG_VT_HW_CONSOLE_BINDING in the kernel"
- exit 77
-fi
+# we must kick away fbcon (but only fbcon)
+for vtcon in /sys/class/vtconsole/vtcon*/ ; do
+ if grep "frame buffer device" $vtcon/name > /dev/null ; then
+ echo unbinding $vtcon: `cat $vtcon/name`
+ echo 0 > $vtcon/bind
+ fi
+done
# The sound driver uses our power well
pkill alsactl