在Android设备上启用Framebuffer控制台,“无法唤醒”错误

问题描述

我正在尝试修复索尼 e1 手机上的帧缓冲控制台。我拥有所有必需的配置,从 dts 中删除了对 qcom cont-splash-enabled 的所有引用。我稍微修改了驱动程序/视频/mdss/mdss_fb.c,以便更好地了解发生了什么。

result = pm_runtime_get_sync(info->dev);
    if (result < 0) {
-       pr_err("pm_runtime: fail to wake up\n");
+       if (result == -EINPROGRESS) {
+           pr_err("pm_runtime: operation already in progress\n");
+       }
+       else if (result == -EINVAL) {
+           pr_err("pm_runtime: Invalid argument\n");
+
+       }
+       else if (result== -EACCES) {
+           pr_err("pm_runtime:  Permission denied\n");
+
+       }
+
+       else {
+           pr_err("pm_runtime: fail to wake up\n");
+           pr_err("pm_runtime: pm_runtime_get_sync returned %d\n",result);
+       };
+       goto pm_error;
}

dmesg | grep fb 显示

<6>[    0.000000] Node qcom,mdss_fb_primary memblock_reserve memory 3200000-3600000
<5>[    0.000000] Kernel command line: console=tty0,115200 fbcon=font:VGA8x8 androidboot.hardware=qcom user_debug=31 maxcpus=2 msm_rtb.filter=0x3F ehci-hcd.park=3 msm_rtb.enable=0 lpj=192598 dwc3.maximum_speed"
<6>[    0.626139] pil_pronto fb21b000.qcom,pronto: using secure boot
<6>[    0.694344] mdss_fb_parse_dt: split framebuffer left=0 right=0
<6>[    0.694778] mdp3_alloc: allocating 3072000 bytes at c3200000 (3200000 phys) for fb 0
<3>[    0.695718] mdss_fb_open: pm_runtime:  Permission denied
<6>[    0.696161] mdss_fb_register: FrameBuffer[0] 480x800 registered successfully!

pm_runtime_get_sync 调用 __pm_runtime_resume 调用 rpm_resume。 rpm_resume 返回 -EACCES(仅当 disable_depth==1 时)。

我已经读到认所有设备都有 disable_depth == 1。我不知道 mdss 方面是否有错误。我没有研究过 Linux 驱动程序,我无法理解。我花了几个小时,我没有力气应付它。

rpm_resume 函数https://github.com/msm8610/msm8610_kernel/blob/8x10/drivers/base/power/runtime.c 行 488

内核源代码https://github.com/msm8610/msm8610_kernel/tree/8x10

PostmarketoS 社区发现禁用 MSM 3D 图形驱动程序和“2D”驱动程序会使帧缓冲区正常工作1。我会努力做到的。

解决方法

我需要基于这个提交来实现帧缓冲函数1

效果如下: https://drive.google.com/file/d/1oLaFZ7RXTNfjWdBU54LfeR0sQBKtqb6Z/view?usp=sharing