From 6fdd13144469632a8275418628943c974be4a7b1 Mon Sep 17 00:00:00 2001 From: Tobias Heider Date: Mon, 5 May 2025 20:23:01 +0200 Subject: [PATCH 1/2] Fix include of panel drivers if MODULES=dep Our current panel driver loading mechanism when using MODULES=dep is faulty because it matches on driver names that include "*panel*". This is not true for many of the panel drivers in Linux as can be seen by running `grep -Er "\s+.name\s+="" drivers/gpu/drm/panel` in the Linux source tree. Examples: panel-feiyang-fy07024di26a30d.c: .name = "feiyang-fy07024di26a30d", panel-ilitek-ili9881c.c: .name = "ili9881c-dsi", panel-magnachip-d53e6ea8966.c: .name = "d53e6ea8966-panel", A better way to find ALL panel drivers is to also include /sys/module/*panel*/drivers/*/* where the file names are derived from the *.c source files which all include panel, see `ls drivers/gpu/drm/panel`. --- hook-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hook-functions b/hook-functions index fa4a48e..a9417b9 100644 --- a/hook-functions +++ b/hook-functions @@ -693,7 +693,7 @@ dep_add_modules() modules="$modules sunvnet sunvdc" fi - for device in /sys/bus/*/drivers/*panel*/*; do + for device in /sys/bus/*/drivers/*panel*/* /sys/module/*panel*/drivers/*/*; do if [ -d "$device" ] && [ "$(basename "$device")" != "module" ]; then sys_walk_mod_add "$device" fi From d82a1e91ef3615cd9efe1f5c24afb7aff3f47cf2 Mon Sep 17 00:00:00 2001 From: Tobias Heider Date: Mon, 5 May 2025 20:26:28 +0200 Subject: [PATCH 2/2] Include all bridge, panel and backlight drivers if MODULES=most Many arm devices rely on drivers to bring up their display panels properly. Include all of drivers/gpu/drm/panel, drivers/gpu/drm/bridge and drivers/video/backlight to make sure the display is working in the initrd (to show disk unlock dialogue etc). Found on a Qualcomm CRD Snapdragon Laptop but this seems to affect many similar machines too. --- hook-functions | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hook-functions b/hook-functions index a9417b9..69cb236 100644 --- a/hook-functions +++ b/hook-functions @@ -848,12 +848,15 @@ auto_add_modules() ;; fb) # For machines that don't have a generic framebuffer device. - modules="$modules rockchipdrm pwm-cros-ec pwm_bl pwm-rockchip panel-simple" - modules="$modules analogix-anx6345 pwm-sun4i sun4i-drm sun8i-mixer panel-edp" + modules="$modules rockchipdrm pwm-cros-ec pwm_bl pwm-rockchip" + modules="$modules analogix-anx6345 pwm-sun4i sun4i-drm sun8i-mixer" modules="$modules mediatek-drm pwm-mtk-disp anx7625 parade_ps8640 msm" # For panel/backlight on MNT Reform 2 modules="$modules pwm_imx27 nwl-dsi ti-sn65dsi86 imx-dcss" modules="$modules mux-mmio mxsfb" + modules="$modules =drivers/gpu/drm/bridge" + modules="$modules =drivers/gpu/drm/panel" + modules="$modules =drivers/video/backlight" ;; esac done