ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
tfiga has quit [Ping timeout: 258 seconds]
jhswartz has quit [Quit: leaving]
tfiga has joined #armlinux
gpiccoli has quit [Quit: Quit...]
gpiccoli has joined #armlinux
apritzel has quit [Ping timeout: 265 seconds]
wwilly has quit [Ping timeout: 268 seconds]
prabhakarlad has quit [Quit: Client closed]
CrashTestDummy2 has quit [Quit: Leaving]
CrashTestDummy has joined #armlinux
Bobathan has joined #armlinux
paulg has quit [Ping timeout: 272 seconds]
wwilly has joined #armlinux
wwilly has quit [Ping timeout: 265 seconds]
apritzel has joined #armlinux
frieder has joined #armlinux
apritzel has quit [Ping timeout: 268 seconds]
CrashTestDummy2 has joined #armlinux
CrashTestDummy has quit [Ping timeout: 252 seconds]
prabhakarlad has joined #armlinux
alpernebbi has joined #armlinux
sszy has joined #armlinux
frieder has quit [Ping timeout: 268 seconds]
audgirka has joined #armlinux
wwilly has joined #armlinux
wwilly_ has joined #armlinux
wwilly has quit [Ping timeout: 252 seconds]
CrashTestDummy3 has joined #armlinux
CrashTestDummy2 has quit [Ping timeout: 252 seconds]
frieder has joined #armlinux
Pali has joined #armlinux
wwilly_ has quit [Quit: Leaving]
wwilly has joined #armlinux
psydroid has quit [Quit: Bridge terminating on SIGTERM]
shoragan[m] has quit [Quit: Bridge terminating on SIGTERM]
mvaittin has quit [Quit: Bridge terminating on SIGTERM]
sha has quit [Quit: Bridge terminating on SIGTERM]
jlinton has quit [Quit: Client closed]
Pali has quit [Ping timeout: 252 seconds]
audgirka has quit [Quit: Leaving]
audgirka has joined #armlinux
Crassus has joined #armlinux
audgirka has quit [Remote host closed the connection]
audgirka has joined #armlinux
matthias_bgg has joined #armlinux
apritzel has joined #armlinux
nsaenz has quit [Remote host closed the connection]
nsaenz has joined #armlinux
<mort> https://p.mort.coffee/0U7 well that's curious
<javierm> mort: that at least explain your backlight regression, the driver's probe is getting deferred
<javierm> mort: did you check /sys/kernel/debug/deferred_devices ?
<mort> there's no file or directory called deferred_devices in /sys/kernel/debug
<mort> nowhere in /sys even, according to `find`
<mort> do you think any of those messages are fatal/would cause it to request deferral?
<javierm> mort: hmm, what's your kernel version? That debugfs entry should be available since v4.19 AFAIK
<mort> this is 4.14, I went back to the first kernel version which doesn't work
<mort> I could put 5.7 on it
<mort> sec
<javierm> mort: can you share your DTS ?
<javierm> the backlight node definition there
<mort> there's an enable-gpios and a power-supply property too, but those are both commented out
nsaenz has quit [Remote host closed the connection]
paulg has joined #armlinux
nsaenz has joined #armlinux
<javierm> mort: Documentation/devicetree/bindings/leds/backlight/pwm-backlight.yaml says that power-supply is also a required property
<javierm> mort: the driver is using devm_regulator_get(), so it won't probe if the regulator is missing in your backlight node
<mort> hmm, I understood from someone else on here (or was it in #oe?) that it shouldn't be an issue. I might've misunderstood something though
<mort> upgraded to 5.7 and backlight is deferred
<javierm> mort: I always get confused by this API... I think devm_regulator_get_optional() is when you want the core to fill a dummy regulator
<javierm> I'll need to read the code again to remember
<mort> well, when loading pwm_bl it prints "[ 315.315579] pwm-backlight backlight: supply power not found, using dummy regulator" which indicates that it's using dummy regulator
<mort> but it certainly calls devm_regulator_get, not devm_regulator_get_optional
<javierm> mort: ah, Ok. That's with 5.7 too ?
<mort> yeah
<javierm> mort: Ok, normal get does fill a dummy regulator so it seems I was wrong: https://elixir.bootlin.com/linux/v5.7/source/drivers/regulator/core.c#L1882
eduardas has joined #armlinux
<mort> aha
<mort> weird, I'm unable to enable dynamic debug from pwm_bl.c
<mort> I think this is a kernel with it enabled
<broonie> clocks and regulators are the opposite way around WRT optional supplies is what's confusing. Pretty sure regulator was there first :)
<mort> dynamic debugging is enabled, writing 'file * +p' to dynamic_debug/control spams the dmesg log, but writing 'file pwm_bl.c +p' didn't make the dev_dbg lines in pwm_bl.c appear in dmesg
<javierm> broonie: yeah, reading the core I remembered but I get those conflated all the time :)
<javierm> mort: can you share the node for pm8916_pwm ?
<broonie> javierm: I think lots of people do due to the inconsistency, it's kind of sad.
<mort> javierm: in the dts?
<javierm> mort: yes, please
<javierm> mort: ah, there's no upstream driver for that
<javierm> mort: I'm assuming that you have the driver for that enabled and probed correctly ?
<javierm> that matches OF device ID "qcom,pm8916-pwm"
<javierm> because if it's not the regulator, the next resource that's looked up is the pwm with devm_pwm_get()
<javierm> and that could return -EPROBE_DEFER too
<mort> hmm, I'm not sure. https://github.com/varigit/DART-SD410-kernel/blob/release/kernel-20.07/arch/arm64/boot/dts/qcom/apq8016-var-dart-lvds.dts#L44 is the soc vendor's dts which refers to qcom,pm8916-pwm, but I can't find any code which contains pm8916-pwm
<javierm> mort: yeah, so that would never probe and it means the pwm-backlight will keep deferring
<javierm> mort: did you check the debugfs entry I mentioned ?
<mort> yeah, I mentioned it earlier, backlight was in deferred_devices
<javierm> mort: ah, I missed. Can you share the whole content please ?
<mort> backlight, 200f000.spmi:pm8916@0:temp-alarm@2400, 1a98000.dsi
<javierm> mort: ah. That file content is hard to parse but it's basically telling you that backlight device node was deferred due pm8916
<javierm> which matches what we thought
<javierm> mort: I guess your 4.14 or whatever kernel version that worked had this out-of-tree driver and that was dropped when rebased to 5.7
<mort> no, I thought that too, but I checked out the release/kernel-17.06.1 branch (linux 4.9.39) and that has no source code which contains the string pm8916-pwm either
<javierm> mort: and the DTS is the same?
<javierm> that's surprising
<mort> well, we include dtsi files which have changed, I can try to figure out if anything pm8916-related has changed in those
<mort> but we *definitely* had `compatible = "qcom,pm8916-pwm";` in the pwm@bc00 node when it worked, and backlight was referring to pwm-backlight then too
<mort> "pwms = <&pm8916_pwm 0 100000>;" is unchanged too
<mort> old definition of pm8916_1: https://p.mort.coffee/c6b; new definition: https://p.mort.coffee/tnZ
<mort> so the pm8916 is using the driver compatible with qcom,pm8916 (that's in mfd/qcom-spmi-pmic.c). I have no idea what ends up drivingn the pm8916-pwm though. Could the parent node's driver (that's the qcom-spmi-pmic one) take somehow take care of all its child nodes, regardless of the compatible string?
<mort> holy fucking shit I'm stupid
<javierm> mort: that's the parent MFD, you want to check pm8916_pwm: pwm@bc00
<mort> pm8916-pwm is supported through a kernel patch we've been applying but which I removed when trying to upgrade the kernel
<javierm> mort: ah, so the theory was correct then :)
<mort> yeah, just not "out-of-tree" from the soc vendor, "out-of-tree" from a .patch file in a bitbake recipe
<javierm> mort: right, I meant "not in mainline"
<mort> you were correct, I just didn't consider all the ways for a driver to be out of tree :p
<javierm> :)
<mort> honestly, I think there's a valuable lesson here: sometimes, the question isn't, "why isn't this working anymore", but "why was this working before" and I've been way too focused on the former through this whole debugging endeavor
<javierm> mort: yeah. There are too many moving pieces that make it hard to figure out
<mort> honestly, who would've expected an out-of-tree kernel patch applied as a .patch file in a bitbake recipe to support using the pm8916 chip as a pwm controller
<mort> for stupid reasons, I can't make a new build right now, but I'll test tomorrow. I'm betting I just have to take that patch and make sure it's applied and then everything will work
<mort> anyways, thanks a ton for your help javierm
<javierm> mort: yeah, probably will work once the pwm device driver is there and probes correctly
<javierm> mort: you are welcome
matthias_bgg has quit [Ping timeout: 246 seconds]
matthias_bgg has joined #armlinux
Crassus has quit [Quit: Textual IRC Client: www.textualapp.com]
rbutler1728 has joined #armlinux
jlinton has joined #armlinux
torez has joined #armlinux
torez has quit [Client Quit]
torez has joined #armlinux
frieder has quit [Remote host closed the connection]
sszy has quit [Ping timeout: 258 seconds]
audgirka has quit [Quit: Leaving]
matthias_bgg has quit [Ping timeout: 272 seconds]
matthias_bgg has joined #armlinux
eduardas has quit [Quit: Konversation terminated!]
mmind00 has quit [Quit: mmind00]
mmind00 has joined #armlinux
Bobathan has left #armlinux [Good Bye]
matthias_bgg has quit [Quit: Leaving]
nsaenz has quit [Read error: Connection reset by peer]
nsaenz has joined #armlinux
Pali has joined #armlinux
_nsaenz has joined #armlinux
_nsaenz has quit [Client Quit]
_nsaenz has joined #armlinux
_nsaenz has quit [Client Quit]
headless has joined #armlinux
CrashTestDummy2 has joined #armlinux
CrashTestDummy3 has quit [Ping timeout: 272 seconds]
CrashTestDummy3 has joined #armlinux
CrashTestDummy2 has quit [Ping timeout: 240 seconds]
CrashTestDummy2 has joined #armlinux
CrashTestDummy3 has quit [Ping timeout: 256 seconds]
Nact has joined #armlinux
apritzel has quit [Ping timeout: 240 seconds]
headless has quit [Read error: Connection reset by peer]
headless has joined #armlinux
apritzel has joined #armlinux
jhswartz has joined #armlinux
alpernebbi has quit [Quit: alpernebbi]
headless has quit [Quit: Konversation terminated!]
psydroid has joined #armlinux
rbutler1728 has quit [Read error: Connection reset by peer]
mvaittin has joined #armlinux
sha has joined #armlinux
shoragan[m] has joined #armlinux
psydroid has quit [Quit: node-irc says goodbye]
shoragan[m] has quit [Quit: node-irc says goodbye]
mvaittin has quit [Quit: node-irc says goodbye]
jhswartz has quit [Quit: leaving]
sha has quit [Quit: node-irc says goodbye]
psydroid has joined #armlinux
shoragan[m] has joined #armlinux
sha has joined #armlinux
mvaittin has joined #armlinux
geertu has quit [Ping timeout: 252 seconds]
Pali has quit [Ping timeout: 272 seconds]
geertu has joined #armlinux