Rework kernel modules detection on ARM
cover Rework kernel modules detection on ARM
Handle backlight power and related drm dependencies on ARM
(Tested tegra on Toshiba AC100/Trimslice)
# Fedora 21 armhfp
# before: "vanilla" dracut-038-14.git20140724.fc21.armv7hl # after: dracut + patches
time dracut -N initramfs-N-before $(uname -r)
real 5m43.169s
user 1m58.385s
sys 4m19.735s
# time dracut -H initramfs-H-before $(uname -r) real 3m21.537s user 0m50.595s sys 2m58.565s
# time dracut -N initramfs-N-after.img $(uname -r)
real 5m52.874s
user 2m8.385s
sys 4m35.090s
[# time dracut -H initramfs-H-after.img $(uname -r)
real 3m15.968s
user 0m53.250s
sys 2m58.165s
ls -al
ls -al initramfs-*
-rw-------. 1 root root 12195212 4 ao没t 18:36 initramfs-H-before.img -rw-------. 1 root root 12057377 4 ao没t 19:47 initramfs-H-after.img -rw-------. 1 root root 29522799 4 ao没t 18:18 initramfs-N-before.img -rw-------. 1 root root 30359836 4 ao没t 19:40 initramfs-N-after.img
lsinitrd initramfs-H-after.img |grep simple-panel shows the module along with all depencies that will allow to enable the backlight on the device. (Toshiba AC100)
v4 - Drop tegra_drm case
- Categorize ARM needed modules in 90kernel-modules and removed drm ones
- Add rtc, regulators, i2c ARM modules in 90kernel-modules drop hostonly='' before instmods
- Introduce and Categorize ARM needed modules in 50drm
v3 - Drop module-setup.sh hook (better patch by pbrobinson)
- Drop rtc hook
v2 - Merged patch for kernel-modules for ahci_imx
- Use "=drivers/ata" to select all ATA drivers
- Install rtc drivers on ARM - initially reported as rhbz#1074002 (WIP) need to install hwclock and sync time beforce network time sync
- Use case in for drm on ARM when modalias is handled by
a different module than the KMS one
- Add backlight and pwm to the bundle for drm
- Fix unbalanced parenthesis
Nicolas Chauvet (3):
[ARM] Test soc path for modalias needed by drm [ARM] Categorize needed modules on ARM [ARM] Introduce ARM specific modules needed by drm
modules.d/50drm/module-setup.sh | 12 +++++++++++- modules.d/90kernel-modules/module-setup.sh | 7 ++++--- 2 files changed, 15 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.3.1
A message that is not in the archive (sent off-list or not yet received): 1407182679-22580-1-git-send-email-kwizart-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/3 Test soc path for modalias needed by drm
On ARM, both pci and soc path can be tested for drm.
With this patchset, that was missing in recent kernel, the tegra_drm case is not needed anymore:
http://patchwork.ozlabs.org/patch/361765/
http://www.spinics.net/lists/linux-tegra/msg17948.html
--- modules.d/50drm/module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
modules.d/50drm/module-setup.sh +1 -1
@@ -57,7 +57,7 @@ installkernel() { # as we could e.g. be in the installer; nokmsboot boot parameter will disable # loading of the driver if needed if [[ $hostonly ]] && modinfo -F alias $_modname | sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \ - | grep -qxf - /sys/bus/pci/devices/*/modalias 2>/dev/null; then + | grep -qxf - /sys/bus/{pci/devices,soc/devices/soc?}/*/modalias 2>/dev/null; then hostonly='' instmods $_modname continue fi
Signature · 1 line
1.8.3.1
PATCH 2/3 Categorize needed modules on ARM
In reply to a message not in the archive--- modules.d/90kernel-modules/module-setup.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
modules.d/90kernel-modules/module-setup.sh +7 -4
@@ -51,10 +51,13 @@ installkernel() { if [[ "$(uname -p)" == arm* ]]; then # arm specific modules - hostonly='' instmods \ - connector-hdmi connector-dvi encoder-tfp410 \ - encoder-tpd12s015 i2c-tegra gpio-regulator \ - as3722-regulator orion-ehci ehci-tegra + instmods \ + "=drivers/i2c/busses" \ + "=drivers/regulator" \ + "=drivers/rtc" \ + "=drivers/usb/host" \ + "=drivers/usb/phy" \ + ${NULL} fi # install virtual machine support
Signature · 1 line
1.8.3.1
PATCH 3/3 Introduce ARM specific modules needed by drm
In reply to a message not in the archive--- modules.d/50drm/module-setup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+)
modules.d/50drm/module-setup.sh +11 -0
@@ -51,6 +51,17 @@ installkernel() { return 0 } + if [[ "$(uname -p)" == arm* ]]; then + # arm specific modules needed by drm + instmods \ + "=drivers/gpu/drm/i2c" \ + "=drivers/gpu/drm/panel" \ + "=drivers/pwm" \ + "=drivers/video/backlight" \ + "=drivers/video/fbdev/omap2/displays-new" \ + ${NULL} + fi + for _modname in $(find_kernel_modules_by_path drivers/gpu/drm \ | drm_module_filter) ; do # if the hardware is present, include module even if it is not currently loaded,
Signature · 1 line
1.8.3.1
Quoted 3 lines · Nicolas Chauvet
Handle backlight power and related drm dependencies on ARM
(Tested tegra on Toshiba AC100/Trimslice)
Thanks! Pushed.