diff mbox series

[1/1] arm64: dts: qcom: msm8992-lg-bullhead: Disable cont_splash_mem

Message ID 20221126010531.466046-1-pevik@seznam.cz
State New
Headers show
Series [1/1] arm64: dts: qcom: msm8992-lg-bullhead: Disable cont_splash_mem | expand

Commit Message

Petr Vorel Nov. 26, 2022, 1:05 a.m. UTC
From: Petr Vorel <petr.vorel@gmail.com>

Since v6.0-rc1 bullhead reboots during boot:

[    1.882334] mmcc-msm8994 fd8c0000.clock-controller: supply VDD_GFX not found, using dummy regulator
[    1.908955] s1: Bringing 0uV into 800000-800000uV
[    1.911893] s3: Bringing 0uV into 1300000-1300000uV
[    1.920436] s4: Bringing 0uV into 1800000-1800000uV
[    1.921097] s5: Bringing 0uV into 2150000-2150000uV
[    1.932363] s7: Bringing 0uV into 1000000-1000000uV
[    1.933015] l1: Bringing 0uV into 1000000-1000000uV
[    1.948295] l2: Bringing 0uV into 1250000-1250000uV
[    1.948934] l3: Bringing 0uV into 1200000-1200000uV
[    1.960345] l4: Bringing 0uV into 1225000-1225000uV
[    1.960998] l6: Bringing 0uV into 1800000-1800000uV
[    1.968407] l8: Bringing 0uV into 1800000-1800000uV
[    1.970694] l9: Bringing 0uV into 1800000-1800000uV
[    1.979014] l10: Bringing 0uV into 1800000-1800000uV
[    1.979832] l11: Bringing 0uV into 1200000-1200000uV
[    1.988560] l12: Bringing 0uV into 1800000-1800000uV
[    1.989411] l13: Bringing 0uV into 1800000-1800000uV
[    1.996334] l14: Bringing 0uV into 1200000-1200000uV
[    2.000846] mmc1: new HS400 MMC card at address 0001
[    2.007868] l15: Bringing 0uV into 1800000-1800000uV
[    2.009193] l16: Bringing 0uV into 2700000-2700000uV
[    2.017296] mmcblk1: mmc1:0001 032G74 29.1 GiB
[    2.028561] l17: Bringing 0uV into 2700000-2700000uV
[    2.029258] l18: Bringing 0uV into 3000000-3000000uV
[    2.039718]  mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21 p22 p23 p24 p25 p26 p27 p28 p29 p30 p31 p32 p33 p34 p35 p36 p37 p38 p39 p40 p41 p42 p43 p44 p45 p46
[    2.044590] l19: Bringing 0uV into 1800000-1800000uV
=> reboot
Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.2.3-00376

Disabling cont_splash_mem fixes it.

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Petr Vorel Dec. 4, 2022, 1:16 p.m. UTC | #1
Hi all,


I got reply from Dominik that he noticed dfps_data_mem (reserved in
msm8994.dtsi) overlaps with the framebuffer region.
I'll retest it next week, maybe removing it instead of cont_splash_mem
fixes the reboot.

He also noticed, that Linux doesn't reboot when loaded from uefi (his
project [1]).
Not sure if there is any difference.

Kind regards,
Petr

[1] https://github.com/Dominduchami/Nexus5XPkg/
Konrad Dybcio Dec. 5, 2022, 11:09 a.m. UTC | #2
On 04/12/2022 14:16, Petr Vorel wrote:
> Hi all,
> 
> 
> I got reply from Dominik that he noticed dfps_data_mem (reserved in
> msm8994.dtsi) overlaps with the framebuffer region.
They are usually next to each other..

> I'll retest it next week, maybe removing it instead of cont_splash_mem
> fixes the reboot.
Maybe your bootloader reads it? And needs it to be at a certain address,
maybe with a certain node name or a label?

> 
> He also noticed, that Linux doesn't reboot when loaded from uefi (his
> project [1]).
> Not sure if there is any difference.
Is it loaded with this DTB or does it rely on ACPI?

Konrad
> 
> Kind regards,
> Petr
> 
> [1] https://github.com/Dominduchami/Nexus5XPkg/
Dominik Kobinski Dec. 5, 2022, 8:59 p.m. UTC | #3
Hi all,

> Is it loaded with this DTB or does it rely on ACPI?
It is loaded with this DT (booted from grub with efifb enabled in kernel config)

The uefi is just Lumia950XLPKg (link : [1])  with some modifications. 
It also contains code from SurfaceDuoPkg (link : [2]) that resets the platform, 
and uefi then reinitializes MMU (with a more windows-suited memory map). 
I'm guessing it could be the reason for the difference in behaviour.

Kind regards,
Dominik

[1] https://github.com/WOA-Project/Lumia950XLPkg
[2] https://github.com/WOA-Project/SurfaceDuoPkg
Dominik Kobinski Dec. 10, 2022, 5:24 a.m. UTC | #4
Hi all,

Looks like the reboot issue was caused by a memory hole not being reserved.
It's defined in the downstream kernel source (link : [1]). 

Adding it makes the kernel boot fine (tested when booted from lk2nd)

I'll try to send a patch with it tomorrow.

Kind regards,
Dominik

[1] https://github.com/android-linux-stable/bullhead/blob/android-msm-bullhead-3.10/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#L144
Konrad Dybcio Dec. 10, 2022, 9:28 a.m. UTC | #5
On 10.12.2022 06:24, Dominik Kobinski wrote:
> Hi all,
> 
> Looks like the reboot issue was caused by a memory hole not being reserved.
> It's defined in the downstream kernel source (link : [1]). 
> 
> Adding it makes the kernel boot fine (tested when booted from lk2nd)
> 
> I'll try to send a patch with it tomorrow.
> 
> Kind regards,
> Dominik
That looks more sane than a piece of memory being reserved
causing issues :) Happy you found the fix!

Konrad
> 
> [1] https://github.com/android-linux-stable/bullhead/blob/android-msm-bullhead-3.10/arch/arm64/boot/dts/lge/msm8992-bullhead.dtsi#L144
Petr Vorel Dec. 10, 2022, 8:39 p.m. UTC | #6
Hi Dominik,

Also congratulations for your findings, looking forward testing your patch!
Setting my patch as "rejected" as it's obviously invalid.

Kind regards,
Petr
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
index 87c90e93667f..a2f69d965ae5 100644
--- a/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8992-lg-bullhead.dtsi
@@ -2,7 +2,7 @@ 
 /*
  * Copyright (c) 2015, LGE Inc. All rights reserved.
  * Copyright (c) 2016, The Linux Foundation. All rights reserved.
- * Copyright (c) 2021, Petr Vorel <petr.vorel@gmail.com>
+ * Copyright (c) 2021-2022, Petr Vorel <petr.vorel@gmail.com>
  */
 
 /dts-v1/;
@@ -11,7 +11,10 @@ 
 #include "pm8994.dtsi"
 #include "pmi8994.dtsi"
 
-/* cont_splash_mem has different memory mapping */
+/*
+ * cont_splash_mem has different memory mapping (0x03400000),
+ * but that since v6.0-rc1 it causes phone reboot somewhere in mmc module.
+ */
 /delete-node/ &cont_splash_mem;
 
 / {
@@ -46,11 +49,6 @@  ramoops@1ff00000 {
 			ftrace-size = <0x10000>;
 			pmsg-size = <0x20000>;
 		};
-
-		cont_splash_mem: memory@3400000 {
-			reg = <0 0x03400000 0 0x1200000>;
-			no-map;
-		};
 	};
 };