summaryrefslogtreecommitdiffstats
path: root/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-11-09 16:11:57 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-25 07:50:33 +0000
commitc4acacefc18d7cf9c25031c86c07097001c81da3 (patch)
tree7f9da19f8c0ea9550e5333570cd1916410ba0799 /meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check
parent6c3f68039d104e23f1267dedfec4aad3fb9fb3ae (diff)
downloadpoky-c4acacefc18d7cf9c25031c86c07097001c81da3.tar.gz
gma500_gfx: Avoid inserting gma500_gfx module for certain devices
The gma500_gfx driver will match certain devices on which it causes incorrect functionality, we want to avoid inserting this module, basicallly blacklist it for specific hardware, but still allow it to work on other hardware by default; usually when we have an already working system, using udev rules would do the job, but since we are building it, it is impossible to blacklist a driver when a certain udev rule matches, since rootfs isn't writeable at this point during boot time, the solution is to use modprobe install, which runs a certain command instead of inserting a matching module, this command needs to insert the module manually afterwards and have a flag --ignore-install so it doesnt create an infinite loop executing itself everytime it wants to insert the module, busybox's modprobe doesn't provide this functionality, so a small hack had to be used to avoid the infite loop instead. (From meta-yocto rev: 70c143767a8b63921e668a62ac463b3a6b8c6132) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check')
-rw-r--r--meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf2
-rw-r--r--meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh11
2 files changed, 13 insertions, 0 deletions
diff --git a/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
new file mode 100644
index 0000000000..69f109e5fc
--- /dev/null
+++ b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.conf
@@ -0,0 +1,2 @@
1# Mimic modprobe's install funcitonality with busybox's modprobe
2install gma500_gfx lsmod | grep gma || { gma500_gfx_check.sh || modprobe gma500_gfx; }
diff --git a/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
new file mode 100644
index 0000000000..0c7b3aa14f
--- /dev/null
+++ b/meta-yocto-bsp/recipes-bsp/gma500-gfx-check/gma500-gfx-check/gma500-gfx-check.sh
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3# Check for devices we wish to avoid gma500_gfx for
4DEVICES="0x8119 0x4108"
5for DEVICE in $DEVICES; do
6 if udevadm trigger --subsystem-match=pci --verbose --attr-match=device=$DEVICE | grep "pci" >> /dev/null ; then
7 echo "Found $DEVICE, avoiding gma500_gfx module" >> /dev/kmsg;
8 exit 0
9 fi
10done
11exit 1