Open spasswolf opened 7 months ago
Cherry-picked the ipa_legacy patches on top of this branch, no luck so far:
[ 20.449796] platform 7940000.ipa: deferred probe pending
[ 20.449868] qnoc-msm8953 400000.interconnect: sync_state() pending due to 7940000.ipa
[ 20.454926] qnoc-msm8953 580000.interconnect: sync_state() pending due to 7940000.ipa
[ 20.463382] psci-cpuidle-domain psci: sync_state() pending due to 7940000.ipa
Edit: For testing purposes I pulled in the old ipa v2 patches (which have been rebased to 6.6.0 in my msm8953_v6.6_2 branch where they are working) and got a similar result:
[ 19.939841] platform 7940000.ipa: deferred probe pending
[ 19.940032] psci-cpuidle-domain psci: sync_state() pending due to 7940000.ipa
Edit2: So it seems that doe to some issue ipa_probe is not even called here.
Or you get -EPROBE_DEFER, if you want verbose messages CONFIG_DEBUG_DRIVER can be quite useful
No, I inserted a printk at the top of ipa_probe which does not show up in dmesg. Trying CONFIG_DEBUG_DRIVER next.
Tested with CONFIG_DEBUG_DRIVER=y and ipa legacy patch, the probe deferral seems to be caused by cpr:
$ dmesg | grep ipa
[ 3.026885] bus: 'platform': add driver ipa
[ 3.027142] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 3.027209] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 3.027269] platform 7940000.ipa: Added to deferred list
[ 7.547264] devices_kset: Moving 7940000.ipa to end of list
[ 7.547662] PM: Moving platform:7940000.ipa to end of list
[ 7.547677] platform 7940000.ipa: Retrying from deferred list
[ 7.548124] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.548159] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.548179] platform 7940000.ipa: Added to deferred list
[ 7.653832] devices_kset: Moving 7940000.ipa to end of list
[ 7.653862] PM: Moving platform:7940000.ipa to end of list
[ 7.653882] platform 7940000.ipa: Retrying from deferred list
[ 7.654464] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.654510] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.654534] platform 7940000.ipa: Added to deferred list
[ 7.684795] devices_kset: Moving 7940000.ipa to end of list
[ 7.684809] PM: Moving platform:7940000.ipa to end of list
[ 7.684820] platform 7940000.ipa: Retrying from deferred list
[ 7.685314] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.685354] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.685377] platform 7940000.ipa: Added to deferred list
[ 7.709385] devices_kset: Moving 7940000.ipa to end of list
[ 7.709404] PM: Moving platform:7940000.ipa to end of list
[ 7.709417] platform 7940000.ipa: Retrying from deferred list
[ 7.709967] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.710009] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.710031] platform 7940000.ipa: Added to deferred list
[ 7.743706] devices_kset: Moving 7940000.ipa to end of list
[ 7.743729] PM: Moving platform:7940000.ipa to end of list
[ 7.743743] platform 7940000.ipa: Retrying from deferred list
[ 7.762657] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.762721] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.762756] platform 7940000.ipa: Added to deferred list
[ 7.795573] devices_kset: Moving 7940000.ipa to end of list
[ 7.795584] PM: Moving platform:7940000.ipa to end of list
[ 7.795595] platform 7940000.ipa: Retrying from deferred list
[ 7.796108] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.796145] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.796167] platform 7940000.ipa: Added to deferred list
[ 7.895810] devices_kset: Moving 7940000.ipa to end of list
[ 7.895825] PM: Moving platform:7940000.ipa to end of list
[ 7.895836] platform 7940000.ipa: Retrying from deferred list
[ 7.896362] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.896396] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.896416] platform 7940000.ipa: Added to deferred list
[ 7.938019] devices_kset: Moving 7940000.ipa to end of list
[ 7.938031] PM: Moving platform:7940000.ipa to end of list
[ 7.938046] platform 7940000.ipa: Retrying from deferred list
[ 7.938897] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.938949] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.939024] platform 7940000.ipa: Added to deferred list
[ 7.958288] devices_kset: Moving 7940000.ipa to end of list
[ 7.958300] PM: Moving platform:7940000.ipa to end of list
[ 7.958315] platform 7940000.ipa: Retrying from deferred list
[ 7.959060] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.959116] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.959151] platform 7940000.ipa: Added to deferred list
[ 7.983568] devices_kset: Moving 7940000.ipa to end of list
[ 7.983587] PM: Moving platform:7940000.ipa to end of list
[ 7.983602] platform 7940000.ipa: Retrying from deferred list
[ 7.984427] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 7.984491] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 7.984527] platform 7940000.ipa: Added to deferred list
[ 8.005424] devices_kset: Moving 7940000.ipa to end of list
[ 8.005432] PM: Moving platform:7940000.ipa to end of list
[ 8.005442] platform 7940000.ipa: Retrying from deferred list
[ 8.005902] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.005938] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.005959] platform 7940000.ipa: Added to deferred list
[ 8.017872] devices_kset: Moving 7940000.ipa to end of list
[ 8.017881] PM: Moving platform:7940000.ipa to end of list
[ 8.017890] platform 7940000.ipa: Retrying from deferred list
[ 8.018358] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.018399] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.018420] platform 7940000.ipa: Added to deferred list
[ 8.037707] devices_kset: Moving 7940000.ipa to end of list
[ 8.037723] PM: Moving platform:7940000.ipa to end of list
[ 8.037740] platform 7940000.ipa: Retrying from deferred list
[ 8.038491] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.038543] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.038576] platform 7940000.ipa: Added to deferred list
[ 8.049119] devices_kset: Moving 7940000.ipa to end of list
[ 8.049127] PM: Moving platform:7940000.ipa to end of list
[ 8.049137] platform 7940000.ipa: Retrying from deferred list
[ 8.049649] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.049685] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.049710] platform 7940000.ipa: Added to deferred list
[ 8.059453] devices_kset: Moving 7940000.ipa to end of list
[ 8.059467] PM: Moving platform:7940000.ipa to end of list
[ 8.059482] platform 7940000.ipa: Retrying from deferred list
[ 8.060390] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.060446] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.060477] platform 7940000.ipa: Added to deferred list
[ 8.089094] devices_kset: Moving 7940000.ipa to end of list
[ 8.089117] PM: Moving platform:7940000.ipa to end of list
[ 8.089134] platform 7940000.ipa: Retrying from deferred list
[ 8.090056] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.090152] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.090199] platform 7940000.ipa: Added to deferred list
[ 8.093504] devices_kset: Moving 7940000.ipa to end of list
[ 8.093513] PM: Moving platform:7940000.ipa to end of list
[ 8.093524] platform 7940000.ipa: Retrying from deferred list
[ 8.094378] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.094430] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.094456] platform 7940000.ipa: Added to deferred list
[ 8.106897] devices_kset: Moving 7940000.ipa to end of list
[ 8.106906] PM: Moving platform:7940000.ipa to end of list
[ 8.106915] platform 7940000.ipa: Retrying from deferred list
[ 8.107378] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.107413] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.107434] platform 7940000.ipa: Added to deferred list
[ 8.249805] devices_kset: Moving 7940000.ipa to end of list
[ 8.249814] PM: Moving platform:7940000.ipa to end of list
[ 8.249823] platform 7940000.ipa: Retrying from deferred list
[ 8.250280] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.250318] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.250339] platform 7940000.ipa: Added to deferred list
[ 8.258579] devices_kset: Moving 7940000.ipa to end of list
[ 8.258602] PM: Moving platform:7940000.ipa to end of list
[ 8.258618] platform 7940000.ipa: Retrying from deferred list
[ 8.259437] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.259496] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.259528] platform 7940000.ipa: Added to deferred list
[ 8.261553] devices_kset: Moving 7940000.ipa to end of list
[ 8.261561] PM: Moving platform:7940000.ipa to end of list
[ 8.261570] platform 7940000.ipa: Retrying from deferred list
[ 8.262017] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.262055] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.262076] platform 7940000.ipa: Added to deferred list
[ 8.375413] devices_kset: Moving 7940000.ipa to end of list
[ 8.375428] PM: Moving platform:7940000.ipa to end of list
[ 8.375442] platform 7940000.ipa: Retrying from deferred list
[ 8.392290] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 8.392338] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 8.392361] platform 7940000.ipa: Added to deferred list
[ 10.469793] devices_kset: Moving 7940000.ipa to end of list
[ 10.469809] PM: Moving platform:7940000.ipa to end of list
[ 10.469825] platform 7940000.ipa: Retrying from deferred list
[ 10.470726] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 10.470788] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 10.470821] platform 7940000.ipa: Added to deferred list
[ 10.484674] devices_kset: Moving 7940000.ipa to end of list
[ 10.484687] PM: Moving platform:7940000.ipa to end of list
[ 10.484701] platform 7940000.ipa: Retrying from deferred list
[ 10.485552] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 10.485619] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 10.485653] platform 7940000.ipa: Added to deferred list
[ 11.116137] devices_kset: Moving 7940000.ipa to end of list
[ 11.116149] PM: Moving platform:7940000.ipa to end of list
[ 11.116158] platform 7940000.ipa: Retrying from deferred list
[ 11.116851] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 11.116898] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 11.116919] platform 7940000.ipa: Added to deferred list
[ 11.120882] devices_kset: Moving 7940000.ipa to end of list
[ 11.120892] PM: Moving platform:7940000.ipa to end of list
[ 11.120906] platform 7940000.ipa: Retrying from deferred list
[ 11.122557] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 11.122617] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 11.122642] platform 7940000.ipa: Added to deferred list
[ 13.811900] devices_kset: Moving 7940000.ipa to end of list
[ 13.811915] PM: Moving platform:7940000.ipa to end of list
[ 13.811932] platform 7940000.ipa: Retrying from deferred list
[ 13.812928] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 13.813008] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 13.813047] platform 7940000.ipa: Added to deferred list
[ 13.830489] devices_kset: Moving 7940000.ipa to end of list
[ 13.830502] PM: Moving platform:7940000.ipa to end of list
[ 13.830519] platform 7940000.ipa: Retrying from deferred list
[ 13.831381] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 13.831450] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 13.831485] platform 7940000.ipa: Added to deferred list
[ 14.654372] Modules linked in: q6asm_dai q6voice_dai q6routing q6voice q6afe_clocks q6afe_dai q6asm q6adm q6mvm q6cvp q6cvs snd_q6dsp_common q6voice_common q6afe venus_dec venus_enc videobuf2_dma_contig q6core videobuf2_memops snd_soc_msm8916_digital venus_core v4l2_mem2mem snd_soc_core videobuf2_v4l2 snd_compress snd_pcm videobuf2_common snd_timer qcom_q6v5_mss qcom_wcnss_pil qcom_q6v5_pas videodev snd qcom_q6v5 qcom_pil_info mc soundcore qcom_sysmon ipa_legacy qcom_common
[ 18.400465] platform 7940000.ipa: Relaxing link with cpu-perf-opp-table
[ 18.400673] devices_kset: Moving 7940000.ipa to end of list
[ 18.400687] PM: Moving platform:7940000.ipa to end of list
[ 18.400701] platform 7940000.ipa: Retrying from deferred list
[ 18.401550] bus: 'platform': __driver_probe_device: matched device 7940000.ipa with driver ipa
[ 18.401604] platform 7940000.ipa: error -EPROBE_DEFER: wait for supplier /cpr-opp-table/opp-18048
[ 18.401635] platform 7940000.ipa: Added to deferred list
[ 18.401680] platform 7940000.ipa: deferred probe pending
[ 18.401753] qnoc-msm8953 400000.interconnect: sync_state() pending due to 7940000.ipa
[ 18.406811] qnoc-msm8953 580000.interconnect: sync_state() pending due to 7940000.ipa
[ 18.415300] psci-cpuidle-domain psci: sync_state() pending due to 7940000.ipa
There seems to be a problem with the cpr init here ...
EDIT: No cpr init seems to work, but the messages did not show up because of the overly verbose CONFIG_DEBUG_DRIVER.
The probe deferral is caused by this part of device_links_check_supplier:
int device_links_check_suppliers(struct device *dev)
{
struct device_link *link;
int ret = 0, fwnode_ret = 0;
struct fwnode_handle *sup_fw;
dev_info(dev, "calling %s\n", __func__);
/*
* Device waiting for supplier to become available is not allowed to
* probe.
*/
mutex_lock(&fwnode_link_lock);
sup_fw = fwnode_links_check_suppliers(dev->fwnode);
dev_info(dev, "supplier = %pfwf\n", sup_fw);
if (sup_fw) {
if (!dev_is_best_effort(dev)) {
fwnode_ret = -EPROBE_DEFER;
dev_err_probe(dev, -EPROBE_DEFER,
"wait for supplier %pfwf\n", sup_fw);
} else {
fwnode_ret = -EAGAIN;
}
}
mutex_unlock(&fwnode_link_lock);
I monitored this in the branch where IPA is working and found out that in that case the supplier is NULL:
[ 6.103477] platform 7940000.ipa: calling device_links_check_suppliers
[ 6.114008] platform 7940000.ipa: supplier = (null)
[ 6.621728] ipa 7940000.ipa: IPA driver initialized
[ 6.626994] ipa 7940000.ipa: IPA driver setup completed successfully
[ 12.158439] ipa 7940000.ipa: received modem starting event
[ 13.591062] ipa 7940000.ipa: received modem running event
When I try to work around this with fw_devlink=permissive
in the cmdline I get this
dmesg | grep ipa
[ 5.543666] OF: /soc@0/ipa@7940000: could not get #interconnect-cells for /psci/power-domain-cpu0
[ 5.553923] ipa 7940000.ipa: of_icc_get() failed on path memory (-22)
[ 5.563199] ipa: probe of 7940000.ipa failed with error -22
RPM interconnects on 6.6.0+ take extra cell. Did you adjust ipa node?
No, I just pulled the patch from the 6.5 branch. Thank you, this is most likely the solution.
Adjusted the interconnects in the ipa node to:
interconnects = <&snoc MAS_IPA RPM_ACTIVE_TAG &bimc SLV_EBI RPM_ACTIVE_TAG>,
<&snoc MAS_IPA RPM_ACTIVE_TAG &snoc SLV_IMEM RPM_ACTIVE_TAG>,
<&bimc MAS_APPS_PROC RPM_ACTIVE_TAG &pcnoc SLV_IPA_CFG RPM_ACTIVE_TAG>;
ipa is running now (without fw_devlink=permissive):
[ 4.079947] ipa 7940000.ipa: IPA driver initialized
[ 4.090194] ipa 7940000.ipa: IPA driver setup completed successfully
[ 8.267993] ipa 7940000.ipa: received modem starting event
[ 9.676701] ipa 7940000.ipa: received modem running event
Should some of the _TAGS be other tags than RPM_ACTIVE_TAG?
It's still not possible to wake the phone from suspend by calling it.
This enables the MPM interrupt controller which is supposed to be able to wake up the system from suspend. Next I'll put the IPA v2 patches on top of this to see if it's possible to receive SMS when suspended.