From faebfd0d2066a0796966b38f9544cab90a75adc9 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sep 29 2020 08:02:06 +0000 Subject: Fixes for Arm GPUs in early boot --- diff --git a/0001-50drm-fix-ambiguous-redirects.patch b/0001-50drm-fix-ambiguous-redirects.patch new file mode 100644 index 0000000..2937709 --- /dev/null +++ b/0001-50drm-fix-ambiguous-redirects.patch @@ -0,0 +1,33 @@ +From 89cd7a46296b34230c21775b24b226cc47ec1527 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 26 Sep 2020 14:50:31 +0200 +Subject: [PATCH 1/3] 50drm: fix ambiguous redirects + +If i contains a space, there is a need to protect the variable usage in some cases. + +This will occurs when a next patch will enable platform bus with such case: +'/sys/bus/platform/devices/Fixed MDIO bus.0' + +Signed-off-by: Nicolas Chauvet +--- + modules.d/50drm/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index c69b2cfa..81d2e662 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -33,8 +33,8 @@ installkernel() { + if [[ $hostonly ]]; then + for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do + [[ -e $i ]] || continue +- if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<$i); then +- if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then ++ if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<"$i"); then ++ if strstr "$(modinfo -F filename $(<"$i") 2>/dev/null)" radeon.ko; then + hostonly='' instmods amdkfd + fi + fi +-- +2.26.2 + diff --git a/0001-fix-graphics-startup-failure-with-the-rhgb-paramter-.patch b/0001-fix-graphics-startup-failure-with-the-rhgb-paramter-.patch new file mode 100644 index 0000000..a19148d --- /dev/null +++ b/0001-fix-graphics-startup-failure-with-the-rhgb-paramter-.patch @@ -0,0 +1,26 @@ +From d76e9ad5d7b16edb3c544ed3888640bea0efbf72 Mon Sep 17 00:00:00 2001 +From: GuoChuang +Date: Mon, 24 Aug 2020 14:03:48 +0800 +Subject: [PATCH 1/8] fix graphics startup failure with the rhgb paramter in + CentOS8.2 + +--- + modules.d/50drm/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index 08cfa45b..c69b2cfa 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -33,7 +33,7 @@ installkernel() { + if [[ $hostonly ]]; then + for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do + [[ -e $i ]] || continue +- if hostonly="" dracut_instmods --silent -s "drm_crtc_init" -S "iw_handler_get_spy" $(<$i); then ++ if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<$i); then + if strstr "$(modinfo -F filename $(<$i) 2>/dev/null)" radeon.ko; then + hostonly='' instmods amdkfd + fi +-- +2.26.2 + diff --git a/0002-50drm-Include-drm-platform-drivers-in-hostonly.patch b/0002-50drm-Include-drm-platform-drivers-in-hostonly.patch new file mode 100644 index 0000000..6b523d8 --- /dev/null +++ b/0002-50drm-Include-drm-platform-drivers-in-hostonly.patch @@ -0,0 +1,31 @@ +From 5afd3cfc96aac425f7de23de60b94ab88dc189ee Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 26 Sep 2020 13:15:55 +0200 +Subject: [PATCH 2/3] 50drm: Include drm platform drivers in hostonly + +On arm, many drm drivers are located in the plaform bus. + +Adding the platform bus will allow drm drivers to be included in the +initramfs when using hostonly mode. + +Signed-off-by: Nicolas Chauvet +--- + modules.d/50drm/module-setup.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index 81d2e662..ad0e6d80 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -31,7 +31,7 @@ installkernel() { + # as we could e.g. be in the installer; nokmsboot boot parameter will disable + # loading of the driver if needed + if [[ $hostonly ]]; then +- for i in /sys/bus/{pci/devices,virtio/devices,soc/devices/soc?}/*/modalias; do ++ for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?}/*/modalias; do + [[ -e $i ]] || continue + if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<"$i"); then + if strstr "$(modinfo -F filename $(<"$i") 2>/dev/null)" radeon.ko; then +-- +2.26.2 + diff --git a/0003-50drm-Check-drm_encoder_init-along-drm_crtc_init.patch b/0003-50drm-Check-drm_encoder_init-along-drm_crtc_init.patch new file mode 100644 index 0000000..03273c7 --- /dev/null +++ b/0003-50drm-Check-drm_encoder_init-along-drm_crtc_init.patch @@ -0,0 +1,39 @@ +From dee4f26adcfd9a9a0e4664f0dc22974b60b5eea2 Mon Sep 17 00:00:00 2001 +From: Nicolas Chauvet +Date: Sat, 26 Sep 2020 15:01:55 +0200 +Subject: [PATCH 3/3] 50drm: Check drm_encoder_init along drm_crtc_init + +Some modules are involved in the display output without to rely on +drm_crtc_init. + +This is the case for the meson_dw_hdmi. This module need to be included +into the initramfs in both hostonly and generic modes. + +Signed-off-by: Nicolas Chauvet +--- + modules.d/50drm/module-setup.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/modules.d/50drm/module-setup.sh b/modules.d/50drm/module-setup.sh +index ad0e6d80..ddc1223d 100755 +--- a/modules.d/50drm/module-setup.sh ++++ b/modules.d/50drm/module-setup.sh +@@ -33,13 +33,13 @@ installkernel() { + if [[ $hostonly ]]; then + for i in /sys/bus/{pci/devices,platform/devices,virtio/devices,soc/devices/soc?}/*/modalias; do + [[ -e $i ]] || continue +- if hostonly="" dracut_instmods --silent -s "drm_crtc_init|drm_dev_register" -S "iw_handler_get_spy" $(<"$i"); then ++ 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 + hostonly='' instmods amdkfd + fi + fi + done + else +- dracut_instmods -o -s "drm_crtc_init|drm_dev_register" "=drivers/gpu/drm" "=drivers/staging" ++ dracut_instmods -o -s "drm_crtc_init|drm_dev_register|drm_encoder_init" "=drivers/gpu/drm" "=drivers/staging" + fi + } +-- +2.26.2 + diff --git a/dracut.spec b/dracut.spec index bcbebe2..1638dad 100644 --- a/dracut.spec +++ b/dracut.spec @@ -5,7 +5,7 @@ # strip the automatically generated dep here and instead co-own the # directory. %global __requires_exclude pkg-config -%define dist_free_release 62.git20200529 +%define dist_free_release 63.git20200529 Name: dracut Version: 050 @@ -88,7 +88,11 @@ Patch57: 0057.patch Patch58: 0058.patch Patch59: 0059.patch Patch60: 0060.patch -Patch61: 0001-Include-devfreq-drivers-in-initrd.patch +Patch61: 0001-fix-graphics-startup-failure-with-the-rhgb-paramter-.patch +Patch62: 0001-Include-devfreq-drivers-in-initrd.patch +Patch63: 0001-50drm-fix-ambiguous-redirects.patch +Patch64: 0002-50drm-Include-drm-platform-drivers-in-hostonly.patch +Patch65: 0003-50drm-Check-drm_encoder_init-along-drm_crtc_init.patch Source1: https://www.gnu.org/licenses/lgpl-2.1.txt @@ -543,6 +547,9 @@ install -m 0755 51-dracut-rescue-postinst.sh $RPM_BUILD_ROOT%{_sysconfdir}/kerne %endif %changelog +* Tue Sep 29 2020 Peter Robinson - 050-63.git20200529 +- Fixes for Arm GPUs in early boot + * Fri Sep 25 2020 Peter Robinson - 050-62.git20200529 - Fix for Rockchip devices