项目场景:
点击2-3次power键才能唤醒屏幕。
1.gpio 占用,目测最有可能的是gpio占用 导致超时 (1.通过添加log定位 2.排查添加的gpio)-排除,没有报错也无法唤醒
2.休眠有问题
3.唤醒有问题
4.pmi休眠唤醒异常导致 --对比另外的项目有同样报错没有问题,排除
5.发现oom (PASR关闭测试)–关闭仍然出现
6.调试DP导致的(fusb302)-- 移除依然出现
7.pci
8.对比代码发现audio有所不一样,移除查看
9.按键上报延时或者没有报上去导致的
要么系统没有被唤醒,要么就是屏幕这块休眠唤醒有问题
[ 210.074798][ T5108] PM: PM: Pending Wakeup Sources: [timerfd]
[ 210.091733][ T327] pci-msm-rc 0000:00:00.0: Refused to change power state, currently in D3
[ 210.093743][ T5108] spmi spmi-0: pmic_arb_wait_for_done: transaction failed (0x3)
[ 210.093746][ T5108] spmi spmi-0: failed irqchip transaction on 125
[ 210.093771][ T5108] spmi spmi-0: pmic_arb_wait_for_done: transaction failed (0x3)
[ 210.093772][ T5108] spmi spmi-0: failed irqchip transaction on 126
[ 210.093796][ T5108] spmi spmi-0: pmic_arb_wait_for_done: transaction failed (0x3)
[ 210.093797][ T5108] spmi spmi-0: failed irqchip transaction on 127
[ 210.098863][ T5240] yjc usb_extcon_detect_cable id=1,vbus=1
原因分析:
1.通过echo 8 > /proc/sysrq-trigger
log发现可能是gpio被占用导致(invalid GPIO -2),经修改,排除gpio导致,没有打印此log依然出现多次点击才能唤醒的现象
[ 92.174247][ T5478] msm-dwc3 8c00000.hsusb: DWC3 exited from low power mode
[ 92.300439][ T5468] ------------[ cut here ]------------
[ 92.300443][ T5468] invalid GPIO -2
[ 92.300470][ T5468] WARNING: CPU: 6 PID: 5468 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xb0/0xc4
[ 92.300472][ T5468] Modules linked in: r8125 rmnet_offload(O) rmnet_shs(O) wlan(O) native_dlkm hdmi_dlkm swr_dmic_dlkm machine_dlkm platform_dlkm wsa_macro_dlkm rx_macro_dlkm hid_aksys wcd938x_dlkm wcd937x_dlkm wsa883x_dlkm tx_macro_dlkm r8168 va_macro_dlkm mbhc_dlkm bt_fm_slim wcd937x_slave_dlkm pinctrl_wcd_dlkm bolero_cdc_dlkm pinctrl_lpi_dlkm wcd9xxx_dlkm swr_ctrl_dlkm wcd938x_slave_dlkm swr_haptics_dlkm qcom_edac adsp_loader_dlkm rdbg stub_dlkm slimbus_ngd btpower slimbus rmnet_core(O) q6_dlkm rmnet_ctl(O) apr_dlkm q6_notifier_dlkm q6_pdr_dlkm snd_event_dlkm swr_dlkm wcd_core_dlkm msm_drm [last unloaded: r8125]
[ 92.300508][ T5468] CPU: 6 PID: 5468 Comm: Binder:668_2 Tainted: G S W O 5.4.147-qgki-debug #1
[ 92.300509][ T5468] Hardware name: Qualcomm Technologies, Inc. YUPIK-IOT QRD (DT)
[ 92.300511][ T5468] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 92.300513][ T5468] pc : gpio_to_desc+0xb0/0xc4
[ 92.300515][ T5468] lr : gpio_to_desc+0xac/0xc4
[ 92.300516][ T5468] sp : ffffffc02720b950
[ 92.300517][ T5468] x29: ffffffc02720b950 x28: 0000000000000000
[ 92.300519][ T5468] x27: ffffffdb5daeb860 x26: ffffffdb5d548018
[ 92.300521][ T5468] x25: ffffffdb5d9578a0 x24: ffffffdb5dd71000
[ 92.300522][ T5468] x23: 0000000000000002 x22: ffffffdb5cd3347f
[ 92.300524][ T5468] x21: ffffffac07f04080 x20: ffffffdb5daae310
[ 92.300525][ T5468] x19: 00000000fffffffe x18: ffffffc02676d0a0
[ 92.300527][ T5468] x17: 00000000fff9bb84 x16: 000000000009bb84
[ 92.300528][ T5468] x15: ffffffdb5dd712e8 x14: 0000000000000000
[ 92.300530][ T5468] x13: 0000000000000008 x12: 00000000039ce8e1
[ 92.300531][ T5468] x11: 0000000000000015 x10: 000000000682aaab
[ 92.300533][ T5468] x9 : 907912f647ba6100 x8 : 907912f647ba6100
[ 92.300535][ T5468] x7 : 0000000000000000 x6 : ffffffac33d644a0
[ 92.300537][ T5468] x5 : 0000000000000000 x4 : 0000000000000004
[ 92.300539][ T5468] x3 : ffffffc02720b5f0 x2 : ffffffdb5afb6af0
[ 92.300540][ T5468] x1 : ffffffdb5afb6af0 x0 : 0000000000000000
[ 92.300542][ T5468] Call trace:
[ 92.300544][ T5468] gpio_to_desc+0xb0/0xc4
[ 92.300549][ T5468] dwc3_msm_pm_suspend+0x6c/0x114
[ 92.300552][ T5468] platform_pm_suspend+0x44/0xd4
[ 92.300554][ T5468] dpm_run_callback+0x2b8/0x424
[ 92.300555][ T5468] __device_suspend+0x3c8/0x6ec
[ 92.300556][ T5468] dpm_suspend+0x1d8/0x600
[ 92.300558][ T5468] dpm_suspend_start+0x84/0x1bc
[ 92.300561][ T5468] suspend_devices_and_enter+0xf4/0x4b4
[ 92.300563][ T5468] enter_state+0x4a0/0x52c
[ 92.300565][ T5468] pm_suspend+0x58/0xc4
[ 92.300567][ T5468] state_store+0x124/0x158
[ 92.300571][ T5468] kobj_attr_store+0x34/0x80
[ 92.300575][ T5468] sysfs_kf_write+0x60/0xb8
[ 92.300578][ T5468] kernfs_fop_write+0x124/0x1b8
[ 92.300580][ T5468] __vfs_write+0x60/0x20c
[ 92.300582][ T5468] vfs_write+0xe4/0x1a8
[ 92.300583][ T5468] ksys_write+0x78/0xe4
[ 92.300585][ T5468] __arm64_sys_write+0x1c/0x28
[ 92.300587][ T5468] el0_svc_common+0xcc/0x1d8
[ 92.300589][ T5468] el0_svc_handler+0x74/0x98
[ 92.300591][ T5468] el0_svc+0x8/0xc
[ 92.300593][ T5468] ---[ end trace 18b985c593c6cbd9 ]---
[ 92.300596][ T5468] ------------[ cut here ]------------
[ 92.300599][ T5468] invalid GPIO -2
[ 92.300611][ T5468] WARNING: CPU: 6 PID: 5468 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xb0/0xc4
[ 92.300612][ T5468] Modules linked in: r8125 rmnet_offload(O) rmnet_shs(O) wlan(O) native_dlkm hdmi_dlkm swr_dmic_dlkm machine_dlkm platform_dlkm wsa_macro_dlkm rx_macro_dlkm hid_aksys wcd938x_dlkm wcd937x_dlkm wsa883x_dlkm tx_macro_dlkm r8168 va_macro_dlkm mbhc_dlkm bt_fm_slim wcd937x_slave_dlkm pinctrl_wcd_dlkm bolero_cdc_dlkm pinctrl_lpi_dlkm wcd9xxx_dlkm swr_ctrl_dlkm wcd938x_slave_dlkm swr_haptics_dlkm qcom_edac adsp_loader_dlkm rdbg stub_dlkm slimbus_ngd btpower slimbus rmnet_core(O) q6_dlkm rmnet_ctl(O) apr_dlkm q6_notifier_dlkm q6_pdr_dlkm snd_event_dlkm swr_dlkm wcd_core_dlkm msm_drm [last unloaded: r8125]
[ 92.300628][ T5468] CPU: 6 PID: 5468 Comm: Binder:668_2 Tainted: G S W O 5.4.147-qgki-debug #1
[ 92.300629][ T5468] Hardware name: Qualcomm Technologies, Inc. YUPIK-IOT QRD (DT)
[ 92.300630][ T5468] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 92.300632][ T5468] pc : gpio_to_desc+0xb0/0xc4
[ 92.300633][ T5468] lr : gpio_to_desc+0xac/0xc4
[ 92.300634][ T5468] sp : ffffffc02720b950
[ 92.300635][ T5468] x29: ffffffc02720b950 x28: 0000000000000000
[ 92.300637][ T5468] x27: ffffffdb5daeb860 x26: ffffffdb5d548018
[ 92.300639][ T5468] x25: ffffffdb5d9578a0 x24: ffffffdb5dd71000
[ 92.300640][ T5468] x23: 0000000000000002 x22: ffffffdb5cd3347f
[ 92.300642][ T5468] x21: ffffffac07f04080 x20: ffffffdb5daae310
[ 92.300643][ T5468] x19: 00000000fffffffe x18: ffffffc02676d0a0
[ 92.300645][ T5468] x17: 00000000fff9aecc x16: 000000000009aecc
[ 92.300647][ T5468] x15: ffffffdb5dd712e8 x14: 0000000000000000
[ 92.300649][ T5468] x13: 0000000000000008 x12: 00000000039cf48b
[ 92.300651][ T5468] x11: 0000000000000015 x10: 000000000682aaab
[ 92.300652][ T5468] x9 : 907912f647ba6100 x8 : 907912f647ba6100
[ 92.300654][ T5468] x7 : 0000000000000000 x6 : ffffffac33d65158
[ 92.300656][ T5468] x5 : 0000000000000000 x4 : 000000000000000c
[ 92.300657][ T5468] x3 : ffffffc02720b5f0 x2 : ffffffdb5afb6af0
[ 92.300659][ T5468] x1 : ffffffdb5afb6af0 x0 : 0000000000000000
[ 92.300661][ T5468] Call trace:
[ 92.300662][ T5468] gpio_to_desc+0xb0/0xc4
[ 92.300664][ T5468] dwc3_msm_pm_suspend+0x7c/0x114
[ 92.300666][ T5468] platform_pm_suspend+0x44/0xd4
[ 92.300668][ T5468] dpm_run_callback+0x2b8/0x424
[ 92.300669][ T5468] __device_suspend+0x3c8/0x6ec
[ 92.300670][ T5468] dpm_suspend+0x1d8/0x600
[ 92.300671][ T5468] dpm_suspend_start+0x84/0x1bc
[ 92.300674][ T5468] suspend_devices_and_enter+0xf4/0x4b4
[ 92.300676][ T5468] enter_state+0x4a0/0x52c
[ 92.300677][ T5468] pm_suspend+0x58/0xc4
[ 92.300680][ T5468] state_store+0x124/0x158
[ 92.300682][ T5468] kobj_attr_store+0x34/0x80
[ 92.300684][ T5468] sysfs_kf_write+0x60/0xb8
[ 92.300686][ T5468] kernfs_fop_write+0x124/0x1b8
[ 92.300688][ T5468] __vfs_write+0x60/0x20c
[ 92.300689][ T5468] vfs_write+0xe4/0x1a8
[ 92.300691][ T5468] ksys_write+0x78/0xe4
[ 92.300693][ T5468] __arm64_sys_write+0x1c/0x28
[ 92.300694][ T5468] el0_svc_common+0xcc/0x1d8
[ 92.300696][ T5468] el0_svc_handler+0x74/0x98
[ 92.300697][ T5468] el0_svc+0x8/0xc
[ 92.300698][ T5468] ---[ end trace 18b985c593c6cbda ]---
[ 92.300701][ T5468] ------------[ cut here ]------------
[ 92.300703][ T5468] invalid GPIO -2
[ 92.300712][ T5468] WARNING: CPU: 6 PID: 5468 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xb0/0xc4
[ 92.300713][ T5468] Modules linked in: r8125 rmnet_offload(O) rmnet_shs(O) wlan(O) native_dlkm hdmi_dlkm swr_dmic_dlkm machine_dlkm platform_dlkm wsa_macro_dlkm rx_macro_dlkm hid_aksys wcd938x_dlkm wcd937x_dlkm wsa883x_dlkm tx_macro_dlkm r8168 va_macro_dlkm mbhc_dlkm bt_fm_slim wcd937x_slave_dlkm pinctrl_wcd_dlkm bolero_cdc_dlkm pinctrl_lpi_dlkm wcd9xxx_dlkm swr_ctrl_dlkm wcd938x_slave_dlkm swr_haptics_dlkm qcom_edac adsp_loader_dlkm rdbg stub_dlkm slimbus_ngd btpower slimbus rmnet_core(O) q6_dlkm rmnet_ctl(O) apr_dlkm q6_notifier_dlkm q6_pdr_dlkm snd_event_dlkm swr_dlkm wcd_core_dlkm msm_drm [last unloaded: r8125]
[ 92.300729][ T5468] CPU: 6 PID: 5468 Comm: Binder:668_2 Tainted: G S W O 5.4.147-qgki-debug #1
[ 92.300730][ T5468] Hardware name: Qualcomm Technologies, Inc. YUPIK-IOT QRD (DT)
[ 92.300731][ T5468] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 92.300733][ T5468] pc : gpio_to_desc+0xb0/0xc4
[ 92.300734][ T5468] lr : gpio_to_desc+0xac/0xc4
[ 92.300735][ T5468] sp : ffffffc02720b950
[ 92.300736][ T5468] x29: ffffffc02720b950 x28: 0000000000000000
[ 92.300738][ T5468] x27: ffffffdb5daeb860 x26: ffffffdb5d548018
[ 92.300739][ T5468] x25: ffffffdb5d9578a0 x24: ffffffdb5dd71000
[ 92.300741][ T5468] x23: 0000000000000002 x22: ffffffdb5cd3347f
[ 92.300743][ T5468] x21: ffffffac07f04080 x20: ffffffdb5daae310
[ 92.300744][ T5468] x19: 00000000fffffffe x18: ffffffc02676d0a0
[ 92.300746][ T5468] x17: 00000000fff9a214 x16: 000000000009a214
[ 92.300748][ T5468] x15: ffffffdb5dd712e8 x14: 0000000000000000
[ 92.300749][ T5468] x13: 0000000000000008 x12: 00000000039cfc5e
[ 92.300751][ T5468] x11: 0000000000000015 x10: 000000000682aaab
[ 92.300752][ T5468] x9 : 907912f647ba6100 x8 : 907912f647ba6100
[ 92.300754][ T5468] x7 : 0000000000000000 x6 : ffffffac33d65e10
[ 92.300756][ T5468] x5 : 0000000000000000 x4 : 0000000000000004
[ 92.300758][ T5468] x3 : ffffffc02720b5f0 x2 : ffffffdb5afb6af0
[ 92.300762][ T5468] x1 : ffffffdb5afb6af0 x0 : 0000000000000000
[ 92.300764][ T5468] Call trace:
[ 92.300765][ T5468] gpio_to_desc+0xb0/0xc4
[ 92.300767][ T5468] dwc3_msm_pm_suspend+0x8c/0x114
[ 92.300769][ T5468] platform_pm_suspend+0x44/0xd4
[ 92.300770][ T5468] dpm_run_callback+0x2b8/0x424
[ 92.300772][ T5468] __device_suspend+0x3c8/0x6ec
[ 92.300773][ T5468] dpm_suspend+0x1d8/0x600
[ 92.300774][ T5468] dpm_suspend_start+0x84/0x1bc
[ 92.300776][ T5468] suspend_devices_and_enter+0xf4/0x4b4
[ 92.300778][ T5468] enter_state+0x4a0/0x52c
[ 92.300780][ T5468] pm_suspend+0x58/0xc4
[ 92.300781][ T5468] state_store+0x124/0x158
[ 92.300784][ T5468] kobj_attr_store+0x34/0x80
[ 92.300786][ T5468] sysfs_kf_write+0x60/0xb8
[ 92.300788][ T5468] kernfs_fop_write+0x124/0x1b8
[ 92.300790][ T5468] __vfs_write+0x60/0x20c
[ 92.300791][ T5468] vfs_write+0xe4/0x1a8
[ 92.300793][ T5468] ksys_write+0x78/0xe4
[ 92.300794][ T5468] __arm64_sys_write+0x1c/0x28
[ 92.300796][ T5468] el0_svc_common+0xcc/0x1d8
[ 92.300797][ T5468] el0_svc_handler+0x74/0x98
[ 92.300799][ T5468] el0_svc+0x8/0xc
[ 92.300799][ T5468] ---[ end trace 18b985c593c6cbdb ]---
[ 92.301027][ T5468] msm-dwc3 8c00000.hsusb: DWC3 in low power mode
[ 92.302925][ T5478] sd 0:0:0:5: [sdf] Synchronizing SCSI cache
[ 92.303752][ T346] sd 0:0:0:4: [sde] Synchronizing SCSI cache
[ 92.304139][ T5475] sd 0:0:0:3: [sdd] Synchronizing SCSI cache
[ 92.304246][ T5474] sd 0:0:0:2: [sdc] Synchronizing SCSI cache
[ 92.304475][ T322] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 92.304688][ T5479] sd 0:0:0:1: [sdb] Synchronizing SCSI cache
[ 92.444394][ T5478] msm_pcie_disable: PCIe: Assert the reset of endpoint of RC1.
[ 92.446201][ T5478] pci-msm-rc 0001:00:00.0: msm_pcie_fixup_suspend+0x0/0x4 took 102043 usecs
[ 92.450163][ T0] suspend ns: 92450160853 suspend cycles: 2393430803
[ 92.450160][ T0] resume cycles: 2485622962
[ 92.451365][ T5468] PM: PM: Pending Wakeup Sources: [timerfd]
[ 92.454690][ T5483] msm_pcie_enable: PCIe: Assert the reset of endpoint of RC1.
[ 92.460079][ T5483] msm_pcie_enable: PCIe: RC1: PCIE20_PARF_INT_ALL_MASK: 0x7f80c202
[ 92.462987][ T5483] pcie_phy_init: PCIe RC1 PHY is ready!
[ 92.468935][ T5470] pci-msm-rc 0000:00:00.0: Refused to change power state, currently in D3
[ 92.473161][ T5483] msm_pcie_enable: PCIe: Release the reset of endpoint of RC1.
[ 92.522119][ T5483] msm_pcie_link_train: PCIe RC1 link initialized
[ 92.523441][ T5483] pci-msm-rc 0001:00:00.0: msm_pcie_fixup_resume_early+0x0/0x4 took 67218 usecs
[ 92.542995][ T5468] spmi spmi-0: pmic_arb_wait_for_done: transaction failed (0x3)
[ 92.543010][ T5468] spmi spmi-0: failed irqchip transaction on 125
[ 92.543052][ T5468] spmi spmi-0: pmic_arb_wait_for_done: transaction failed (0x3)
[ 92.543061][ T5468] spmi spmi-0: failed irqchip transaction on 126
[ 92.543103][ T5468] spmi spmi-0: pmic_arb_wait_for_done: transaction failed (0x3)
[ 92.543112][ T5468] spmi spmi-0: failed irqchip transaction on 127
[ 92.574275][ T128] yjc usb_extcon_detect_cable id=1,vbus=0
[ 92.591585][ T5475] pci-msm-rc 0000:00:00.0: Refused to change power state, currently in D3
[ 92.592928][ T7] yjc usb_extcon_detect_cable id=1,vbus=0
[ 92.602758][ T5468] ------------[ cut here ]------------
[ 92.602777][ T5468] invalid GPIO -2
[ 92.602861][ T5468] WARNING: CPU: 3 PID: 5468 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xb0/0xc4
[ 92.602867][ T5468] Modules linked in: r8125 rmnet_offload(O) rmnet_shs(O) wlan(O) native_dlkm hdmi_dlkm swr_dmic_dlkm machine_dlkm platform_dlkm wsa_macro_dlkm rx_macro_dlkm hid_aksys wcd938x_dlkm wcd937x_dlkm wsa883x_dlkm tx_macro_dlkm r8168 va_macro_dlkm mbhc_dlkm bt_fm_slim wcd937x_slave_dlkm pinctrl_wcd_dlkm bolero_cdc_dlkm pinctrl_lpi_dlkm wcd9xxx_dlkm swr_ctrl_dlkm wcd938x_slave_dlkm swr_haptics_dlkm qcom_edac adsp_loader_dlkm rdbg stub_dlkm slimbus_ngd btpower slimbus rmnet_core(O) q6_dlkm rmnet_ctl(O) apr_dlkm q6_notifier_dlkm q6_pdr_dlkm snd_event_dlkm swr_dlkm wcd_core_dlkm msm_drm [last unloaded: r8125]
[ 92.603007][ T5468] CPU: 3 PID: 5468 Comm: Binder:668_2 Tainted: G S W O 5.4.147-qgki-debug #1
[ 92.603013][ T5468] Hardware name: Qualcomm Technologies, Inc. YUPIK-IOT QRD (DT)
[ 92.603024][ T5468] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 92.603033][ T5468] pc : gpio_to_desc+0xb0/0xc4
[ 92.603042][ T5468] lr : gpio_to_desc+0xac/0xc4
[ 92.603048][ T5468] sp : ffffffc02720b9b0
[ 92.603054][ T5468] x29: ffffffc02720b9b0 x28: 0000000000000000
[ 92.603064][ T5468] x27: ffffffac351ca010 x26: ffffffdb5d548018
[ 92.603073][ T5468] x25: ffffffdb5d9578a0 x24: ffffffdb5dd71000
[ 92.603083][ T5468] x23: 0000000000000010 x22: ffffffdb5cd3347f
[ 92.603093][ T5468] x21: ffffffac07f04080 x20: ffffffdb5daae310
[ 92.603102][ T5468] x19: 00000000fffffffe x18: ffffffc02676d098
[ 92.603112][ T5468] x17: 00000000fff98aec x16: 0000000000098aec
[ 92.603122][ T5468] x15: ffffffdb5dd712e8 x14: 0000000000000000
[ 92.603131][ T5468] x13: 000000000000000a x12: 00000000002cb74a
[ 92.603141][ T5468] x11: 0000000000000015 x10: 000000000682aaab
[ 92.603150][ T5468] x9 : 907912f647ba6100 x8 : 907912f647ba6100
[ 92.603159][ T5468] x7 : 0000000000000000 x6 : ffffffac33d67538
[ 92.603168][ T5468] x5 : 0000000000000000 x4 : 000000000000000c
[ 92.603177][ T5468] x3 : ffffffc02720b650 x2 : ffffffdb5afb6af0
[ 92.603186][ T5468] x1 : ffffffdb5afb6af0 x0 : 0000000000000000
[ 92.603196][ T5468] Call trace:
[ 92.603205][ T5468] gpio_to_desc+0xb0/0xc4
[ 92.603221][ T5468] dwc3_msm_pm_resume+0x6c/0x11c
[ 92.603234][ T5468] platform_pm_resume+0x80/0xbc
[ 92.603244][ T5468] dpm_run_callback+0x2b8/0x424
[ 92.603257][ T5468] device_resume+0x21c/0x238
[ 92.603266][ T5468] dpm_resume+0x200/0x610
[ 92.603280][ T5468] suspend_devices_and_enter+0x1e8/0x4b4
[ 92.603290][ T5468] enter_state+0x4a0/0x52c
[ 92.603298][ T5468] pm_suspend+0x58/0xc4
[ 92.603308][ T5468] state_store+0x124/0x158
[ 92.603323][ T5468] kobj_attr_store+0x34/0x80
[ 92.603338][ T5468] sysfs_kf_write+0x60/0xb8
[ 92.603349][ T5468] kernfs_fop_write+0x124/0x1b8
[ 92.603360][ T5468] __vfs_write+0x60/0x20c
[ 92.603368][ T5468] vfs_write+0xe4/0x1a8
[ 92.603378][ T5468] ksys_write+0x78/0xe4
[ 92.603386][ T5468] __arm64_sys_write+0x1c/0x28
[ 92.603398][ T5468] el0_svc_common+0xcc/0x1d8
[ 92.603407][ T5468] el0_svc_handler+0x74/0x98
[ 92.603418][ T5468] el0_svc+0x8/0xc
[ 92.603424][ T5468] ---[ end trace 18b985c593c6cbdc ]---
[ 92.603441][ T5468] ------------[ cut here ]------------
[ 92.603459][ T5468] invalid GPIO -2
[ 92.603530][ T5468] WARNING: CPU: 3 PID: 5468 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xb0/0xc4
[ 92.603534][ T5468] Modules linked in: r8125 rmnet_offload(O) rmnet_shs(O) wlan(O) native_dlkm hdmi_dlkm swr_dmic_dlkm machine_dlkm platform_dlkm wsa_macro_dlkm rx_macro_dlkm hid_aksys wcd938x_dlkm wcd937x_dlkm wsa883x_dlkm tx_macro_dlkm r8168 va_macro_dlkm mbhc_dlkm bt_fm_slim wcd937x_slave_dlkm pinctrl_wcd_dlkm bolero_cdc_dlkm pinctrl_lpi_dlkm wcd9xxx_dlkm swr_ctrl_dlkm wcd938x_slave_dlkm swr_haptics_dlkm qcom_edac adsp_loader_dlkm rdbg stub_dlkm slimbus_ngd btpower slimbus rmnet_core(O) q6_dlkm rmnet_ctl(O) apr_dlkm q6_notifier_dlkm q6_pdr_dlkm snd_event_dlkm swr_dlkm wcd_core_dlkm msm_drm [last unloaded: r8125]
[ 92.603640][ T5468] CPU: 3 PID: 5468 Comm: Binder:668_2 Tainted: G S W O 5.4.147-qgki-debug #1
[ 92.603646][ T5468] Hardware name: Qualcomm Technologies, Inc. YUPIK-IOT QRD (DT)
[ 92.603653][ T5468] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 92.603662][ T5468] pc : gpio_to_desc+0xb0/0xc4
[ 92.603670][ T5468] lr : gpio_to_desc+0xac/0xc4
[ 92.603675][ T5468] sp : ffffffc02720b9b0
[ 92.603681][ T5468] x29: ffffffc02720b9b0 x28: 0000000000000000
[ 92.603690][ T5468] x27: ffffffac351ca010 x26: ffffffdb5d548018
[ 92.603700][ T5468] x25: ffffffdb5d9578a0 x24: ffffffdb5dd71000
[ 92.603709][ T5468] x23: 0000000000000010 x22: ffffffdb5cd3347f
[ 92.603718][ T5468] x21: ffffffac07f04080 x20: ffffffdb5daae310
[ 92.603728][ T5468] x19: 00000000fffffffe x18: ffffffc02676d098
[ 92.603737][ T5468] x17: 00000000fff97e6c x16: 0000000000097e6c
[ 92.603747][ T5468] x15: ffffffdb5dd712e8 x14: 0000000000000000
[ 92.603756][ T5468] x13: 000000000000000a x12: 00000000002cea6c
[ 92.603766][ T5468] x11: 0000000000000015 x10: 000000000682aaab
[ 92.603775][ T5468] x9 : 907912f647ba6100 x8 : 907912f647ba6100
[ 92.603784][ T5468] x7 : 0000000000000000 x6 : ffffffac33d681b8
[ 92.603793][ T5468] x5 : 0000000000000000 x4 : 000000000000000c
[ 92.603802][ T5468] x3 : ffffffc02720b650 x2 : ffffffdb5afb6af0
[ 92.603811][ T5468] x1 : ffffffdb5afb6af0 x0 : 0000000000000000
[ 92.603820][ T5468] Call trace:
[ 92.603829][ T5468] gpio_to_desc+0xb0/0xc4
[ 92.603839][ T5468] dwc3_msm_pm_resume+0x7c/0x11c
[ 92.603849][ T5468] platform_pm_resume+0x80/0xbc
[ 92.603857][ T5468] dpm_run_callback+0x2b8/0x424
[ 92.603866][ T5468] device_resume+0x21c/0x238
[ 92.603875][ T5468] dpm_resume+0x200/0x610
[ 92.603885][ T5468] suspend_devices_and_enter+0x1e8/0x4b4
[ 92.603893][ T5468] enter_state+0x4a0/0x52c
[ 92.603902][ T5468] pm_suspend+0x58/0xc4
[ 92.603911][ T5468] state_store+0x124/0x158
[ 92.603921][ T5468] kobj_attr_store+0x34/0x80
[ 92.603932][ T5468] sysfs_kf_write+0x60/0xb8
[ 92.603941][ T5468] kernfs_fop_write+0x124/0x1b8
[ 92.603950][ T5468] __vfs_write+0x60/0x20c
[ 92.603958][ T5468] vfs_write+0xe4/0x1a8
[ 92.603966][ T5468] ksys_write+0x78/0xe4
[ 92.603975][ T5468] __arm64_sys_write+0x1c/0x28
[ 92.603983][ T5468] el0_svc_common+0xcc/0x1d8
[ 92.603991][ T5468] el0_svc_handler+0x74/0x98
[ 92.603999][ T5468] el0_svc+0x8/0xc
[ 92.604005][ T5468] ---[ end trace 18b985c593c6cbdd ]---
[ 92.604020][ T5468] ------------[ cut here ]------------
[ 92.604038][ T5468] invalid GPIO -2
[ 92.604108][ T5468] WARNING: CPU: 3 PID: 5468 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xb0/0xc4
[ 92.604112][ T5468] Modules linked in: r8125 rmnet_offload(O) rmnet_shs(O) wlan(O) native_dlkm hdmi_dlkm swr_dmic_dlkm machine_dlkm platform_dlkm wsa_macro_dlkm rx_macro_dlkm hid_aksys wcd938x_dlkm wcd937x_dlkm wsa883x_dlkm tx_macro_dlkm r8168 va_macro_dlkm mbhc_dlkm bt_fm_slim wcd937x_slave_dlkm pinctrl_wcd_dlkm bolero_cdc_dlkm pinctrl_lpi_dlkm wcd9xxx_dlkm swr_ctrl_dlkm wcd938x_slave_dlkm swr_haptics_dlkm qcom_edac adsp_loader_dlkm rdbg stub_dlkm slimbus_ngd btpower slimbus rmnet_core(O) q6_dlkm rmnet_ctl(O) apr_dlkm q6_notifier_dlkm q6_pdr_dlkm snd_event_dlkm swr_dlkm wcd_core_dlkm msm_drm [last unloaded: r8125]
[ 92.604216][ T5468] CPU: 3 PID: 5468 Comm: Binder:668_2 Tainted: G S W O 5.4.147-qgki-debug #1
[ 92.604223][ T5468] Hardware name: Qualcomm Technologies, Inc. YUPIK-IOT QRD (DT)
[ 92.604231][ T5468] pstate: 60400005 (nZCv daif +PAN -UAO)
[ 92.604239][ T5468] pc : gpio_to_desc+0xb0/0xc4
[ 92.604247][ T5468] lr : gpio_to_desc+0xac/0xc4
[ 92.604252][ T5468] sp : ffffffc02720b9b0
[ 92.604258][ T5468] x29: ffffffc02720b9b0 x28: 0000000000000000
[ 92.604269][ T5468] x27: ffffffac351ca010 x26: ffffffdb5d548018
[ 92.604279][ T5468] x25: ffffffdb5d9578a0 x24: ffffffdb5dd71000
[ 92.604288][ T5468] x23: 0000000000000010 x22: ffffffdb5cd3347f
[ 92.604298][ T5468] x21: ffffffac07f04080 x20: ffffffdb5daae310
[ 92.604307][ T5468] x19: 00000000fffffffe x18: ffffffc02676d098
[ 92.604316][ T5468] x17: 00000000fff971ec x16: 00000000000971ec
[ 92.604325][ T5468] x15: ffffffdb5dd712e8 x14: 0000000000000000
[ 92.604334][ T5468] x13: 000000000000000a x12: 00000000002d15d6
[ 92.604343][ T5468] x11: 0000000000000015 x10: 000000000682aaab
[ 92.604353][ T5468] x9 : 907912f647ba6100 x8 : 907912f647ba6100
[ 92.604362][ T5468] x7 : 0000000000000000 x6 : ffffffac33d68e38
[ 92.604371][ T5468] x5 : 0000000000000000 x4 : 000000000000000c
[ 92.604381][ T5468] x3 : ffffffc02720b650 x2 : ffffffdb5afb6af0
[ 92.604390][ T5468] x1 : ffffffdb5afb6af0 x0 : 0000000000000000
[ 92.604398][ T5468] Call trace:
[ 92.604407][ T5468] gpio_to_desc+0xb0/0xc4
[ 92.604418][ T5468] dwc3_msm_pm_resume+0x8c/0x11c
[ 92.604427][ T5468] platform_pm_resume+0x80/0xbc
[ 92.604435][ T5468] dpm_run_callback+0x2b8/0x424
[ 92.604444][ T5468] device_resume+0x21c/0x238
[ 92.604454][ T5468] dpm_resume+0x200/0x610
[ 92.604464][ T5468] suspend_devices_and_enter+0x1e8/0x4b4
[ 92.604473][ T5468] enter_state+0x4a0/0x52c
[ 92.604481][ T5468] pm_suspend+0x58/0xc4
[ 92.604491][ T5468] state_store+0x124/0x158
[ 92.604502][ T5468] kobj_attr_store+0x34/0x80
[ 92.604512][ T5468] sysfs_kf_write+0x60/0xb8
[ 92.604521][ T5468] kernfs_fop_write+0x124/0x1b8
[ 92.604530][ T5468] __vfs_write+0x60/0x20c
[ 92.604539][ T5468] vfs_write+0xe4/0x1a8
[ 92.604547][ T5468] ksys_write+0x78/0xe4
[ 92.604555][ T5468] __arm64_sys_write+0x1c/0x28
[ 92.604563][ T5468] el0_svc_common+0xcc/0x1d8
[ 92.604570][ T5468] el0_svc_handler+0x74/0x98
[ 92.604578][ T5468] el0_svc+0x8/0xc
[ 92.604584][ T5468] ---[ end trace 18b985c593c6cbde ]---
[ 92.605103][ T5468] msm-dwc3 8c00000.hsusb: DWC3 exited from low power mode
[ 92.688864][ T322] [kworke][0x946d856d][08:15:59.401628] wlan: [322:E:QDF] cds_get_context: Module ID 61 context is Null
[ 93.877621][ C2] rimps-log 18509c00.qcom,rimps_log: global buffer full dropping buffers
[ 93.882718][ T5468] OOM killer enabled.
[ 94.019587][ C2] rimps-log 18509c00.qcom,rimps_log: global buffer full dropping buffers
[ 94.025466][ T5468] Restarting tasks ... done.
[ 94.045437][ T336] msm-dwc3 a600000.ssusb: Could not get usb psy
[ 94.050305][ T5468] Abort: Pending Wakeup Sources: [timerfd]
[ 94.050308][ T5468] PM: suspend exit
[ 94.114619][ T602] type=1400 audit(1660292160.818:390): avc: denied { read } for comm="Binder:668_2" name="wakeup4" dev="sysfs" ino=54692 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 94.116467][ T673] audit: audit_lost=132 audit_rate_limit=5 audit_backlog_limit=64
[ 94.116470][ T673] audit: rate limit exceeded
[ 94.156725][ C7] ALERT: changing window size from 16000000 to 20000000 at 94148055171
[ 94.187907][ T1055] [drm:sde_rm_reserve] [sde error]poll timeout cur -1 nxt 6 enc 53
[ 94.194455][ T602] type=1400 audit(1660292160.822:391): avc: denied { read } for comm="Binder:668_2" name="wakeup28" dev="sysfs" ino=75472 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 94.200963][ T1055] [drm:_sde_encoder_atomic_check_reserve:933] [sde error]enc53 RM failed to reserve resources, rc = -22
[ 94.940985][ T602] type=1400 audit(1660292160.822:392): avc: denied { read } for comm="Binder:668_2" name="wakeup18" dev="sysfs" ino=72493 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 94.962030][ T602] type=1400 audit(1660292160.822:393): avc: denied { read } for comm="Binder:668_2" name="wakeup46" dev="sysfs" ino=95114 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 94.982778][ T602] type=1400 audit(1660292160.822:394): avc: denied { read } for comm="Binder:668_2" name="wakeup2" dev="sysfs" ino=54638 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 95.229606][ T5558] msm-dwc3 8c00000.hsusb: DWC3 in low power mode
[ 97.794084][ T486] sd 0:0:0:5: [sdf] Synchronizing SCSI cache
[ 97.801324][ T5558] sd 0:0:0:4: [sde] Synchronizing SCSI cache
[ 97.809605][ T338] sd 0:0:0:3: [sdd] Synchronizing SCSI cache
[ 97.816599][ T62] sd 0:0:0:2: [sdc] Synchronizing SCSI cache
[ 97.823343][ T338] sd 0:0:0:1: [sdb] Synchronizing SCSI cache
[ 97.830337][ T62] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 102.123054][ T346] (virq:irq_count)- 3:89090 15:22376 25:14687 10:6950 371:5084 386:1773 227:1641 359:1630 19:1571 20:1410
[ 102.134973][ T346] (cpu:irq_count)- 0:57066 1:18479 2:18360 3:27746 4:6860 5:8092 6:8024 7:8300
[ 102.144439][ T346] (ipi:irq_count)- 0:148033 1:73687 2:0 3:0 4:0 5:63078 6:0
[ 103.098656][ T602] type=1400 audit(1660292169.806:436): avc: denied { read } for comm="Binder:668_2" name="wakeup4" dev="sysfs" ino=54692 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 103.117815][ T673] audit: audit_lost=173 audit_rate_limit=5 audit_backlog_limit=64
[ 103.119275][ T602] type=1400 audit(1660292169.814:437): avc: denied { read } for comm="Binder:668_2" name="wakeup28" dev="sysfs" ino=75472 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 103.126838][ T673] audit: rate limit exceeded
[ 103.152087][ T602] type=1400 audit(1660292169.822:438): avc: denied { read } for comm="Binder:668_2" name="wakeup18" dev="sysfs" ino=72493 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 103.172852][ T602] type=1400 audit(1660292169.822:439): avc: denied { read } for comm="Binder:668_2" name="wakeup46" dev="sysfs" ino=95114 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 103.193399][ T602] type=1400 audit(1660292169.822:440): avc: denied { read } for comm="Binder:668_2" name="wakeup2" dev="sysfs" ino=54638 scontext=u:r:system_suspend:s0 tcontext=u:object_r:sysfs:s0 tclass=dir permissive=0
[ 103.236733][ C5] ALERT: changing window size from 20000000 to 16000000 at 103228061366
DEBUG:
1.关于屏调试的打印log:
echo 8 > /proc/sys/kernel/printk
echo ‘file dsi* +p’ > /sys/kernel/debug/dynamic_debug/control
cat /sys/kernel/debug/dri/0/debug/dump
cat /d/regulator
kodiak:/d/regulator/18200000.rsc:rpmh-regulator-ldoc12-pm8350c_l12 # cat
consumers
kodiak:/d/regulator/18200000.rsc:rpmh-regulator-ldoc13-pm8350c_l13 # cat
consumers
2.根据log发现唤醒失败时堵塞在这里,因此跳过:
kernel/msm-5.4/techpack/display/msm/sde/sde_rm.c
int sde_rm_reserve(
struct sde_rm *rm,
struct drm_encoder *enc,
struct drm_crtc_state *crtc_state,
struct drm_connector_state *conn_state,
bool test_only)
{
struct sde_rm_rsvp *rsvp_cur, *rsvp_nxt;
struct sde_rm_requirements reqs = {0,};
struct msm_drm_private *priv;
struct sde_kms *sde_kms;
struct msm_compression_info *comp_info;
int ret = 0;
if (!rm || !enc || !crtc_state || !conn_state) {
SDE_ERROR("invalid arguments\n");
return -EINVAL;
}
if (!enc->dev || !enc->dev->dev_private) {
SDE_ERROR("drm device invalid\n");
return -EINVAL;
}
priv = enc->dev->dev_private;
if (!priv->kms) {
SDE_ERROR("invalid kms\n");
return -EINVAL;
}
sde_kms = to_sde_kms(priv->kms);
/* Check if this is just a page-flip */
if (!_sde_rm_is_display_in_cont_splash(sde_kms, enc) &&
!drm_atomic_crtc_needs_modeset(crtc_state))
return 0;
comp_info = kzalloc(sizeof(*comp_info), GFP_KERNEL);
if (!comp_info)
return -ENOMEM;
SDE_DEBUG("reserving hw for conn %d enc %d crtc %d test_only %d\n",
conn_state->connector->base.id, enc->base.id,
crtc_state->crtc->base.id, test_only);
SDE_EVT32(enc->base.id, conn_state->connector->base.id);
mutex_lock(&rm->rm_lock);
_sde_rm_print_rsvps(rm, SDE_RM_STAGE_BEGIN);
rsvp_cur = _sde_rm_get_rsvp_cur(rm, enc);
rsvp_nxt = _sde_rm_get_rsvp_nxt(rm, enc);
/*
* RM currently relies on rsvp_nxt assigned to the hw blocks to
* commit rsvps. This rsvp_nxt can be cleared by a back to back
* check_only commit with modeset when its predecessor atomic
* commit is delayed / not committed the reservation yet.
* Poll for rsvp_nxt clear, allow the check_only commit if rsvp_nxt
* gets cleared and bailout if it does not get cleared before timeout.
*/
if (test_only && rsvp_nxt) {
rsvp_nxt = _sde_rm_poll_get_rsvp_nxt_locked(rm, enc);
rsvp_cur = _sde_rm_get_rsvp_cur(rm, enc);
if (rsvp_nxt) {
SDE_ERROR("poll timeout cur %d nxt %d enc %d\n",
(rsvp_cur) ? rsvp_cur->seq : -1,
rsvp_nxt->seq, enc->base.id);
SDE_EVT32(enc->base.id, (rsvp_cur) ? rsvp_cur->seq : -1,
rsvp_nxt->seq, SDE_EVTLOG_ERROR);
//modify by zh
//ret = -EINVAL;
//goto end;
//modify by zh end
}
}
if (!test_only && rsvp_nxt)
goto commit_rsvp;
reqs.hw_res.comp_info = comp_info;
ret = _sde_rm_populate_requirements(rm, enc, crtc_state,
conn_state, &reqs);
if (ret) {
SDE_ERROR("failed to populate hw requirements\n");
goto end;
}