16 # Include KMS capable drm drivers
19 local _drm_drivers
='drm_crtc_init'
21 # subfunctions inherit following FDs
22 local _merge
=8 _side2
=9
25 while read _fname ||
[ -n "$_fname" ]; do
27 *.ko
) _fcont
="$(< $_fname)" ;;
28 *.ko.gz
) _fcont
="$(gzip -dc $_fname)" ;;
29 *.ko.xz
) _fcont
="$(xz -dc $_fname)" ;;
31 [[ $_fcont =~
$_drm_drivers
32 && ! $_fcont =~ iw_handler_get_spy
]] \
38 while read _f1 ||
[ -n "$_f1" ]; do
41 echo "$_f2" 1>&${_side2}
43 done | nmf1
1>&${_merge}
45 # Use two parallel streams to filter alternating modules.
47 eval "( ( rotor ) ${_side2}>&1 | nmf1 ) ${_merge}>&1"
48 [[ $debug ]] && set -x
52 if [[ "$(uname -p)" == arm
* ]]; then
53 # arm specific modules needed by drm
55 "=drivers/gpu/drm/i2c" \
56 "=drivers/gpu/drm/panel" \
58 "=drivers/video/backlight" \
59 "=drivers/video/fbdev/omap2/displays-new" \
63 instmods amdkfd hyperv_fb
65 for _modname
in $
(find_kernel_modules_by_path drivers
/gpu
/drm \
66 | drm_module_filter
) ; do
67 # if the hardware is present, include module even if it is not currently loaded,
68 # as we could e.g. be in the installer; nokmsboot boot parameter will disable
69 # loading of the driver if needed
70 if [[ $hostonly ]] && modinfo
-F alias $_modname |
sed -e 's,\?,\.,g' -e 's,\*,\.\*,g' \
71 |
grep -qxf - /sys
/bus
/{pci
/devices
,soc
/devices
/soc?
}/*/modalias
2>/dev
/null
; then
72 hostonly
='' instmods
$_modname
73 # if radeon.ko is installed, we want amdkfd also
74 if strstr
"$_modname" radeon.ko
; then
75 hostonly
='' instmods amdkfd