Skip to content

Commit

Permalink
Merge pull request #332 from aafeijoo-suse/059-upstream-fixes-drm-perf
Browse files Browse the repository at this point in the history
perf(drm): group dracut_instmods calls
  • Loading branch information
aafeijoo-suse authored May 27, 2024
2 parents 4e951be + a1271e4 commit fe80dac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions modules.d/50drm/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,22 @@ installkernel() {
# as we could e.g. be in the installer; nokmsboot boot parameter will disable
# loading of the driver if needed
if [[ $hostonly ]]; then
local -a _mods
local i modlink modname

for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?,vmbus/devices}/*/modalias; do
[[ -e $i ]] || continue
[[ -n $(< "$i") ]] || continue
# shellcheck disable=SC2046
if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register|drm_encoder_init" -S "iw_handler_get_spy" $(< "$i"); then
if strstr "$(modinfo -F filename $(< "$i") 2> /dev/null)" radeon.ko; then
mapfile -t -O "${#_mods[@]}" _mods < "$i"
done
if ((${#_mods[@]})); then
# shellcheck disable=SC2068
if hostonly="" dracut_instmods --silent -o -s "drm_crtc_init|drm_dev_register|drm_encoder_init" -S "iw_handler_get_spy" ${_mods[@]}; then
if strstr "$(modinfo -F filename "${_mods[@]}" 2> /dev/null)" radeon.ko; then
hostonly='' instmods amdkfd
fi
fi
done
fi
# if there is a privacy screen then its driver must be loaded before the
# kms driver will bind, otherwise its probe() will return -EPROBE_DEFER
# note privacy screens always register, even with e.g. nokmsboot
Expand Down
1 change: 1 addition & 0 deletions suse/README.susemaint
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ PR Commit message
2571 fix(dracut-install): memory leak in `--modalias` option
2573 fix(dracut-install): release memory allocated for regular expressions
2574 fix(dracut-install): memory leak in two `hashmap_put` calls if key exists
2577 perf(drm): group dracut_instmods calls
2593 fix(dracut.sh): do not add device if find_block_device returns an error
2593 feat(dracut.sh): protect push_host_devs function
2601 feat(tpm2-tss): add tpm2.target and systemd-tpm2-generator
Expand Down

0 comments on commit fe80dac

Please sign in to comment.