map220v / sm8150-mainline

WIP Mainline kernel for Xiaomi Pad 5
Other
33 stars 16 forks source link

Kernel panic - display black #2

Closed phodina closed 11 months ago

phodina commented 11 months ago

Hi @map220v,

I've compiled the kernel 6.6 with the defconfig and the panel turns on after boot.

However, if the kernel attempts to suspend the panel I get the following panic.

Do you observe the same issue?

[  389.523109] ------------[ cut here ]------------
[  389.523130] disp_cc_mdss_vsync_clk status stuck at 'on'
[  389.523229] WARNING: CPU: 2 PID: 6360 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c
[  389.523292] Modules linked in: zstd zram zsmalloc nft_reject_inet nf_reject_ipv6 nf_reject_ipv4 nft_reject nft_ct nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_tables nfnetlink ipv6 snd_soc_wcd934x snd_soc_wcd_mbhc gpio_wcd934x soundwire_qcom snd_soc_wcd_classh q6asm_dai q6routing q6afe_dai q6afe_clocks q6adm q6afe wcd934x regmap_slimbus joydev q6asm snd_q6dsp_common q6core fastrpc qrtr_smd rpmsg_ctrl nt36523_ts hci_uart btbcm btqca bluetooth ecdh_generic ecc crct10dif_ce rtc_pm8xxx ath10k_snoc snd_soc_cs35l41_i2c snd_soc_cs35l41 ath10k_core snd_soc_wm_adsp cs_dsp spi_geni_qcom snd_soc_cs35l41_lib snd_soc_sm8150 snd_soc_qcom_common mac80211 soundwire_bus qcom_stats libarc4 coresight_tmc coresight_stm ath coresight_funnel coresight_replicator stm_core coresight cfg80211 qrtr rfkill qcom_wdt qcom_q6v5_pas slim_qcom_ngd_ctrl qcom_q6v5 qcom_common qcom_pil_info qcom_glink_smem qcom_sysmon
[  389.524038] CPU: 2 PID: 6360 Comm: kwin_wayland Not tainted 6.6.0-sm8150 #3-postmarketos-qcom-sm8150
[  389.524064] Hardware name: Xiaomi Pad 5 (DT)
[  389.524076] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  389.524099] pc : clk_branch_wait+0x144/0x15c
[  389.524133] lr : clk_branch_wait+0x144/0x15c
[  389.524161] sp : ffff800082bdb700
[  389.524174] x29: ffff800082bdb710 x28: 0000000000000001 x27: ffff3862c15542d0
[  389.524215] x26: 0000000000000000 x25: 0000000000000000 x24: ffff3862c1ac7780
[  389.524254] x23: ffffdf852b707da0 x22: 0000000000000000 x21: ffffdf852aabffa8
[  389.524293] x20: 0000000000000000 x19: ffffdf852bde60f8 x18: fffffffffffee530
[  389.524332] x17: 0000000000000014 x16: 0000000000000030 x15: 0000000000000038
[  389.524370] x14: 0000000000000000 x13: ffffdf852bc9f348 x12: 0000000000000915
[  389.524407] x11: 0000000000000307 x10: ffffdf852bcfbbf0 x9 : ffffdf852bc9f348
[  389.524445] x8 : 00000000ffffefff x7 : ffffdf852bcf7348 x6 : 0000000000000307
[  389.524482] x5 : ffff3863b937ed48 x4 : 40000000fffff307 x3 : ffff58de8da5f000
[  389.524520] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3862c6a35880
[  389.524559] Call trace:
[  389.524571]  clk_branch_wait+0x144/0x15c
[  389.524603]  clk_branch2_disable+0x2c/0x3c
[  389.524636]  clk_core_disable+0x60/0xac
[  389.524660]  clk_disable+0x30/0x4c
[  389.524683]  clk_bulk_disable+0x3c/0x58
[  389.524715]  dpu_runtime_suspend+0x38/0x90
[  389.524742]  pm_generic_runtime_suspend+0x2c/0x44
[  389.524777]  genpd_runtime_suspend+0xa8/0x254
[  389.524810]  __rpm_callback+0x48/0x1d8
[  389.524831]  rpm_callback+0x6c/0x78
[  389.524852]  rpm_suspend+0x10c/0x570
[  389.524871]  rpm_idle+0x114/0x194
[  389.524889]  __pm_runtime_idle+0x54/0x98
[  389.524909]  dpu_kms_disable_commit+0x1c/0x28
[  389.524930]  msm_atomic_commit_tail+0x344/0x50c
[  389.524957]  commit_tail+0xa0/0x188
[  389.524988]  drm_atomic_helper_commit+0x17c/0x194
[  389.525017]  drm_atomic_commit+0xac/0xe8
[  389.525041]  drm_mode_atomic_ioctl+0xa0c/0xce4
[  389.525065]  drm_ioctl_kernel+0xc8/0x16c
[  389.525096]  drm_ioctl+0x20c/0x4b4
[  389.525124]  __arm64_sys_ioctl+0xac/0xf0
[  389.525156]  invoke_syscall+0x48/0x110
[  389.525188]  el0_svc_common.constprop.0+0x40/0xe0
[  389.525217]  do_el0_svc+0x1c/0x28
[  389.525243]  el0_svc+0x40/0xe4
[  389.525267]  el0t_64_sync_handler+0x120/0x12c
[  389.525288]  el0t_64_sync+0x190/0x194
[  389.525312] ---[ end trace 0000000000000000 ]---
[  389.526644] ------------[ cut here ]------------
[  389.526648] disp_cc_mdss_mdp_clk status stuck at 'on'
[  389.526670] WARNING: CPU: 2 PID: 73 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c
[  389.526682] Modules linked in: zstd zram zsmalloc nft_reject_inet nf_reject_ipv6 nf_reject_ipv4 nft_reject nft_ct nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_tables nfnetlink ipv6 snd_soc_wcd934x snd_soc_wcd_mbhc
[  389.526711] [NVT-ts-spi] nvt_ts_suspend 1787: end
[  389.526715]  gpio_wcd934x soundwire_qcom snd_soc_wcd_classh q6asm_dai q6routing q6afe_dai q6afe_clocks q6adm q6afe wcd934x regmap_slimbus joydev q6asm snd_q6dsp_common q6core fastrpc qrtr_smd rpmsg_ctrl nt36523_ts hci_uart btbcm btqca bluetooth ecdh_generic ecc crct10dif_ce rtc_pm8xxx ath10k_snoc snd_soc_cs35l41_i2c snd_soc_cs35l41 ath10k_core snd_soc_wm_adsp cs_dsp spi_geni_qcom snd_soc_cs35l41_lib snd_soc_sm8150 snd_soc_qcom_common mac80211 soundwire_bus qcom_stats libarc4 coresight_tmc coresight_stm ath coresight_funnel coresight_replicator stm_core coresight cfg80211 qrtr rfkill qcom_wdt qcom_q6v5_pas slim_qcom_ngd_ctrl qcom_q6v5 qcom_common qcom_pil_info qcom_glink_smem qcom_sysmon
[  389.526828] CPU: 2 PID: 73 Comm: kworker/2:1 Tainted: G        W          6.6.0-sm8150 #3-postmarketos-qcom-sm8150
[  389.526834] Hardware name: Xiaomi Pad 5 (DT)
[  389.526838] Workqueue: pm pm_runtime_work
[  389.526845] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  389.526850] pc : clk_branch_wait+0x144/0x15c
[  389.526857] lr : clk_branch_wait+0x144/0x15c
[  389.526865] sp : ffff800080cdbb40
[  389.526867] x29: ffff800080cdbb50 x28: 0000000000000000 x27: 0000000000000000
[  389.526877] x26: 0000000000000000 x25: 0000000000000000 x24: ffff3862c22cd780
[  389.526885] x23: ffffdf852b707e60 x22: 0000000000000000 x21: ffffdf852aabffa8
[  389.526894] x20: 0000000000000000 x19: ffffdf852bde64f8 x18: fffffffffffef2d0
[  389.526903] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000038
[  389.526912] x14: 0000000000000000 x13: ffffdf852bc9f348 x12: 00000000000009ab
[  389.526922] x11: 0000000000000339 x10: ffffdf852bcfc0a0 x9 : ffffdf852bc9f348
[  389.526938] x8 : 00000000ffffefff x7 : ffffdf852bcf7348 x6 : 0000000000000339
[  389.526995] x5 : 0000000000000000 x4 : 40000000fffff339 x3 : 0000000000000000
[  389.527032] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3862c0322c40
[  389.527070] Call trace:
[  389.527080]  clk_branch_wait+0x144/0x15c
[  389.527112]  clk_branch2_disable+0x2c/0x3c
[  389.527142]  clk_core_disable+0x60/0xac
[  389.527164]  clk_disable+0x30/0x4c
[  389.527186]  clk_bulk_disable+0x3c/0x58
[  389.527216]  mdss_runtime_suspend+0x40/0x98
[  389.527241]  pm_generic_runtime_suspend+0x2c/0x44
[  389.527271]  genpd_runtime_suspend+0xa8/0x254
[  389.527301]  __rpm_callback+0x48/0x1d8
[  389.527320]  rpm_callback+0x6c/0x78
[  389.527339]  rpm_suspend+0x10c/0x570
[  389.527358]  pm_runtime_work+0xc4/0xc8
[  389.527377]  process_one_work+0x138/0x248
[  389.527406]  worker_thread+0x320/0x438
[  389.527429]  kthread+0x110/0x114
[  389.527452]  ret_from_fork+0x10/0x20
[  389.527476] ---[ end trace 0000000000000000 ]---
[  389.528048] ------------[ cut here ]------------
[  389.528059] disp_cc_mdss_ahb_clk status stuck at 'on'
[  389.528148] WARNING: CPU: 2 PID: 73 at drivers/clk/qcom/clk-branch.c:86 clk_branch_wait+0x144/0x15c
[  389.528193] Modules linked in: zstd zram zsmalloc nft_reject_inet nf_reject_ipv6 nf_reject_ipv4 nft_reject nft_ct nf_conntrack nf_defrag_ipv4 nf_defrag_ipv6 nf_tables nfnetlink ipv6 snd_soc_wcd934x snd_soc_wcd_mbhc gpio_wcd934x soundwire_qcom snd_soc_wcd_classh q6asm_dai q6routing q6afe_dai q6afe_clocks q6adm q6afe wcd934x regmap_slimbus joydev q6asm snd_q6dsp_common q6core fastrpc qrtr_smd rpmsg_ctrl nt36523_ts hci_uart btbcm btqca bluetooth ecdh_generic ecc crct10dif_ce rtc_pm8xxx ath10k_snoc snd_soc_cs35l41_i2c snd_soc_cs35l41 ath10k_core snd_soc_wm_adsp cs_dsp spi_geni_qcom snd_soc_cs35l41_lib snd_soc_sm8150 snd_soc_qcom_common mac80211 soundwire_bus qcom_stats libarc4 coresight_tmc coresight_stm ath coresight_funnel coresight_replicator stm_core coresight cfg80211 qrtr rfkill qcom_wdt qcom_q6v5_pas slim_qcom_ngd_ctrl qcom_q6v5 qcom_common qcom_pil_info qcom_glink_smem qcom_sysmon
[  389.528788] CPU: 2 PID: 73 Comm: kworker/2:1 Tainted: G        W          6.6.0-sm8150 #3-postmarketos-qcom-sm8150
[  389.528812] Hardware name: Xiaomi Pad 5 (DT)
[  389.528824] Workqueue: pm pm_runtime_work
[  389.528848] pstate: 604000c5 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  389.528871] pc : clk_branch_wait+0x144/0x15c
[  389.528901] lr : clk_branch_wait+0x144/0x15c
[  389.528929] sp : ffff800080cdbb40
[  389.528940] x29: ffff800080cdbb50 x28: 0000000000000000 x27: 0000000000000000
[  389.528979] x26: 0000000000000000 x25: 0000000000000000 x24: ffff3862c22cd780
[  389.529017] x23: ffffdf852b708028 x22: 0000000000000000 x21: ffffdf852aabffa8
[  389.529056] x20: 0000000000000000 x19: ffffdf852bde59f0 x18: fffffffffffefef8
[  389.529094] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000038
[  389.529131] x14: 0000000000000000 x13: ffffdf852bc9f348 x12: 0000000000000a26
[  389.529169] x11: 0000000000000362 x10: ffffdf852bcfc478 x9 : ffffdf852bc9f348
[  389.529206] x8 : 00000000ffffefff x7 : ffffdf852bcf7348 x6 : 0000000000000362
[  389.529243] x5 : 0000000000000000 x4 : 40000000fffff362 x3 : 0000000000000000
[  389.529280] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff3862c0322c40
[  389.529316] Call trace:
[  389.529326]  clk_branch_wait+0x144/0x15c
[  389.529356]  clk_branch2_disable+0x2c/0x3c
[  389.529386]  clk_core_disable+0x60/0xac
[  389.529405]  clk_disable+0x30/0x4c
[  389.529427]  clk_bulk_disable+0x3c/0x58
[  389.529454]  mdss_runtime_suspend+0x40/0x98
[  389.529479]  pm_generic_runtime_suspend+0x2c/0x44
[  389.529507]  genpd_runtime_suspend+0xa8/0x254
[  389.529540]  __rpm_callback+0x48/0x1d8
[  389.529559]  rpm_callback+0x6c/0x78
[  389.529578]  rpm_suspend+0x10c/0x570
[  389.529597]  pm_runtime_work+0xc4/0xc8
[  389.529616]  process_one_work+0x138/0x248
[  389.529641]  worker_thread+0x320/0x438
[  389.529666]  kthread+0x110/0x114
[  389.529685]  ret_from_fork+0x10/0x20
phodina commented 11 months ago

Here's the assignment of the clock in the DTS https://github.com/map220v/sm8150-mainline/blob/nabu-6.6/arch/arm64/boot/dts/qcom/sm8150.dtsi#L3735

map220v commented 11 months ago

I didn't had this issue when i suspended/resumed few times, I thought https://github.com/map220v/sm8150-mainline/commit/16a2600d9bdd84abee45b8a26008dcbf7626554d also fixed DSI clock issue. For stability use kernel 6.1, kernels starting from 6.2 are broken for sm8150 and still have issues with dsi clocks being stuck in on/off state on suspend/resume, bluetooth uart failing to start and ufs clocks being stuck in off state most of times when booting with dual dsi.

phodina commented 11 months ago

I've used the branch nabu-6.0-rc1 but I do have similar issue that the screen just can't be powered on again.

What commit from your view is stable enough?

map220v commented 11 months ago

In my repo DSI suspend and resume should work in nabu-5.19 branch.

There is also repo that is still being maintained https://github.com/maverickjb/linux-6.1.10 it has patches for type-c(otg) support, working dsi resume/suspend and secondary usb with wn8031f for xiaomi's keyboard support