11-03-2024, 09:11 AM
(10-26-2024, 04:44 AM)Jite Wrote:(10-25-2024, 02:36 PM)Jite Wrote: Hmm. Tried this on arch linux arm and it seemed to crash the system needing a restart. Tried this on a few occasions with the same result. The good news is that it definitely does something. Not quite certain why this command would not work on postmarket os as I am trying to figure out which part of the command is systemd specific as the path to the driver is the same on pmos...Having tried this again using snapshot on pmos it does seem to be working...
Yes, I can reproduce your results: the rkisp1 unbind works on some systems, but appears to crash the phone on others. (I suspect it doesn't completely crash the system but does disable the display, making it practically useless.)
As far as I can tell, the crash is caused when the GPU driver is also bound to the shared MIPI D-PHY port (the RK3399 provides three D-PHYs: one TX only which in the PPP is wired to the screen; one TX/RX which in the PPP is used in RX mode for the world-facing camera; and one RX only which in the PPP is the user-facing camera). Since unbinding the rkisp1 driver also shuts down the PHY, if the kernel thinks the GPU is connected to the PHY then it is disabled as well, killing the screen.
The whole problem can be avoided by telling the GPU driver not to use the camera PHY in the first place (since it doesn't need it), which was implemented in this patch: https://gitlab.com/pine64-org/linux/-/co...3d91766f81
In my testing, the problem does NOT occur under postmarketOS using the pine64 6.6 kernel (which includes the above commit). It DOES occur using https://codeberg.org/megi/linux/src/tag/...40512-2332 (which for some reason does NOT include the patch); cherry-picking commit 8be04a3e into the latter kernel fixes it.