libera/#maemo-leste/ Monday, 2021-10-11

lelclort81 opened an issue: https://github.com/maemo-leste/bugtracker/issues/580 (Droid4: USB Charging bounces. (threshold too high?))03:24
freemangordonmerging letux-pvrsrvkm-5.10-rc1 on top of letux-pvrsrvkm-5.9-rc2+linux-5.10.y, still works, I am starting to suspect tmlind's patches :)08:33
freemangordontmlind: mystery is solved: with -DSYS_USING_INTERRUPTS removed 5.15 kmscube does not hang09:46
freemangordontmlind: this is 7db47dbf1e1b539b8880b4a1d68fa05f674d419b09:50
tmlindfreemangordon: ok so maybe the interrupt is misconfigured if it's not firing for omap3? bbl later tonight..10:11
freemangordontrying to find which interrupt no it is trying to use10:13
freemangordontmlind: just a second, please10:18
freemangordoninterrupts = <21>10:18
freemangordondoes not sound correct to me, IIRC we shall add some value to that10:18
freemangordonI knew I already had that issue https://github.com/pali/linux-n900/commit/7cf4ffa3897a914ec2d9cf86ca02a39725ec6031#diff-0e2abbc7386ac889a343ab8076e9bbcb8807d778ff20bd355d9ec406cc4fb25cR4510:20
Wizzupfreemangordon: you found it? great10:53
freemangordonno11:00
freemangordonI mean - I just build modules with traces enabled and IRQ no is 37, which is the correct one (21 + 16)11:00
freemangordonoh, yeah, I found what is causing the issue11:01
freemangordonbut still no solution11:01
freemangordonWizzup: do you want me to provide the kernel for you to capture traces over the serial?11:03
freemangordon"Installing device LISR SGX ISR on IRQ 37 with cookie 1b3c8529"11:03
freemangordonlooks correct11:03
Wizzupfreemangordon: sure I can capture something, so it still hangs?11:12
Wizzupfreemangordon: yeah sure @ kernel + mods11:24
freemangordonyes, it hangs with -DSYS_USING_INTERRUPTS11:26
freemangordonok, just a second and will provide archive11:26
freemangordonWizzup: http://46.249.74.23/leste/pvr_hang.tar.gz11:29
Wizzuphttps://wizzup.org/panic-new.txt11:49
Wizzupfreemangordon: do I need to set any control/power value or something?12:12
freemangordonno, but, is there any additional traces in dmegs?12:17
freemangordonthere should be12:17
freemangordonlike "PVR: EnableSystemClocks: Enabling System Clocks"12:18
freemangordonWizzup: ^^^12:18
freemangordonWizzup: this log is like no traces were enabled, are you sure you've booted the correct kernel?12:29
freemangordontmlind: why is  SUPPORT_ACTIVE_POWER_MANAGEMENT enabled? without it, it works fine with -DSYS_USING_INTERRUPTS12:48
freemangordonroot@devuan-n900:/sys/kernel/irq/37# cat per_cpu_count12:53
freemangordon6423412:53
freemangordonroot@devuan-n900:/sys/kernel/irq/37# cat per_cpu_count12:53
freemangordon6633612:53
freemangordonroot@devuan-n900:/sys/kernel/irq/37#12:53
uvosthats a hack to allow the device to ilde when the display is off12:53
uvosor part of it anyways12:53
uvosti disabled all powermanagement in ddk1.14+12:54
uvosthus sgx never idles12:54
uvosthis is in the blobs12:54
uvosby lieing to pvr_k and enableing active powermangement the device can idle again12:54
freemangordondoesn't seem to work properly though12:54
bencoh"thus sgx never idles" this sounds ... terrible, tbh12:54
uvosthis works on the d4 blobs12:54
uvosbut it might be broken on the omap3 blobs yeah12:55
freemangordonuvos: who is supposed to enable the clocks?12:55
freemangordonI would rather say that on d4 it is broken as well, but for some reason clocks are always running12:55
uvosit works on d412:55
freemangordon[build] use-vbo=false: FPS: 56 FrameTime: 17.857 ms12:55
freemangordon[build] use-vbo=true: FPS: 57 FrameTime: 17.544 ms12:55
uvosthe clock register changes12:55
uvosnot sure who disables the clocks sorry12:56
uvosask tmlind he wrote the hack12:56
uvosif this hack dosent work witht he omap3 blobs its over basicly12:56
freemangordonyeah, I am waiting for him :evil_grin:12:56
uvosno powermangement of any kind is possible then12:56
freemangordonnot really12:56
uvoshmm?12:56
uvossgx will block the whole chip from entering ret12:57
freemangordondriver manages the clocks and idles the device as needed12:57
uvosno this is disabled in the blobs12:57
uvosat least the omap4 ones12:57
freemangordonbut, is enabled in the driver12:57
uvosright due to the hack12:57
freemangordonSgxClocksEnable/Disable12:57
bencohany idea why TI did that?12:58
freemangordonlets wait for tony12:58
Wizzupfreemangordon: I think I did yeah, let me check12:58
freemangordonWizzup: no need12:58
Wizzupok12:58
freemangordonI know what happens12:58
freemangordonwe have SUPPORT_ACTIVE_POWER_MANAGEMENT enabled, which basically tells the driver:"do not manage the clocks", thus we hit ISR with clocks disabled12:59
freemangordonI disabled SUPPORT_ACTIVE_POWER_MANAGEMENT and it works perfectly so far, will post glmark score as soon as it finishes13:00
freemangordonIRQ counter incerments13:00
freemangordonalso, I think I know th reason for bad use-vbo=true performance with 5.9 and earlier - it was that IRQs were not used13:01
freemangordonnow I am waiting to discuss with tmlind what SUPPORT_ACTIVE_POWER_MANAGEMENT is expected to do13:02
freemangordonomg, 14fps on jellyfish13:02
uvoshttps://github.com/tmlind/linux_openpvrsgx/commit/a20e7866242dde42bb5692c2611f862385c395b513:03
freemangordonI read that and I don;t agree :)13:05
freemangordonSUPPORT_ACTIVE_POWER_MANAGEMENT *disables* clocks being controlled by the driver, IIUC13:05
uvoswell on d4 not having this dose break sgx ever ideling13:05
uvosand the whole chip by extension13:05
uvosbut yeah we need to ask tmlind13:06
freemangordonglmark results https://pastebin.com/hXWt4HPP13:06
freemangordonI am impressed actually13:06
uvoskind of wierd that vbo makes no difference still13:09
uvosbottelneck some else i gues13:09
uvosi mean vbos breaking perf was even wierder13:10
uvosbut yeah looks like ok ish numberws13:10
freemangordonuvos: sorry, but we can;t have more than 60 fps13:11
freemangordonunless I am misunderstanding what you say13:11
uvosok i thought it wasent limited by vsync13:11
uvosbecasue 57fps is a bit wierd13:11
uvosbut yeah ok13:12
uvosmakes sense then13:12
freemangordonwith 5.9 use-vbo=true fps was like 1.513:12
uvosyeah i know13:13
freemangordonnow it is 5713:13
freemangordonalso, we need to check sgx fck runs on the correct rate13:14
freemangordonbut that's not so important now13:14
uvosdid you figure out whats causeign the boot problems too?13:18
freemangordonno13:19
uvos:( ok13:20
freemangordonprobably it is unrelated13:20
freemangordonbut we have oops trace so should be easily fixable13:20
freemangordonhmm, wait, seems I got it wrong14:07
freemangordonSUPPORT_ACTIVE_POWER_MANAGEMENT disables clocks management in some parts of the driver but enables in other parts14:08
freemangordonso, it looks like there is a bug somewhere14:35
freemangordon:D14:35
Wizzupso, apart from fixing those kernel bugs, the next parts are potentially to go through all of glamor and replace EGL_KHR_image into glTexSubImage2D  with something that works with the blobs?15:00
Wizzupor is this still valid:15:01
Wizzup22:29 < uvos> on n900 nothing works for some reason, wrt rendering to gbm textures from gles, fmg mentioned.15:01
Wizzup22:29 < uvos> but idk what the state is there15:01
Wizzup22:30 < uvos> thats pretty mutch all i have15:01
uvosjust 2 places need changeing15:18
uvosthe n900 bug is the bug fmg is currently on15:19
uvosjust 2 places need changeing wrt the KHR_image problem15:19
uvosbut then there is the additional problems with chomeos mesa15:19
uvoswrt reported texture formats15:19
uvosfix all of those and glamor works15:20
uvosmaybe you also need the shim we dont know if thats needed at all with chromeos mesa, at least egl reports x11 support if you use it15:21
uvosbut it might not work beacuse maybe this goes nowhere in blobs15:21
uvosside note on d4 we gain 350 ish mW unavoidable additionaly power usage with ddk1.1715:23
Wizzupin addition to what15:23
uvosover ddk1.915:24
uvosbeacsue ti disabled all pm in the blobs15:24
uvosso the gpu dosent clock down or gate15:24
uvos(except when the display is off)15:24
uvos(with the hack)15:25
Wizzupuhh15:25
Wizzupno working around that?15:35
uvosyou could ignore the blobs and clock down/ gate the gpu anyhow15:35
uvosno idea how they would react15:35
uvosits imo not that bad since the gating was kind of broken in ddk1.9 too15:36
uvosts only more power consumption if the display was totaly static15:37
uvos*its15:37
uvosotherwise if anything was going on on the display the gpu was active anyhow15:37
Wizzupmm15:37
uvosthis is different from the android driver15:37
uvosit gates the gpu as soon as the frame is finished rendering15:37
uvosuntill it needs the next frame15:38
uvosthat saves a bounch of power15:38
uvosso ddk 1.9 was pretty suboptimal allready15:38
Wizzupmhm15:58
Wizzupwell if we can hit RET (and OFF) with 1.17 on n900 and d4 that will already be huge, with modern X/modesetting15:58
Wizzupuvos: are those serial device files useful?16:02
uvoswell...16:07
uvos1. i dont like the design in generall 2. the single dxf file he gave us is really incompleat16:08
uvos3. i dont understand some of the features the file has16:08
uvoslike whats up with the 3 big holes16:08
uvosand it has the big central ejection hole for the battery holder but has the holes for the pogo pins too16:09
uvosso what part is this supposed to be16:09
uvosthe battery holder or the fake battery16:09
uvosthe outer perimiter can be the same16:09
uvos*cant16:09
uvosmakes no sense as is, also where is the frame that goes around the bottom plate of the battery holder?16:10
uvosWizzup: so no16:10
uvosits not usefull16:10
Wizzupthe frame that goes around the battery doesn't really matter, right?16:10
uvosno16:10
uvosbut the dxf file has bits of both pieces16:10
Wizzupregarding liking the design or not, it's more about it being useful/functional I think :p16:10
uvosso idk what part is supposed to be16:11
WizzupI think he said that wrt 'puzzle'16:11
uvosi would not construct it like that16:11
uvosif all you have is a laser cutter it make some sense16:11
uvosbut otherwise its pretty insane16:11
uvosif i where to do this i would maybe take his mesurements16:12
uvosbut otherwise i would machine the battery bit out of some pom16:13
uvosand a pcb to mount the contacts16:13
uvosproparly16:13
uvosor do the flat flex thing16:14
uvossince thats really easy16:14
uvosfor others to repoduce by odering it from a pcb house16:14
uvoscan we promote profilesx to core16:29
uvosand install it by default?16:29
WizzupI'm not super happy with profilex, would maybe rather have the RE version, but I suppose16:30
uvosi think its indefintly better than having no way to setup the settings sphone and mis use16:31
uvosthe ui is not great ill give you that16:31
uvosalso adding profiles fails16:31
uvosnot sure why16:31
Wizzupyeah16:32
Wizzupdidn't debug that either, but did notice it16:32
sicelowow, amazing work freemangordon :-)16:42
sicelo"Never fear. I is here"16:44
Wizzupwe don't have glamor/h-d yet, but hey, it's progress for sure :)16:49
uvosbtw16:53
uvoswrt vm behavior16:53
uvoswe should have leste-config for vm/desktop style devices16:53
uvosyou can configure mce to enforce sane bahvior (ie xorg style lock only)16:54
uvosalso would allow configureing more sane shortcuts for h-d16:54
uvosie alt-f4 for close window etc16:54
freemangordonso, basically, what I see so far is that on n900 with enabled SUPPORT_ACTIVE_POWER_MANAGEMENT, when ISR gets called, ther is a check if SGX is powered on or not. So (and that's something I should verify), it seems on init driver assumes that SGX is powered on, but I am not sure that's the case16:56
freemangordon...16:57
freemangordonso, it thinks the device is powered on (clocks are running) and does not call SGXClocksEnable()16:57
freemangordonbut, because clocks are nit running, we have that abort16:57
freemangordonWizzup: OTOH - I managed to enable all the logs (this time for real :) ), do you mind if I provide that kernel for you to gather traces on abort?16:59
freemangordonthat way I'll have hard evidence that clocks are not enabled because driver thinks they are already enabled16:59
freemangordonont the question what remains - the issue we have is with glTexSubImage2D - this is not allowed on BO backed textures, but glamor does it17:01
freemangordonso, we need to somehow workaround that - the lame solution I came up with is to have another texture that BO texture is copied to17:02
freemangordonunfortunately, this will ruin the performance dramatically17:02
freemangordonre X support - blobs have that compiled out, period17:03
uvosno17:03
freemangordonpvr_dri is just a wrapper17:03
uvosi know17:03
uvosbut this isent where x support is required at all17:03
freemangordonuvos: been there done that, I'd love to prove me wrong, but I am afraid this is the situation - no X support in the blobs17:05
freemangordonuvos: in blobs eglGetDisplay implementation, only gbm and wl are supported17:06
uvoslast time we disscussed this in pm we both agreed in the end that we dont know atm, so unless something changed there the only places we know the blobs have x compiled out17:06
uvosare those that are compleatly replaced by mesas17:06
uvosin the mesa path17:06
freemangordonno17:06
uvosand eglGetDisplay is implemented by mesa17:06
uvosin the chomeos path17:06
uvoswith x support intact17:06
freemangordonit is not, it is just a wrapper17:06
freemangordonagain, I would really love to be proved wrong17:08
Wizzupfreemangordon: sure, can run whatever, let me know17:08
freemangordonuvos: if you have ideas how to test X support, please share, I will cooperate17:08
freemangordonWizzup: sec17:08
uvosno since17:09
uvosyou would have to have x running on the same dri node first17:09
freemangordonWizzup: same link17:10
freemangordonit is a no issue, as X runs with MS/glamor17:11
Wizzup$ md5sum pvr_hang.tar.gz17:12
Wizzupb6f6b9f21d7750def25c8c97ad1a5455  pvr_hang.tar.gz17:12
Wizzupok?17:12
freemangordonsec17:13
freemangordonb6f6b9f21d7750def25c8c97ad1a545517:13
freemangordonso yeah17:13
freemangordonWizzup: keep in mind it takes lots of time to init/hang17:13
freemangordon2-3 minutes maybe17:14
freemangordonplease capture serial in a file17:14
uvosfreemangordon: so here is why i belive its quite possible it works17:15
freemangordonhmm, how do we know SGX starts in  PVRSRV_SYS_POWER_STATE_D0 (fully powered)?17:16
uvoshttps://github.com/IMbackK/mesa/blob/288032a87316f8542d1d5de8b8e1d3a20359ceab/src/egl/main/eglapi.c#L36317:16
uvosthats the implementation of eglGetDisplay17:16
uvosit goes here:17:16
uvoshttps://github.com/IMbackK/mesa/blob/8206053e95d326d4833f70c65d26527b3a8f1607/src/egl/main/egldisplay.c#L12017:17
uvosnote that here there is no x11 support at all17:17
freemangordonexactly17:17
uvoseven though this is the code for radeon17:17
uvosthat HAS x11 support17:17
uvosyou know why17:17
uvosbecause its emulated by fakeglx17:17
uvosi suspect it uses gbm behind the seans17:18
freemangordonwhich makes sense17:18
uvosright17:18
uvosso that code might work fine on pvr17:18
uvosmight17:18
uvosidk but might17:18
freemangordonmaybe it does the same my shim does17:18
freemangordonwhich makes sense too17:18
uvosofc17:18
uvosless paths to implement17:18
freemangordonbut well, how do you get native X display without having support?17:19
uvoswell on desktop glx is used instead of egl17:19
uvoshow egl manages to work i dont know17:19
freemangordondo we have the code?17:19
freemangordonis it foss?17:19
uvosfor what now?17:20
freemangordonegl code I mean17:20
uvosfor radeon17:20
uvos?17:20
uvossure thats mesa17:20
uvospart of mesa17:20
freemangordonfor pvr17:20
uvoschomeos pvr uses  mesa egl17:20
freemangordonuvos: do we have that compiled?17:20
freemangordonfor leste17:20
freemangordonoh, ok, lemme rephrase17:21
uvoshttps://github.com/IMbackK/mesa/tree/mesa-pvr-meamo17:21
uvosits a dpkg-buildpackage away17:21
freemangordondid you try it?17:21
uvosyes it works fine17:21
freemangordonworks fine with wayland I guess17:21
uvosyes17:21
freemangordoncould you try it wit X?17:22
uvosi have17:22
uvosit fails to even try startig because of texture formats availble17:22
uvoschomeos mesa has wierd bugs17:22
uvoshttps://github.com/IMbackK/pvr-omap4/tree/master/usr/lib/arm-linux-gnueabihf17:22
uvosthese are the compainon blobs17:22
uvosnote whats missing17:22
uvosno libgbm and no libegl17:23
freemangordonmhm17:23
freemangordonyou must use libgbm17:23
uvosthose are provided by mainline mesa17:23
freemangordonIMG provide their own implmentation that must be used, afaik17:23
uvosthe mesa one works17:24
uvosin this setup17:24
freemangordonhmm17:24
uvosbtw your test app also works in this setup17:24
freemangordonwhich one of the many? :)17:24
uvoshttp://uvos.xyz/maserati/testapps/gbmPvrTest.c17:25
uvosbut glmark dosent work17:25
uvosthere and some other wierd problems17:25
freemangordonglmark-gbm I guess17:26
uvosyeah17:26
uvosgbm might be partally broken idk i dident investigate as sutch17:26
uvosat least your usage works17:26
freemangordonok, could you create a simple test app that opens :0 and calls eglGetDisplay( (EGLNativeDisplayType) xdpy ); .ofc you have to have Xorg running17:29
uvoswell there is no way to start xorg with accel17:30
uvosso it will end up in dri217:30
freemangordonwhy?17:30
uvoswith will end up in llvmpipe17:30
uvosit dosent start17:30
freemangordonI was able to start it17:30
uvoson plain pvr yeah17:30
uvoson chomeos mesa17:30
freemangordonyeah17:30
uvosit bails immidatly17:30
uvosit complains it cant find a valid textureformat17:31
uvosand just bails17:31
freemangordonyou can start Xorg on IMG blobs and then run test app on mesa blobs17:31
uvosi gues17:31
uvosbut it dont have a working img blobs settup17:32
uvosrn17:32
freemangordonsure, no hurry17:32
freemangordonI can share my blobs dir from my d417:32
freemangordonuvos: OTOH, do you have any idea why pvr driver assumes SGX is powered-up (and with clocks running) on loading?17:35
uvosno17:35
Wizzupfreemangordon: will do it in a bit, sry, something came up17:36
freemangordonNP17:36
tmlindfreemangordon: oh cool you narrowed it down that pm hack patch18:25
tmlindstrange that the devices behave in a different way18:26
freemangordontmlind: I don't think it is the patch itself that brings the problem. it is either DTS or the driver itself that is buggy18:28
freemangordond4 dts has some stuff in dts that is missing form omap318:28
freemangordon*for18:28
freemangordonsome ti,sysc stuff18:28
freemangordonno idea what it is or if it should be there18:29
freemangordonI am waiting Wizzup to capture traces via serial before deciding what to do18:29
tmlindfreemangordon: let me check the dts config18:30
freemangordonok18:31
tmlindfreemangordon: well the 34xx pvr module sysconfig is either broken or write-only and i recall it's best to not mess with it18:33
tmlindit could be that omap4 is working because we have configured SYSC_IDLE_SMART_WKUP18:33
tmlindi'll try again with the omap36xx.dtsi gpu config18:35
Wizzupfreemangordon: need another 30mins then I'll do it18:42
Wizzupfreemangordon: https://wizzup.org/panic-log.txt19:21
freemangordontmlind: look at ^^^19:50
freemangordonactually driver tries to enable the clocks19:50
freemangordonsomething wrong with  pm_runtime_get_sync()?19:51
tmlindyeah ok, i'll take a look20:03
Wizzupfreemangordon: tmlind: just a heads up I catted the wrong two files together, it doesn't really matter for the panic log (the second file was already correct, first was not) but here's the proper one https://wizzup.org/panic-log-2.txt21:11
Wizzupthis page will need some updating hehe https://wiki.maemo.org/Porting/Closed_Packages21:57
lelIMbackK opened a pull request: https://github.com/maemo-leste/profiled/pull/2 (add support for the touchscreen.vibration.enabled key)22:15
lelIMbackK opened a pull request: https://github.com/maemo-leste/maemo-input-sounds/pull/1 (remove gconf usage by adding support for the touchscreen.vibration.enabled profiled key)22:17
lelIMbackK opened a pull request: https://github.com/maemo-leste-extras/profilesx/pull/1 (add support for touchscreen.vibration.enabled)22:19
uvoshttps://github.com/maemo-leste-extras/profilesx/pull/122:19
lelIMbackK opened a pull request: https://github.com/maemo-leste/osso-applet-display/pull/1 (Port to new mce interfaces)22:31

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