ChanServ changed the topic of #linux-rockchip to: Rockchip development discussion
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
lurchi_ is now known as lurchi__
lurchi__ is now known as lurchi_
kevery1 has joined #linux-rockchip
lurchi_ is now known as lurchi__
kevery has quit [Ping timeout: 256 seconds]
kevery1 is now known as kevery
camus1 has joined #linux-rockchip
camus has quit [Read error: Connection reset by peer]
camus1 is now known as camus
stikonas has quit [Ping timeout: 256 seconds]
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 256 seconds]
kevery1 is now known as kevery
vagrantc has quit [Quit: leaving]
macc24_ has joined #linux-rockchip
macc24 has quit [Ping timeout: 268 seconds]
shailangsa has joined #linux-rockchip
camus1 has joined #linux-rockchip
camus has quit [Read error: Connection reset by peer]
camus1 is now known as camus
lurchi__ has quit [Ping timeout: 250 seconds]
lurchi_ has joined #linux-rockchip
lurchi_ is now known as lurchi__
chewitt_ has joined #linux-rockchip
chewitt has quit [Ping timeout: 240 seconds]
matthias_bgg has quit [Ping timeout: 245 seconds]
matthias_bgg has joined #linux-rockchip
chewitt_ has quit [Read error: Connection reset by peer]
chewitt has joined #linux-rockchip
chewitt has quit [Quit: Zzz..]
matthias_bgg has quit [Quit: Leaving]
matthias_bgg has joined #linux-rockchip
dvergata1 has joined #linux-rockchip
f476 has joined #linux-rockchip
montjoie_ has joined #linux-rockchip
lkcl- has joined #linux-rockchip
matthias_bgg has quit [*.net *.split]
kilobyte_ch has quit [*.net *.split]
f476_ has quit [*.net *.split]
s1b1 has quit [*.net *.split]
lkcl has quit [*.net *.split]
montjoie has quit [*.net *.split]
dvergatal has quit [*.net *.split]
s1b1 has joined #linux-rockchip
kilobyte_ch has joined #linux-rockchip
matthias_bgg has joined #linux-rockchip
warpme___ has quit [Quit: Connection closed for inactivity]
System_Error has quit [Remote host closed the connection]
System_Error has joined #linux-rockchip
jagan has joined #linux-rockchip
System_Error has quit [Ping timeout: 276 seconds]
macc24_ has quit [Quit: ZNC 1.7.5+deb4 - https://znc.in]
macc24 has joined #linux-rockchip
lurchi__ is now known as lurchi_
lurchi_ is now known as lurchi__
mmind00 has quit [Quit: No Ping reply in 180 seconds.]
mmind00 has joined #linux-rockchip
jagan has quit [Ping timeout: 256 seconds]
shailangsa has quit [Remote host closed the connection]
<macc24> macromorgan: got the commit
<macc24> macromorgan: https://bpa.st/V2OA
<macromorgan> did I do that?
<macc24> i literally don't remember
<macromorgan> me neither, is that bad?
<macc24> uh
<macc24> in case it was me feel free to submit it as yours if you end up upstreaming it
<macromorgan> I'm going through the battery driver again with a fine-toothed comb to see if I'm missing anything else
<macc24> i'll just get rest of emulators running on ragnarok, test a patch for display on qualcomm 7c and i can help you with that battery driver
<macromorgan> right now my outstanding problem is that I can't seem to get a consistent way to guess the battery capacity on bootup when the device is not fully charged
<macromorgan> things I am looking at: the relaxation voltage (I think BSP driver does more than I am doing and that could play a part) and saving the battery capacity to nvram so you can make an educated guess at bootup.
<macc24> good luck
kevery1 has joined #linux-rockchip
<macromorgan> man what I wouldn't give for someone to jump up and say "hey, I have experience writing battery drivers, what can I help you with".
<macc24> i have experience writing battery drivers but only rk817 :P
kevery has quit [Ping timeout: 256 seconds]
kevery1 is now known as kevery
<macromorgan> to which I would say "I can measure current, voltage, and columb counts... how do I make an accurate gauge that works when you're full or partially full, plugged in or not plugged in at boot"
<macc24> idk that someone else might say "if we're plugged in at boot then it makes no sense to try guessing percentage from voltage, check the current, if it's zero then battery is charged -> 100%, if nonzero and charging check the coulomb counter"
camus has quit [Ping timeout: 240 seconds]
camus1 has joined #linux-rockchip
shailangsa has joined #linux-rockchip
camus1 is now known as camus
<amstan> generally fuel gages should abstract that stuff away and should give you some kind of usable percentage / capacity (mAh current & maH capacity)
<amstan> you do that by integrating current, every second that battery is on
<amstan> from time to time there's probably calibration things that are similar to what macc24 is saying, but it's all done automatically
<amstan> no need to ever look at voltage manually in a driver, unless you just want it displayed for debugging
<macc24> amstan: isn't euler approximation more and more wrong with time?
<amstan> "euler approximation", welp, that's a new term for me
<amstan> idk, maybe that's not the way they do it
<macc24> rk817 fuel gauge does /some/ abstraction... there's coulomb counter
<amstan> but the point is that the chips are supposed to do stuff to know these things, and if they don't do that job properly you're pretty much screwed and can't do better
matthias_bgg has quit [Ping timeout: 252 seconds]
<macc24> macromorgan: i didn't care /that/ much about percentage... i planned to just have a battery indicator that can display just [---]+ on full, [-- ]+ on mostly charged, [- ]+ on mostly empty and [ ]+ on critical
<macc24> few percent here or there wouldnt matter xD
<macromorgan> problem is I'm off as much as 20% currently
<macromorgan> the main issue is that I have to init the columb counter with an estimated value, and that's what I'm currently struggling with, the correct initial value
<macromorgan> but I'm digging through BSP code again to see if I missed something (I am almost certain I did)
<macc24> macromorgan: idk maybe init it only when full?
<macromorgan> hmm
<macromorgan> I wonder if there is a way for a kernel driver to return "I don't know" when asked for capacity?
<macc24> NULL
<macc24> -EINVAL
<macc24> my suggestions
<macromorgan> right, but do the drivers support that?
<macc24> still... i dont think the upstream would like computing values
<macc24> capacity values*
<macromorgan> at least a few drivers do it
<macromorgan> plus that's really not a big deal since it's a simple math function, it's not like we're using some complex formula to say "if I have 2000000 mA left and a capacity of 3000000 mA, I am at 67%).
<macc24> we might end up making libbattery :v
<macromorgan> I would love to see some love for libdrm and the Rockchip RGA...
<macc24> how?
<macc24> iirc rga more belongs to v4l2 m2m
<robmur01> yup, that's how it's currently implemented since it's about the only kernel API that could fit any of its functionality
<robmur01> although maybe with recent developments it could become a fbcon accelerator :)
<macc24> eeh please no
stikonas has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Remote host closed the connection]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Read error: Connection reset by peer]
kevery1 is now known as kevery
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
lurchi__ is now known as lurchi_
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
<macc24> macromorgan: so i applied that patch, it didn't apply and i tried reversing it and GUESS WHAT the issue was caused by something else
<macc24> can you take a look at it? i have no idea what to do :/
<macromorgan> so when you hit the GPU hard the sound goes slower/distorted?
<macromorgan> do you think it's thermal throttling?
<macromorgan> wonder if the GPU and the sound share a clock
<macc24> when i change gpu clock to highest the sound is good
<macc24> when the gpu clock is low the sound is bad
<macromorgan> I dunno... anything change in /sys/kernel/debug/clk/clk_summary besides the gpu clock?
<macc24> macromorgan: no idea
<macc24> will check tomorrow
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 256 seconds]
kevery1 is now known as kevery
camus1 has joined #linux-rockchip
camus has quit [Read error: Connection reset by peer]
camus1 is now known as camus
kevery1 has joined #linux-rockchip
kevery has quit [Remote host closed the connection]
kevery1 is now known as kevery
<macromorgan> I think I'm overthinking this... I mean, the columb counter still counts when it's off...
stikonas has quit [Remote host closed the connection]
stikonas has joined #linux-rockchip
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 240 seconds]
kevery1 is now known as kevery
kevery1 has joined #linux-rockchip
kevery has quit [Ping timeout: 256 seconds]
kevery1 is now known as kevery