ChanServ changed the topic of #linux-msm to:
qyousef_ has joined #linux-msm
qyousef has quit [Ping timeout: 480 seconds]
<calebccff> bamse: the smp2p driver has a comment saying it sets it's interrupt as a wakeup source but "User space can decide enabling it depending on its use cases.", how would userspace go about doing that?
<calebccff> nvm, wakeup class, sorry for the noise
<bamse> calebccff: ahh right, downstream the remote can unconditionally wake up AP, but in a device such as a laptop you don't want e.g. a crash event to wake up AP, as it won't fall back asleep...so most likely you'll pull your laptop out of your backpack without battery in that case
<bamse> calebccff, Mis012[m]: and i remembered wrong, the glink notification is a gic interrupt
<bamse> it's the remoteproc state changes and a few other such things that uses smp2p
<calebccff> bamse: right i see how that might not be desirable right now... Shouldn't the kernel handle the crash and go back to suspend?
<calebccff> the smp2p itself uses a GIC interrupt, although I'm not able to make it wake up my device for phone calls
<calebccff> as soon as i do manually wake it up the phone call comes in
<bamse> calebccff: in a typical linux system suspend and resume are explicit operations...so you need something making the decision to take down the system again after the resume
<bamse> calebccff: in android the system suspends as soon as it's idling
<bamse> calebccff: do we flag the glink gic irq as wakeup?
<bamse> no we don't
<calebccff> bamse: if the whole IRQ -> irq reason (is it a crash?) -> handle crash process happens in kernel it can just put the device back to sleep afterwards
<bamse> calebccff: the same logic found at the end of qcom_smp2p_probe() should likely exist in qcom_glink_native_probe() as well
<calebccff> bamse: I'll give that a go, thanks
<bamse> calebccff: yes, that would be nice, but i'm not aware of any such mechanism
<calebccff> fwiw the IPA driver explicitly calls pm_wakeup_dev_event(), on a system with autosuspend enabled this would result in the device going back to suspend 500ms after the IRQ fires unless userspace takes a wake lock
<calebccff> at least, i think that's how that works based on a glance at the sources
<calebccff> without autosleep enabled though it does just wake up the device, so the remoteproc crash handler would need to explicitly put the device back into suspend, which doesn't seem like logic which should go there...
<bamse> that sounds right
marvin24_ has joined #linux-msm
marvin24 has quit [Ping timeout: 480 seconds]
<bamse> djakov: could you please consider picking up https://lore.kernel.org/linux-arm-msm/20220408214835.624494-2-bjorn.andersson@linaro.org/ for v5.19?
jhovold has joined #linux-msm
lumag__ has quit [Ping timeout: 480 seconds]
pevik has joined #linux-msm
tomeu has joined #linux-msm
Daanct12 has joined #linux-msm
<djakov> bamse: sure! thanks for sending it!
<z3ntu> djakov, bamse: Do you know why rpmh interconnect drivers require a 'reg' in device tree? As far as I can tell it's not used in those drivers, and I'm having troubles modelling it for sm6350.
<z3ntu> Downstream dts has multiple nocs pointing to the same reg https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.81/qcom/lagoon-bus.dtsi#6 . One idea to do it like the (rpm-based, which needs reg) qcm2290 that makes some nocs child nodes of a different noc, but this feels a bit clunky when the only reason we do this is not to have conflicting regs that are not even used.
<z3ntu> My current draft is the following:
<z3ntu> But moving all this out of /soc and calling it interconnect-config-noc or whatever and removing reg might be even better and work too?
pespin has joined #linux-msm
Daanct12 has quit [Quit: Leaving]
Daanct12 has joined #linux-msm
<aka_[m]> z3ntu: sounds like mmsnoc case on smd-rpm socs
<aka_[m]> On these they share same regmap
<z3ntu> The difference is that drivers/interconnect/qcom/icc-rpm.c actually uses the reg (`platform_get_resource`) but icc-rpmh.c (which sm6350 uses) doesn't
<z3ntu> So from what I can tell it's kinda useless (all my interconnects without a reg also works fine at runtime)
lumag_ has joined #linux-msm
<djakov> z3ntu: the regs on rpmh platforms could be used for configuring QoS, in a similar way as on RPM platforms. there are also some counters and probes (debug stuff)
<z3ntu> djakov: "could be" meaning it's currently unused but might/will be used in the future?
<djakov> z3ntu: if i remember correctly, the thing here is that the hw designers for some reason have combined the registers of multiple nocs into a single address space
<djakov> z3ntu: yes, currently no rpmh drivers support this
<z3ntu> got it, thanks!
<z3ntu> I guess how I sent it above ("My current draft is the following:") is ok?
<djakov> z3ntu: the rpm drivers were also initially without qos support and it was added just recently
<z3ntu> Maybe qcom,base-offset from downstream is also somehow relevant in the regs, not sure...
<djakov> z3ntu: this should be the offset for the different registers from the base address
<djakov> e.g NoC_A and NoC_B base is 0x10000, and the qos registers for NoC_A are at offset 0x10 and for NoC_B are at 0x20 from the same base address.
<djakov> z3ntu: your draft looks ok
<z3ntu> There's a separate qcom,qos-off property downstream with (for 'lagoon') values of 0, 128 or 4096. But I guess we best sort that out when we get there
lumag_ has quit [Ping timeout: 480 seconds]
<aka_[m]> djakov: what is a difference between qnoc and noc type and how to know which one is used?
Daanct12 has quit [Ping timeout: 480 seconds]
lumag_ has joined #linux-msm
<djakov> aka_[m]: not sure that i understand what you are asking
<z3ntu> downstream defines the type in the dts
<aka_[m]> So far we had bimc/noc type
<z3ntu> qcom,bus-type it's named
<aka_[m]> And this qnoc added new property probably its related to qcom,forwarding from scuba-bus.dts
<aka_[m]> I asked once about what to do with qos nodes of there is no prio props and I was told to set them to 0 in that case.
<aka_[m]> Here is my ICC driver if anyone with enought knowledge can take a look:
<aka_[m]> djakov:
JulianGoldsmith[m] has quit [Quit: Idle for 30+ days]
pg12 has quit [Ping timeout: 480 seconds]
pg12 has joined #linux-msm
pespin has quit [Remote host closed the connection]
Daanct12 has joined #linux-msm
<Mis012[m]> ok, just realized that I was probably testing with an older kernel before, and it seems that now even with UEFI in the mix, ↑ is needed to not have Linux reboot in a random spot
<Mis012[m]> could also be that this is only manifesting with maxcpus=1?
<Mis012[m]> resp. that it was manifesting in the other case solely because not all CPUs were running
pevik has quit [Ping timeout: 480 seconds]
JoelSelvaraj[m] has joined #linux-msm
jhovold has quit [Ping timeout: 480 seconds]
dliviu has quit [Ping timeout: 480 seconds]
dliviu has joined #linux-msm
Daanct12 has quit [Remote host closed the connection]
<calebccff> are there any public docs that explain the huge puddle of acronyms that make up the sound hardware on qualcomm platforms?
anholt has quit [Ping timeout: 480 seconds]
anholt has joined #linux-msm
anholt_ has joined #linux-msm
anholt has quit [Ping timeout: 480 seconds]