Fixes for Arm GPUs in early boot

This commit is contained in:
Peter Robinson 2020-09-29 09:02:06 +01:00
parent 5ff500b686
commit faebfd0d20
5 changed files with 138 additions and 2 deletions

View File

@ -0,0 +1,33 @@
From 89cd7a46296b34230c21775b24b226cc47ec1527 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
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 <kwizart@gmail.com>
---
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

View File

@ -0,0 +1,26 @@
From d76e9ad5d7b16edb3c544ed3888640bea0efbf72 Mon Sep 17 00:00:00 2001
From: GuoChuang <guo.chuang@zte.com.cn>
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

View File

@ -0,0 +1,31 @@
From 5afd3cfc96aac425f7de23de60b94ab88dc189ee Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
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 <kwizart@gmail.com>
---
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

View File

@ -0,0 +1,39 @@
From dee4f26adcfd9a9a0e4664f0dc22974b60b5eea2 Mon Sep 17 00:00:00 2001
From: Nicolas Chauvet <kwizart@gmail.com>
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 <kwizart@gmail.com>
---
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

View File

@ -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 <pbrobinson@fedoraproject.org> - 050-63.git20200529
- Fixes for Arm GPUs in early boot
* Fri Sep 25 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 050-62.git20200529
- Fix for Rockchip devices