libera/#maemo-leste/ Tuesday, 2023-09-05

Wizzuparno11: did you upload one directory per commit or something?00:30
arno11what do you mean exactly ?00:31
WizzupAll the commits are 'add files via upload'00:35
Wizzupin any case, I can try to add this on top of pierogy later to get a list of changes00:36
arno11yes that was my idea too :)00:36
arno11or i can start over with all changes once i'll get my computer back with all data00:45
Wizzup*nod*00:46
Wizzupi'll try to build it tomorrow00:46
tmlindsicelo, arno11: hmm if there are some pwm-ir-tx bugs let's just fix those in the mainline kernel and we'll have a supported generic driver :)06:21
freemangordontmlind: right07:47
freemangordonthe visible difference is that ir-rx51 is using hrtimer, while pwm-ir-tx does  usleep_range(delta, delta + 10); :)07:48
freemangordonno way this can do precisely timed emission07:48
freemangordonhmm, usleep_range is backed by hrtimer07:50
freemangordonbut! IIUC every call to usleep_range might set new hrtimer, and that takes a lot07:56
freemangordonso, to me issue is the new driver sets hrtimer for every pulse08:00
tmlindfreemangordon: seems using fsleep() instead of usleep_range() may fix it.. see mailing list thread "bus: ti-sysc: Use fsleep() instead of usleep_range() in sysc_reset()"08:20
tmlindprobaly the long term solution is to use a periodic dmtimer for the pulse rather than a timer08:21
tmlindi posted some rfc dmtimer clock framework patches a while back, with those pwm-ir-tx could just do clk_get() on a dmtimer..08:21
sicelooh gosh! N900 is now completely dropped from u-boot mainline08:43
sicelotmlind: yes, i am in full agreement about pwm-ir-tx, if it can be made to work well for us08:54
freemangordontmlind: I don't see how would you integrate omap-specific dmtimer into generic driver like pwm-ir-tx09:17
freemangordontmlind: do you see any issue in using hrtimer in pwm-ir-tx  the same way it is done now in ir-rx51?09:18
freemangordonalso, I don;t think fsleep will help: https://elixir.bootlin.com/linux/latest/source/include/linux/delay.h#L8709:21
freemangordonthat's even worse :)09:21
tmlindfreemangordon: how long is the delay? fsleep uses udelay for short ones09:22
tmlindpwm-ir-tx could just do clk_get() if configured in the dts09:23
freemangordontmlind: hard to say predict, it is the uiserspace that sends a buffer with PWM parameters09:23
tmlinddon't see issues using hrtimer in pwm-ir-tx09:23
freemangordonso, we have a carrier of lets say 50kHz09:23
freemangordonlemme do some calculations09:24
tmlindif it's a longer sleep then yeah fsleep won't help09:24
freemangordonso, if I am not mistaken, the period is 20 uS09:25
freemangordonso, the rang is 1<->20 uS for 50kHz carrier09:26
freemangordon*range09:26
freemangordonunless my calculations are wring09:26
freemangordon*wrong09:26
tmlindok so fsleep could possibly help09:27
freemangordonnot really, becaus in > 10uS interval fsleep does usleep_range(usecs, 2 * usecs);09:27
freemangordonudelay() is busy loop, no?09:28
freemangordonalso, on ompa hrtimer is implementd by using dmtimer, no?09:28
freemangordon*omap09:28
freemangordonah, scratch my calculations09:29
freemangordoncarrier has nothing to do with time interval09:29
freemangordonyou can enable it for as long as you wish, with 1uS resolution09:29
tmlindyeah hrtimer is using a dmtimer on omaps, later ones use arm timer for that09:36
tmlindhowever, hrtimer will not be as accurate as using a dmtimer in a periodic mode to trigger pulses, maybe it does not need to be accurate here though09:37
tmlindas dmtimer in periodic pwm mode can toggle a gpio pin automatically with no kernel register tinkering09:38
tmlindfyi if somebody feels like playing with using dmtimers with request_irq() and clk_get(), here's the link to the earlier rfc patches: https://lore.kernel.org/linux-omap/Y1+6bmuup36ZF3H9@atomide.com/09:40
freemangordontmlind: we already toggle that gpio pin using dmtimer (pwm is dmtimer backed)14:19
freemangordonbut, we need another timer to measure the pule width, thus, hrtimer14:20
tmlindfreemangordon: you can also capture the time, there was some patch posted for dmtimer for that14:47
tmlindnot currently supported, i think it was posted by ladislav a few years ago14:48
freemangordonwith higher precision than dmtimer?14:49
freemangordon*then hrtimer14:49
freemangordonargh14:49
freemangordonthan hrtimer :)14:49
tmlindi guess you'll get the event time captured so should be more accurate for the measurement, not sure if it matters in this case though14:58
freemangordonI don't think it matters, as we should precisely get the event to be able to switch pwm on or off accurately15:00
tmlindok15:07
arno11freemangordon: tmlind: sicelo: i made other test with ir-rx51's patch and it works really well, comparable to Fremantle :) i think the main issue is high idle cpu load with Leste (and then troubles to get correct timing)15:22
arno11locking freq at 850 and disabling hildon compo make pierogi working like a charm15:23
arno11now i'm able to control a device @ 2 meters15:24
arno11i might try similar test with pwm-ir-tx to see if it works15:27
arno11or not15:28
bencohif you feel like cpu goes to idle when it shouldn't, then you might want to disable idle for testing purposes15:29
bencohand you should be able to use cpu_latency_qos_add_request() to prevent it from entering deep idle states during critical tasks15:29
bencohhttps://docs.kernel.org/power/pm_qos_interface.html15:30
arno11thx but the cpu is not on idle when it shouldn't i think. just to much power usage with no apps running15:31
arno11n900 is not entering deep idle states at all iirc15:32
arno11maybe tweaking realtime cpu priorities could help ?15:33
bencohit still enters some special idle state (instead of the default arm wfi idle), right/15:33
arno11ok15:33
bencoh(I mean, I was asking, I dunno)15:34
arno11ah ok, me too15:34
arno11amazing: able to control a samsung tv @ 4 meters !15:49
arno11freemangordon: thx a million for your help with the patch :)15:53
arno11sicelo: now it's time for bluetooth/fmrx stuff :D16:01
sicelothat'd be a dream come true ... practically everything working16:07
bencoh\o/16:08
siceloof course there's more stuff, e.g. DSP, PM, etc., but yeah with BT and FM RX, things would be looking really good16:09
arno11yes indeed :D16:11
uvossicelo: fyi your patch was mangled somewhere by the tabs being replaced by spaces22:28
uvosplease avoid this in the future22:28
uvosalso really this should be several patches22:29
Wizzupuvos: this is just a patch to test things :)22:32
Wizzupbut not harmful (hence devel)22:32
sicelomy mom still has my droid4 hostage ... may anyone share the output of `cat /sys/class/power_supply/battery/uevent` on droid 423:17
Wizzuphttps://bpa.st/OMTCE23:24
sicelothanks!23:29

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!