-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does the drm suspend/wakeup works? #12
Comments
Unfortunately it's broken on sm8150 with dual dsi since kernel 6.2, when dsi suspends or resumes it gives errors like: clock stuck in on/off state, on kernel 6.1 without this issue, there is no UX, OpenGL and Vulkan context crashes or bugs when suspending or resuming. If linux hibernate doesn't require uefi varstore then it should work same way as on regular linux PC. |
Does it mean kernel will panic on resume/suspend? I sawed commit for drm resume/suspend fix maverickjb/linux-6.1.10@7c92310 from maverickjb, only difference is gdsc.c, i updated it in my fork, but same as you i cant test it now :( |
First dsi will give critical errors, then it will reboot because of unstable clock driver or dsi driver state. |
Well, if screen is suspended it will crash on resume, any ideas of fixing this? Did you have kernel log of crash? What parts of kernel/dts is related to dsi clocks, devlink and dsi cyclic dependencies? How can i debug my tablet's kernel via usb, without dissambling it and any external hardware? Edit: torvalds/linux@9187ebb torvalds/linux@d09ec6f https://github.com/torvalds/linux/commits/master/drivers/gpu/drm/msm/dsi maybe this commits can be related to our problem? Or just try to downgrade dsi drivers? |
I don't have kernel logs from mainline, you can check this code it controls dsi clocks. For devlink and it's cyclic dependecies handling check latest nabu-6.0-rc1 commits.
These commits doesn't seem to be releated to this issue. Downgrading dsi most likely won't help, because issue seem to be somewhere else, this error "clock stuck in on/off state" is also happens for UFS on boot, I fixed it temporarly by adding sleep functions in clock enable/disable, but it seems that ufs driver still has chance to crash at boot. |
Now only left two annoing parts, waiting for bootloader unlock and debugging. I wont close this issue until, i/you/we found a solution for this, if you can give me more info about this it may be very helpful |
How to get kernel crash log for debugging if screen is black(or it isnt?), does it save logs or dump files, if it does, where are they? |
I use ssh to get logs from dmesg, there is also ramoops(pstore) it saves kernel logs to ddr region at address 0xb0000000 that is persistent between reboots. |
But how to get thoose logs from there? |
Boot to android recovery and check /sys/fs/pstore/console-ramoops* |
If i boot from linux to fastboot, then to orangefox recovery it wont be erased? If kernel panic isnt permanent (not everytime) can i just view logs from linux? |
It won't be erased, but some kernel crashes can corrupt pstore header, and pstore in recovery won't show console-ramoops, so the only way to read such log would be /dev/mem |
Dsi_phy_7nm.c have big differences beetwen versions 6.1 to 6.7, maybe just some patch broke it for nabu🤔 |
elish with sm8250 also has Dual DSI, but dsi suspend and resume seem to work fine there, and they don't have clocks issues with UFS, so it's probably something wrong with clocks or clocks dependency handling on sm8150. |
May this be because patches with devlink "optimizing"? And what dsi1 and dsi0 does(where the screen lives)? And which part of kernel control thoose "clocks". Nabu android kernel dont have this issue, can we get code from there and rework? |
Which part of the kernel control this "clocks"? |
DSI is a protocol that usually uses four data lines and one clock line to transfer dsi commands and video data to display controller(nt36523), we have dual dsi configuration that uses two DSI controllers for one display, in this configuration DSI0 usually used to draw left half of display and DSI1 right half.
Display clocks specified in https://github.com/map220v/sm8150-mainline/blob/nabu-6.7/drivers/clk/qcom/dispcc-sm8250.c
And dsi phy 7nm which has dsi phy suspend(dsi_7nm_phy_disable)/resume(dsi_7nm_phy_enable) code, it requests clock driver to enable/disable or change frequency of clocks https://github.com/map220v/sm8150-mainline/blob/nabu-6.7/drivers/gpu/drm/msm/dsi/phy/dsi_phy_7nm.c |
May it just because it have not enough time? Eg ~200 cpu cycles might be not enough?(Clk-branch.c ± 80 line) |
Ok, first what i check will be reverting devlink changes, because they changed too much, and they might be a problem for sm8150 |
If in 6.1 and previos kernels dsi a ufs clocks fine and dsi and clk drivers in newer kernels fine, is this mean high chance of that the fw_devlink "optimization" broke something on this platform? |
Does nabu6.0-rc1 already have broken dsi suspend? Or it broked in other branch? |
DSI and UFS clocks became unstable in 6.2 |
In 5.19 I used this hack to make dsi0, dsi1 and dispcc probe with new devlink. |
Any ideas what drivers and commits broke clocks for dsi and ufs? Why this patches not working in version 6.2+? |
I didn't checked fw_devlink commits, but I know that changes in dsi and clk folders are fine, and reverting them doesn't fix clock issue. These patches won't apply to new kernels because of devlink changes, and some of these patches might be already applied to new kernels or they got replaced by other patch. |
Is reverting all devlink changes after 6.1 and keep Saravana Kannan's pathes and your's might be a way? |
Did you mean this and next commits related to fw_devlink fix the issue with dsi clocks on 6.0-rc1 --- 6 1? |
I think these commits were used to fix dsi probing fail, which was caused by devlink that could not properly resolve cycle depenedecy between dispcc, dsi0 and dsi1. In new kernels (6.2 and higher) probing issue releated to devlink was fixed but some devlink improvements somehow broke clocks on sm8150 with dual dsi configuration. |
I think i will go in simpler way, i will rollback drivers/base/{parts related to fw_devlink} to 6.1 then apply Saravana Kannan's patches |
I think it would be easier to backport changee from your kernel to maverickjb kernel than try to found what change in fw_devlink causing error, Or is it possible to only port things related to fw_devlink from 6.1 to 6.7+? |
The problem is that only usb keyboard isnt working, flash drives are working properly |
If your kb requires usbhid or other kernel modules then try recompiling kernel with all these configs set to 'Y' |
Cant apply this patch, screen suspend isnt working properly, black screen, kernel not crash. Usb keyboard is working. GUI is very smooth.Because of broken ufs wifi and bt not working, they cant get data from modem partition |
Hi everyone who is still there. Found some patch that can help with our issue but it need some changes, i want to see your opinion (@map220v). This patch for another qcom cpu, but it easy to fix to out cpu, can you review it? https://lore.kernel.org/lkml/YrXo+i3wwl2ERKIj@xps13/t/ |
Well, as I see code patches is useless, they even got into mainline kernel. But dtc patch may be useful |
Why do Xiaomi vayu(Poco x3 pro) have these clocks in framebuffer: But nabu don't? |
These clocks(also few others in dispcc) needed to keep "logo framebuffer" working for simplefb. |
Can this help with display in 6.8: torvalds/linux@d543d1b |
Hello again, can I ask you about rebase guide for this kernel? I'm interested in testing new kernel version, they have some msm and dpu related display patches |
Add remote called upstream that points to linux kernel repo and run:
Then if it gives errors at some commits, fix them, "git add" files and run "git rebase --continue" to continue rebasing commits. |
trying to compile almost pure mainline kernel, with your nabu screen patch and dtb, because that i cant compile dtb on 6.9 branch |
image make signs of live, now trying to boot test rootfs |
6.10 acts same as 6.8 :( |
Hello, @map220v can you explain what does this patch do: maverickjb/linux-6.1.10@f366d74 I see that in affect dpu but I have no knowledge about internal Linux structure and api |
Maybe try applying sm8150-mainline version of this patch to mainline? |
Well i have an idea, maybe panel driver just not starting up properly? When kernel have no root= provided old fbdev is stil working and print "press any key to shutdown" (mainline) |
A was able to make nabu-6.9 kernel with git merge(git rebase create compilation issues). Kernel make almost no signs of live: initial bootlog, usb power, no kernel modules are trying to load and flash drive with led make no "mount kind" of blinks, will try using it as usb-serial but when i tryed this with 6.8 i got this issues: text wasnt alignment, systemd wasnt launch getty on this console(cannot got into the system). Also question nt36523 driver, it had firmware(at least in android kernel) does it loading in current kernels? |
You can also try NCM with sshd service, im currently using it on my phone. On PC you probably need to set ip address for this network to 192.168.100.2 and gateway to 192.168.100.1
Kernel loads it from this path /lib/firmware/novatek/novatek_nt36523_fw.bin , this firmware is required for touch and pen input handling. |
Also forget to say, nt36xxx touchscreen driver not compiling, they broke something in header files again, i'll try usb net if kernel will make signs of live into usb-serial |
6.8 kernel spaming with this line |
Hello, i found interesting thing, this is a simple drm panel generator: https://github.com/msm8916-mainline/linux-mdss-dsi-panel-driver-generator/blob/master/ can this help with enabling panel in mainline? |
It won't help because it doesn't support Dual DSI and problem on nabu is not panel driver(we already have proper driver for panel controller from elish), it's dsi or dpu issue, probably releated to Dual DSI changes in 6.8 |
If adreno core can draw to framebuffer or we can passthrough drm drawing results into simplefb, can we try to launch it on simple framebuffer. Or try to revert dual-dsi changes |
As far as I know xiaomi nabu kernel use simpledrm(its defconfig) |
Also about newer kernels, tried mainline one and 6.8, no ufs, stuck in rootwait or kernel panic |
This is fixed on 6.12, so now we can say it works :DD |
Previously after 6.8 it even doesnt turn on at boot :D |
the ufs seems to still be failing in some devices, not sure yet, but you can try this to workaround it, deviceinfo_kernel_cmdline="pd_ignore_unused,clk_ignore_unused,console=ttyMSM0,115200," |
Does the drm/dsi suspend works, can i suspend my screen and the wakeup it without any crash and fatal for UX bugs.
One important question, does hibernate to disk works? Eg, no crashes after resuming from image
The text was updated successfully, but these errors were encountered: