libera/#maemo-leste/ Thursday, 2021-10-14

lelIMbackK closed an issue: https://github.com/maemo-leste/bugtracker/issues/413 (Provide our patched libsdl)12:20
lelIMbackK closed an issue: https://github.com/maemo-leste/bugtracker/issues/562 (Droid4 gl4es fullscreen error)12:21
tmlindfreemangordon: i think i implemented that thalia int fix as a quirk for drivers/bus/ti-sysc.c to bring up the module, no idea why it's needed12:25
tmlindhmm looks like commit d7f563d it's needed for 36xx though, maybe 34xx needs it too or some other quirks12:26
tmlindor i mistyped 36xx instead of 34xx12:27
tmlindfreemangordon: oh the quirk you found is also for 36xx so it should be ok, afaik 34xx has those regs somehow broken12:28
tmlinduvos: so you mentioned bionic gets way better power consumption compared to d4 when idle? what's the difference in average mw if you run droid4-pm status once a minute?12:29
tmlindmaybe it's some external i2c device on d4 that should be powered down12:30
uvostmlind: so my d4 sometimes manages 90mW but often it just uses 120mW-180mW with no explanation i can find, this is unrelated to the modem related touch ttyUSB workaround.12:31
uvosthe bionic allways idles at 70mW12:31
uvospretty mutch no matter what12:31
tmlindweird12:32
tmlinddo you have omap4-keypad loaded on bionic also?12:32
uvosyeah12:32
uvosits needed for vol-up/down12:32
tmlindok12:33
tmlindthat's a big difference for the idle consumption12:33
uvosok interesting12:33
uvosshould we be suspending that?12:33
uvosthe only one keeping it open on leste is mce12:33
uvosi could have mce close it12:33
tmlinddroid4-keypad should autoidle itself when no input12:34
uvosok12:34
tmlindno need to do anything unless there's a bug12:34
uvosok12:34
tmlindcould it be some mismuxed line on d4?12:34
uvosmaybe12:35
tmlindi'd suspect one of the different i2c devices12:35
tmlindmaybe we need to toggle gpio reset for one of them on droid412:35
uvossure the sensors are different for instance12:35
tmlindthe easy way to test would be to temporarily disable them in the dts, then toggle their reset gpios vi /sys/kernel/debug12:36
uvosyeah12:37
tmlindi guess it could be some difference in the lcd panel too12:37
uvosi doubt12:37
uvosthe cpcap firmware is clearly different12:37
uvoson bionic i manages the button backlight for instance12:37
uvos(problematic because it isent fully turned off when the mainline kernel powers down)12:38
tmlindhave you tried bionic fw on d4 and see if that brings down the power consumption?12:38
uvosno12:38
tmlindi guess there could be some config issue with the different voltage regulators on d412:39
uvostrue bionic has different voltage config in android12:39
uvosgeneraly higher tho12:39
tmlindi mean the of_machine_is_compatible() different config done in arch/arm/mach-omap2/pmic-cpcap.c12:40
uvosah right12:40
uvosyeah some regulators move around12:40
tmlindyou do have phy-cpcap-loaded or unloaded on both?12:40
uvoslet me check12:41
tmlindthat's a power hog for the serial port12:41
uvosunloaded on d412:41
uvosunloaded on bionic too12:41
tmlindok12:41
uvosthe bionic runs from internal mmc the d4 from sdcard12:45
uvosthat might be some of the difference12:45
tmlindyeah maybe12:47
uvosto test the sensors12:50
uvosshould it not be enough to blacklist the drivers and then trigger a reset12:50
tmlindshould work12:52
uvosWizzup: i cant install any of the libicd-provider-{tor,openvpn,wireguard}13:55
uvosERROR: requested network_type DUMMY does not exist in /system/osso/connectivity/network_type (['WLAN_ADHOC', 'WLAN_INFRA', 'GPRS'])13:55
uvostmlind: its not the keypad14:24
uvosit idles the same with it blacklisted14:25
uvosit = xt89414:25
tmlindok15:54
Wizzupuvos: check @ dummy, will fix16:41
Wizzup(in a few hrs)16:41
Wizzupty for trying16:41
freemangordontmlind: this? https://elixir.bootlin.com/linux/v5.15-rc5/source/drivers/bus/ti-sysc.c#L149818:20
freemangordonIIUC, for SGX 121 no quirk will be applied, but I am not really sure how SYSC_QUIRK() is supposed to work18:23
freemangordonhowever, I would say that if THALIA_INT_BYPASS is applied to 3430, this is a bug, unless you have some access to docs that are not publicly available that describe 0xff00 - 0xffff registers in SGX address spaces18:25
freemangordonalso, I was not able to find anything in Nokia (fremantle) kernel that touches those addresses18:26
freemangordonlater on I will dump 0xff08 on fremantle while some 3d application is runnig18:27
tmlindyeah that's the quirk, no i don't have special docs, just guessing based on the earlier reference code20:49
tmlindchecking the sgx rev register would show if that quirk is wrongly applied to 34xx also20:50
tmlindso that would be reg 0x5000fe00, and hopefully it's not 0x4000000020:55
freemangordonok, but even if sysc does not apply it, SGX driver does the same quirk20:56
freemangordonunconditionally20:57
freemangordonOTOH, I am not sure I grok what that quirk does20:58
tmlindok we should just leave out the sgx quirk then, the ti-sysc quirk also works for cases when there is not sgx driver20:58
tmlindlike the mainline kernel20:58
tmlindi think it configures some interrupt routing register20:58
tmlindfreemangordon: so what's your ddk-1.17 kernel branch like now, do you have some reverts on the pvrsgx tree?21:01
tmlindi'm still seeing crashes for omap3 with the prm sgx patch applied and no SUPPORT_ACTIVE_POWER_MANAGEMENT21:02
freemangordonI see crashes with your omap3-prm-gfx.patch21:04
freemangordonapplied that is21:04
freemangordonso I removed it and now am trying to figure out what is wrong, besides it21:05
freemangordona057d283a8926e5f9824ae41798d41bfbbd56a0d (HEAD -> pvr-5.15) gpu: pvr: Enable runtime PM autosuspend for pvr-drv21:06
freemangordon614eb7536d3adad342b04fd1666bb3880e660dab gpu: pvr: Use PVR_LINUX_MEM_AREA_USE_VMAP to load driver properly21:06
freemangordon4a75f05f070785db5ffcbe21bd45b1482ef99e37 ARM: omap2plus_defconfig: Use ddk-1.17 by default21:06
freemangordonf7b5e1683a28c6ecb7ce3a32ba9d7c12364868e9 gpu: pvr: Drop all old ddk versions21:06
freemangordonb98125a4f1287bc29df93c43abe49cc661030ff4 Merge tag 'v5.15-rc2' into droid4-pending-pvr-omapdrm-v5.1521:06
freemangordone4e737bb5c170df6135a127739a9e6148ee3da82 (tag: v5.15-rc2) Linux 5.15-rc221:06
freemangordonthis^^^21:06
freemangordonthis works stable with SUPPORT_ACTIVE_POWER_MANAGEMENT disabled21:06
freemangordonSYS_USING_INTERRUPTS is enabled21:06
freemangordondidn't have chance to spend time trying to find what's wrong with clocks/prcm/whatever with  SUPPORT_ACTIVE_POWER_MANAGEMENT enabled though, hopefully will have spare time during the weekend21:08
tmlindok yeah so something else is still broken somewhere21:09
freemangordonmhm21:09
tmlindhmm so are you saying v5.15-rc1 is not good and v5.15-rc2 must be merged in?21:10
freemangordonnot, I just pulled your tree21:10
tmlindok21:10
freemangordonpity I didn;t have chance to play more with that, but RL job took all my time/power the last few days :)21:11
tmlindthat PVR_LINUX_MEM_AREA_USE_VMAP is the mystery patch as you probably noticed too21:11
freemangordonyeah21:11
freemangordonbut I think it is of lower prio compared to PM21:12
tmlindyup21:13
tmlindwell the sgx registers are readable after echo on > control for sgx module, so the pm should be pretty close21:16
tmlindsomething in the pvrsgx driver code goes wrong for sgx530 somewhere21:16
freemangordonmy gut feeling tells me it is the kernel, not the driver :)21:17
freemangordonbecause SUPPORT_ACTIVE_POWER_MANAGEMENT enables only small code segments that call PM kernel functions21:17
tmlindintuition is a good path to follow :)21:17
freemangordonbut yeah, I need to prove that by comparing fremantle kernel CM/PRCM regs with usptream when clocks are enabled21:18
tmlinda shell script toggling between on and auto for the pvr sgx sysfs entry should be tested21:18
freemangordons/I need/I have to21:18
freemangordonI suspect there is some small interval in which clocks are still disabled after pm_runtime_get _sync()21:19
freemangordonand I plan to test that as soon as I find spare time21:20
freemangordontmlind: also, please, if you *grok* what THALIA_INT_BYPASS does, explain it to me, it seems my English is not good enough for me to understand the explanation in the TRM21:22
freemangordonwhat is IPG register?21:22
tmlindno idea, my guess it's some interrupt routing register in the target module for sgx21:23
freemangordonwhich gets set by the driver?21:23
tmlindyeah it needs to be set on enable, i think otherwise the interrupt won't trigger21:24
tmlindfor 36xx21:24
freemangordonhmm, ok21:24
tmlindon 34xx, i think the whole ocp target module registers are broken and should not be touched at all21:25
freemangordonyeah, but the driver does it21:25
freemangordonthat might be the issue21:25
tmlindfor 34xx?21:25
freemangordonunconditionally21:25
freemangordonsec21:26
tmlindok yeah sounds like it might be a problem then, should be removed from the driver as ti-sysc does it for 36xx21:26
freemangordonsee  EnableSGXClocksWrap()21:27
freemangordonand   SGX_OCP_REGS_ENABLED define in general21:27
tmlindlooks like toggling sgx sysfs control in a loop between on and auto works reliably btw21:28
freemangordonhow do you know? by reading regs from userspace?21:28
tmlindafaik based on the ti-syc enable/disable tinkering a while back we should not touch the OCP regs like SYSCONFIG at all for 34xx, so SGX_OCP_REGS_ENABLED sounds like should not be set21:29
freemangordonmhm21:30
freemangordonbut, that gets defined as soon as SYS_USING_INTERRUPTS is defines21:30
tmlindyeah ok might be a problem21:31
tmlind#!/bin/sh21:32
tmlindmodule="50000014.target-module"21:32
tmlinddriver="/sys/bus/platform/drivers/ti-sysc"21:32
tmlindwhile true; do echo ${module} > ${driver}/bind echo ${module} > ${driver}/unbind21:32
tmlinddone21:32
tmlindoh sorry bad formatting, needs to be on separate lines or needs ;21:32
tmlindso actually not toggling between on and auto, but re-enabling in a loop21:33
freemangordonanyway, I will spend more time on it during the weekend, if you find something in the meanwhile, please LMK21:34
tmlindyeah ok, zzz time here, ttyl21:34
freemangordonttyl21:34
freemangordonoh, ok, commenting   SGX_OCP_REGS_ENABLED make it work with SUPPORT_ACTIVE_POWER_MANAGEMENT and SYS_USING_INTERRUPTS23:10
freemangordonuvos: do you know how to check if SGX module is powered down?23:10
freemangordonsgx_pwrdm (OFF),OFF:6,RET:0,INA:0,ON:6,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:023:14
freemangordonI guess this means it is off, no?23:14
uvosthere is a register for it23:14
uvosi dont know it by heart sorry23:14
uvosomapconf can read it for omap3 (but not omap4)23:14
uvosalso there is the clock gating reigster in the dpll/devider section23:15
uvosdepends on what you mean by "off"23:15
freemangordonbut kernel provides all this info already, no? in /sys/kernel/debug23:15
uvoser omap4 but not omap3 i mean23:15
uvosfreemangordon: yeah probubly23:15
freemangordonok, I'll wait tmlind to confirm23:16
freemangordonlemme check clocks23:16
uvoson omap4 its  just more conveniant/definitive to use omapconf most of the time23:16
freemangordonclk_enable_count is 023:17
uvosok23:17
freemangordonso I am almost sure SGX is powered down23:17
uvosknow what cat /sys/kernel/debug/clk/ it is?23:17
freemangordon/sys/kernel/debug/clk/sgx_fck23:17
uvosok23:17
freemangordonand /sys/kernel/debug/clk/sgx_ick23:17
uvoscheck the idle blockers PMI-CM2 in omap4 TRM23:20
freemangordonwhile glmark runs clocks enable count changes to 123:21
freemangordonand sgx_pwrdm (ON),OFF:7,RET:0,INA:0,ON:8,RET-LOGIC-OFF:0,RET-MEMBANK1-OFF:023:21
uvossounds like it works yeah23:23
freemangordonmhm23:23
uvosthe way they made register adresses unsearchable in the TRM is evil23:24
freemangordonhttps://pastebin.com/x3qT4jM923:25
freemangordonthis is with SUPPORT_ACTIVE_POWER_MANAGEMENT and SYS_USING_INTERRUPTS enabled23:25
uvosgreat23:25
uvoswhat was the problem?23:25
uvosah commenting   SGX_OCP_REGS_ENABLED make it work with SUPPORT_ACTIVE_POWER_MANAGEMENT and SYS_USING_INTERRUPTS23:26
uvosnet23:26
uvosneat23:26
freemangordonpvr driver touching OCP registers23:26
uvosalso know why vbo underperforms on omap4?23:27
freemangordonit should not with SYS_USING_INTERRUPTS enabled23:27
freemangordondefine "underperforms"23:27
uvos2 fps23:27
freemangordonlast time I tried it is was > 100 fps23:27
freemangordonoh23:27
freemangordonthen SYS_USING_INTERRUPTS is disabled23:28
freemangordonit behaves the same on n900 with SYS_USING_INTERRUPTS disabled23:28
uvosok but only on -drm23:28
freemangordonyeah23:28
uvosworks fine on wayland23:28
freemangordonsame on n90023:28
uvosperf wise23:28
uvosok23:28
freemangordonbut, we must have SYS_USING_INTERRUPTS enabled23:28
uvosok ill check tomorrow23:29
uvosfor omap4 kernel23:29
freemangordonI should also pester tmlind to fix tiler patch to not break omap323:29
freemangordonbut anyway, this is great progress23:29
uvosyeah23:29
uvosneat23:30
freemangordonand I think I deserve some rest :D23:30
uvosgood work :)23:30
freemangordonyeah. good night!23:30

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