libera/#maemo-leste/ Friday, 2021-10-15

freemangordontmlind: trying to devmem2 on anything in the range from 0x5000FE00 to 0x5000FF0C gives bus error (and 'external abort on non-linefetch'), so OCP on 3430 *must not* be touched07:45
freemangordonIIUC07:45
freemangordonI wonder if https://elixir.bootlin.com/linux/v5.15-rc5/source/drivers/bus/ti-sysc.c#L1499 is correct at all, given that it is executed unconditionally, no?07:46
tmlindfreemangordon: hmm i'm pretty sure i tested that when adding it, did you do echo on > control for the module before reading?07:48
freemangordonkmscube is running while I am trying to read those vals07:49
freemangordonlemme do what you say (control)07:49
tmlindok, yeah that's the ocp range, right? that is broken on 34xx afaik, so yeah if the ti-sysc sgx quirk is applied for 34xx instead of 36xx we need to fix it07:49
freemangordonmaybe it is not applied, but anyways ti-sysc tries to read memory that's not accessible07:50
tmlindit is enabled based on the sgx revision register, if it was enabled for 34xx, sounds like you should see errors all the time when idling sgx07:51
tmlindactually when enabling sgx07:51
tmlindnote the comments in the dts on how we read the sgx ip rev register, not the ocp register on 34xx unlike on 36xx07:52
freemangordontmlind: I disabled pvr from touching OCP and everything works now, see backscroll07:52
tmlindyeah nice :)07:52
freemangordonbut, ti-sysc will try to read OCP revision with your omap3-prm-gfx.patch, no?07:53
tmlindwith the runtime pm in use with ti-sysc we should not tinker with the ocp regs in the pvrsgx driver at all07:53
freemangordonthis https://elixir.bootlin.com/linux/v5.15-rc5/source/drivers/bus/ti-sysc.c#L149907:53
tmlindfreemangordon: see the 34xx dtsi vs 36xx dtsi07:53
freemangordondon;t understand07:54
freemangordonisn't the code ^^ going to read 0x5000ff08 to try to detect 3630?07:54
tmlindfor 34xx rev is not configured that way so no match07:55
freemangordonso, it matches only the first entry in that table (ti-sysc I mean)?07:56
tmlindfor 34xx we have rev reg = <0x50000014 0x4>;07:56
freemangordonand once it matches rev 121 it will ignore the next entry?07:57
tmlindit matches the address and the mapped register offsets as the revision register alone may not be unique07:57
freemangordonah, ok, so it uses the data from dts to match against revision address and then reads revision reg to match the revision?07:58
freemangordonso, it will not match 3430, ok07:58
tmlindyeah as we can't just blindly attempt to read the revision register unfortunately :)07:58
freemangordonI was under the impression this is what we do :)07:59
freemangordonotherwise I don;t understand why you patch changes the behavior07:59
tmlindwhich patch?07:59
freemangordonomap3-prm-gfx.patch07:59
tmlindthat just configure the prm register, do you still need to disable off mode or something?08:00
freemangordonwell, "was changing" as I didn;t try it with SGX_OCP_REGS_ENABLED commented out08:00
freemangordonso maybe I shall try it08:00
tmlindah ok, yeah08:00
freemangordongoing to08:01
tmlindwe should just remove the whole SGX_OCP_REGS_ENABLED code for 1.17 directory as it's confusing08:01
tmlindwhat a time waster trying to see what the pvrsgx code is doing :(08:01
freemangordonwe should remove SGX_OCP_REGS_ENABLED for 3430 only08:02
freemangordonnot sure how to detect that though08:02
tmlindafaik there should be no need to keep it for any hardware with pm runtime available in the linux kernel08:02
freemangordonor, for rev 121, not sure what is correct08:02
freemangordonSGX_OCP_REGS_ENABLED also enables code that enables/disables interrupts08:03
tmlindi think that's only the thalia quirk that we already handle with runtime pm in ti-sysc08:03
freemangordonno, it is not08:04
freemangordoncheck the code08:04
tmlindwell we should just move that code to the pvrdrv.c to either runtime functions or interrupt related functions08:04
tmlindah so do you have SysEnableSGXInterrupts enabled now?08:06
tmlindwithout SGX_OCP_REGS_ENABLED?08:06
freemangordonno08:06
freemangordonI mean it is a noop, IIUC08:06
freemangordon#defineSysEnableSGXInterrupts(psSysData)08:06
freemangordonbut, interrupts still work fine08:07
tmlindhmm we can just remove that crap, SysEnableSGXInterrupts just enables the thalia quirk08:07
freemangordonnot really08:08
freemangordonOSWriteHWReg(gpvOCPRegsLinAddr, EUR_CR_OCP_IRQENABLE_SET_2, 0x1);08:08
tmlindoh it does toggle something, ok so let's move it to the pvrdrv where it belongs08:08
freemangordonok, but please, disable all this crap for 3430 :)08:09
tmlindso how do you have interrupts working for 34xx then? no way to mask them?08:09
freemangordonby enabling SYS_USING_INTERRUPTS08:10
freemangordonwhy would I want to mask interrupts?08:10
tmlindwith SGX_OCP_REGS_ENABLED commented out so SysEnableSGXInterrupts does nothing?08:11
freemangordonyes08:11
tmlindok yeah so must not touch the ocp regs on 34xx, others should have the interrupt handler in pvr-drv.c08:11
tmlindthe interrupt enable/disable in pvr-drv.c08:11
freemangordonI commented out lines 104-107 in syslocal.h08:12
freemangordonand enabled SUPPORT_ACTIVE_POWER_MANAGEMENT and SYS_USING_INTERRUPTS08:12
freemangordonand that's it08:12
tmlindok, maybe push out your kernel changes so i can see what it's against?08:13
tmlindyou do have 1.17 instead of 1.14 in the .config, right?08:13
freemangordonI am using your tree, nothiong but 1.17 there :p08:13
tmlindyeah because the default is 1.14 otherwise and you easily test the wrong driver :(08:14
freemangordon"gpu: pvr: Drop all old ddk versions"08:14
freemangordon"ARM: omap2plus_defconfig: Use ddk-1.17 by default"08:14
freemangordon:)08:14
freemangordonI just removed your tiler patches as they break 343008:14
tmlindok so if you post a patch with your changes and which commit it's against i'll test here when i get a chance and try to do a fix for the pvrsgx tree08:14
tmlindok i'll try to get the pvr branch working both for omap3 and 4 at least08:15
freemangordontmlind: I will have to come-up with yet another macro to define that disables oc appcess08:15
freemangordon*ocp08:15
tmlindnah let's just remove that crap and add do it in pvr-drv.c based on the quirks flag there08:16
tmlindthese ifdefs are just totally out of control08:17
freemangordonI don;t feel comfortable doing that08:17
freemangordonor, you want you to do it?08:17
tmlindi'll do it, just post your hacks so far so i can verify against that on n90008:17
freemangordonah, ok08:17
freemangordonok, need to clone your tree first :)08:17
tmlindso what you have working, and what commit it's against08:17
tmlinda patch is fine too just do git diff from some my commit with all the reverts etc08:18
freemangordonok, sec08:18
freemangordonhmm, wait, I want to test with your omap3-prm-gfx.patch patch first, gimme 10 minutes08:19
tmlindok yeah i'll have to take a look at that stuff later, nice that you chased down the issues though :)08:19
freemangordon:)08:20
freemangordonBTW, if you have a couple of minutes, read the backscroll from after we talked yesterday evening08:20
freemangordonto confirm SGX idles fine08:20
tmlindyeah that's all there is to it, clocks get disabled, then the prm driver disables the power domain after the module is idle08:24
freemangordontmlind: it works with omap3-prm-gfx.patch patch on top as well09:43
freemangordontmlind: this https://www.mail-archive.com/linux-omap@vger.kernel.org/msg17821.html to ti-sysc as well, right? as a quirk for rev 121, IIUC09:44
freemangordons/to ti-sysc/belongs to ti-sysc09:45
freemangordonuser@devuan:/media/user/7b76ddc8-44f5-47b5-af5b-e5e9b5ab39c3/user/linux_openpvrsgx$ git log --pretty=oneline tmlind/droid4-pending-pvr-omapdrm-v5.15..HEAD09:46
freemangordon25d1b6bd9a6e2b6093a61980fa6ee70589e27f2b (HEAD -> droid4-pending-pvr-omapdrm-v5.15) Revert "drm/omap: Fix page fault handling and flush what framebuffe wants flushed"09:46
freemangordontmlind: ^^^ this is only difference with your droid4-pending-pvr-omapdrm-v5.15 branch09:46
freemangordonin terms of commits that is09:47
freemangordonand https://pastebin.com/BRKpziHV is the result of git diff09:47
freemangordontmlind: please LMK if you need anything else09:48
freemangordonBTW I am goint to try without the revert09:49
freemangordontmlind: yeah, 33bc438d6d8883d77e37b369fe5144ee9b01fad8 has to be reverted otherwise device won;t boot09:56
lelIMbackK synchronize a pull request: https://github.com/maemo-leste/libmatchbox2/pull/8 (Drop support for _MOTIF_WM_HINTS)11:03
Wizzupgreat work re: sgx11:23
siceloIndeed!11:23
freemangordonWizzup: how had is to port pvr xorg river to 1.17?11:26
freemangordon*how hard11:26
freemangordonI don;t thing glamor makes sense11:26
freemangordon*think11:26
uvospvr xorg driver makes no sense11:27
uvosits not even a kms driver11:27
uvosthe omapdrm one makes some sense11:27
uvosbut you cant get 2d acell with it because 1. the module it uses for that is closed source and dosent work with modern xorg abi11:29
Wizzupfreemangordon: to port the n900 one we use right now?11:29
WizzupI don't think that would make sense per se, I'd probably suggest to take the modesetting driver and add 2d on top of it using the 2d sgx code in some fashion11:29
uvosso it would make more sense to decouple dri3 from glamor in modesetting, there is no reason for dri3 to not work with sw 2d rendering11:29
Wizzupbut the exact calls tht are used there do not exist11:29
uvosand this decoupaling was planned11:29
uvosand then droped when everyone moved to wayland instead11:30
WizzupThe 2d code/api probably exists in some form still, but not in the one we use currentenly on the n900, but also that's a very old fbdev driver with endless hacks I'd really like to not use11:30
uvospvr2d still exists11:30
Wizzupright, but I recall the api changed some or something11:31
Wizzupin any case I think we should be able to register a specific exa module for the driver, no?11:31
WizzupWe could add another AccelMethod to modesetting for example11:31
uvosyes11:32
uvosbut a seperate modesting based ddx makes more sense11:32
uvossince we could build that seperatly instead of forking all of xorg11:32
Wizzupright but the proof of concept / work would be the same11:32
uvossure11:32
Wizzupthat's just a packaging change11:32
uvos"so it would make more sense to decouple dri3 from glamor in modesetting, there is no reason for dri3 to not work with sw 2d rendering"11:32
uvosthis makes the most sense at first11:32
uvosand would allow the same state as omap ddx on d4 atm11:33
uvoswith acell11:33
uvosie 3d but no 2d11:33
Wizzupyeah maybe you said the same but I can't comprehend fully because of my limited xorg knowledge11:33
uvosand would be welcomed upstream most likely11:33
Wizzupright it would also provide exa on d411:33
uvosas again this was planned anyhow11:33
Wizzupcan you explain that in more layman terms?11:33
uvosso in modesetting dri3 is tied to glamor because glamor implements some bits of it in gl. so modesetting without glamor falls back to dri2 for 3d. dri2 needs special driver support that wayland kms/drm drivers dont nesscarly have (ie pvr dont some other modern drivers dont).11:35
uvosimplementing non gl fallback paths for non glamor modesetting would allow dri3 to be used and thus accelerated 3d on pvr, in the same fashion as the omap ddx for 1.9 without the sgx2d module that is closed source11:36
Wizzupwasn't the sgx2d a very small lib that fmg re'd before?11:37
uvosie any gl draw calls by applicaitons are acellerated as is compositing11:37
uvosbut core x rendering is not11:37
uvosWizzup: the pvr2d lib for was 1.9 was of sane size yeah11:37
uvoswe would need to implement something like it if we want core x to be acclerated11:38
uvosbut this could come later11:38
Wizzupok11:38
WizzupI'd be happy to help but I really don't know where to start11:38
uvoswell i dont either11:40
uvosim not convinced fmg is correct even wrt glamor being a bad idea11:40
uvosits possible its perf will be bad11:40
uvosbut at least on pvr sgx545 it must have been possible to be ok (given that glamor was initally developed for this chip a long time ago....)11:41
uvoswe could also check out how modern kms/drm ddx drivers work that support dri3 without glamor11:42
uvoslike the nouveau11:42
uvosand i think the omap5 one (maybe)11:42
uvosthe difference being that the omap5 dirver implments 2d accell (and very likely drawing surfaces for the present extension) on the 2d core that omap5 (and omap4670?) have11:45
uvos*omap447011:45
WizzupI think pvr has a 2d unit11:46
uvosright11:46
Wizzupso using that rather than 3d sounds like a good idea11:46
Wizzupin principle11:46
uvosor rather it dose 2d somehow11:46
Wizzupright11:46
uvosits proubly useing the 3d engine11:46
WizzupI am not so sure11:46
uvosbut later omaps have a deicated 2d chip11:46
Wizzupif it uses the 3d engine then yeah, it might be the same11:47
uvoswell it would be better optimized11:47
uvosthey have special microcode for 2d11:47
WizzupI think it might make sense to at least fix glamor and then see just how bad it is11:48
Wizzupdepending on how much fixing it needs11:48
Wizzupgetting the 2d to go is also a way into mainline..11:48
uvosfixing it its easy (realtivy)11:48
uvosfixing it without copying every surface is hard11:48
uvosand ofc prf wise its not fair if you copy every surface :P11:49
freemangordonthats the issue11:52
freemangordonwe cannot fix it without copying every surface11:53
freemangordonwith doing that perf goes down the drain11:53
freemangordonmy test application does that copying with 15fps on n90011:53
freemangordonand was something like 50-60 fps on d411:54
freemangordonbut, keep in mind this is *the only* thing test app does11:54
freemangordonso in RL performance will be even worse11:54
uvosstill faster than glxgears on ddk1.9 :P (wich clearly is also copying surfaces)11:55
uvos*es2_gears11:55
uvosbut ok11:55
uvosif its not possible idk11:55
freemangordonsec11:55
freemangordonuvos: if you want to review the code I am using to test fix for glTexSubImage2D, please LMK11:56
freemangordonit is perfectly possible I am doing something wrong, thus the bad perf11:57
uvosi have seen it11:57
freemangordonok11:57
freemangordonthis runs with 15fps11:57
uvosi dont know enought about gl to say11:57
freemangordonbut even if it was running with 50fps, still copying every BO backed texture is insane11:58
uvosyeah11:58
freemangordonso, I am not sure my idea of having pvr driver that is not glamor makes sense11:59
freemangordon*makes no11:59
uvosim not saying it dosent11:59
freemangordonuvos: so, you say we shall stay with modesteenig/dri2?11:59
uvosno12:00
uvosi would investigate dri3 without glamor in modesetting12:00
freemangordonplease explain to us mortals who are not deep in xorg architecture :)12:00
freemangordonwho will implement 2d accel?12:00
uvosno one12:00
freemangordonthat'd mean we'll scroll long lists for ages, no?12:01
freemangordonand there will be no XV surface, and... and...12:01
uvosyeah, yes yeah12:01
uvosbut we can improve that later12:01
freemangordonso no video playback, and basically useless device12:01
freemangordonhow?12:01
uvoswell you create a module that implements core x rending on pvr2d12:03
uvoslots of work12:03
freemangordoncan't we just RE the one from 1.14 and port it to 1.1712:03
uvosdident 1.14 drop that allready12:03
freemangordonlemme check12:03
uvosbut yeah maybe depends on if pvr2d still is the same api wise12:03
uvosbut at first you can get something that at least works as well as ddk 1.9 on d4 by "just" implementing dri3 on modeseting12:04
uvosanalogous to how the nvidia mesa ddx driver dose it12:04
uvos*modesetting without gl12:05
freemangordonbut we won;t have 3d, no?12:05
uvosyes we would have 3d12:05
freemangordonbut for gbm and wl only, no?12:05
uvosglamor is only a hard requirement for dri3 on modesetting beacuse it uses it to render the present surfaces iiuc12:06
freemangordonoh, ok, I think I get your point12:06
freemangordonbut, this already works, no?12:06
uvosno12:06
freemangordonmodesetting+dri212:06
freemangordonhow's that?12:06
freemangordoniirc we patch xorg to even try glamor on ES212:06
uvosso im pretty fuzzy on dri2 but it hooks into mesa x11 support code directly12:07
uvosand dosent work on just plain  kms/drm/gbm driver12:07
uvosso no dice on pvr12:07
freemangordonyeah, it id dri312:08
freemangordon*it is12:08
freemangordonso, your suggestion is to have dri3 without glamor working?12:08
uvosyes12:08
freemangordonno way12:08
freemangordonlemme explain:12:08
uvoslook at what the nv driver dose12:08
uvosand omap5 dxx12:08
freemangordonwait12:08
freemangordonlemme explain12:08
uvosthey use other hw blocks to copy the surfaces12:08
uvosfor present12:08
uvosor rahter blit12:09
freemangordonyou cannot mmap bo with pvr12:09
freemangordonso you simply cannot render on it without GL12:09
uvoswell im sure pvr2d can grab surfaces from its mapped space12:09
freemangordonbut we don;t know how12:10
uvosyou could have a tiny accel module that uses pvr2d only to blit it12:10
uvosit = present surfaces12:10
uvoswell yeah12:10
uvossure we dont12:10
freemangordonuvos: so, your idea is to:12:10
uvosi dont see how we know how to implement a full pvr2d xorg ddx either12:10
freemangordonuse modesetting with dri3 to create BOs, then find a way to mmap those BOs so xorg code can render on that?12:11
freemangordonis this your idea?12:11
uvosthat would work yeah12:12
freemangordonI don;t think we can mmap12:12
freemangordonBTW, there is anotehr way - using bufferclass12:12
uvosso how do wayland wms get cpu renerd surfaces into pvr12:12
uvosthey just upload a texture no?12:12
freemangordonGL12:12
freemangordontexture + shader12:13
freemangordonI am not aware of any other way12:13
uvosso the BO backed textures wich are those12:13
uvosthe core x renderd ones12:14
uvos?12:14
freemangordonno, BOs are created by gbm_create_surface() (or whatever the function was)12:14
freemangordonthen you create a texture/fbo from that BO, and render on that FBO12:14
freemangordon(IIRC)12:15
freemangordonI guess WL does something similar12:15
uvosright but in wl it works somehow12:15
uvosso which are created like this?12:15
freemangordonuvos: keep in mind it makes lots of sense to disable mmap() for such surfaces12:15
freemangordonin terms of xorg - I think front and back buffers12:15
freemangordonin modesetting that is12:16
uvosright but why12:16
uvosx could just draw its 2d stuff using the cpu12:16
uvosupload it as a gl texture12:16
freemangordonthat's what they do12:16
freemangordonbut, fron/back buffers must be BOs to pass to dri12:16
uvosand then compose that + gl clients to the front buffer12:16
uvosok12:17
uvoshmm12:17
freemangordonlook at Linux_DRM_OpenGLES.c12:17
freemangordonit uses front buffer only, but API is the same12:17
freemangordondrmModePageFlip()12:17
freemangordonso, on mmap - it makes perfect sense to disable that, otherwise all the GPU caches/pipelines and optimizations are basically useless, as you have to flush the rendering on every access to mmap-ed memory12:19
freemangordonno?12:19
uvosyes12:19
freemangordonre 2d driver - I think I will be able to RE the one from older ddk, there are ones with debug symbols there12:20
uvosidk how mutch that helps us really12:20
uvosis accelerating exa12:20
freemangordonyes12:20
freemangordonand 3d is already accelerated12:21
freemangordonunless I miss something12:21
freemangordondri3 does that for us, no?12:23
uvosdri3 dosent work without glamor in modesetting so we are back to where we started12:24
uvosyou need to find a way to implement dri3/present without gl12:25
uvosnot impossible12:25
freemangordonyes, but we can implement that simple 3d renderin12:25
uvosothers have done it12:25
freemangordonno, why, I will do present with GL, there is no issue with it12:25
uvosyes you can use gl i ment without glamor12:25
freemangordonwe have issue with 2D in glamor, not with present12:25
freemangordonmhm12:25
uvosie just that bit of glamore that implements that12:25
freemangordonexactly12:25
freemangordonanother option - what about XWayland?12:26
freemangordonthis is supported upstream UUIC12:26
freemangordon*IIUC12:27
uvosmy knowlage mostly deserts me here but xwayland renders it stuff via gl or sw, creates a buffer via gbm to shove that into and pases that to the wl wm12:27
uvosiiuc12:28
freemangordonand we are back in square one with glTexSubImage2D issue12:29
uvosyes12:29
freemangordonalso, I still think perf-wise glamor will be next to useless even on d412:30
Wizzupwhat about the omap5 driver that implements 2d for omap5s?12:37
Wizzupmaybe there's usable stuff there12:37
uvosit implements everything (icl bliting buffers) on the ti 2d core12:38
uvosso its of limited use12:38
uvosas documentation how to implement sutch a ddx driver its usefull other wise not so mutch12:38
Wizzupok12:38
Wizzupso adding another accel method based on glamor but using different 2d ops could potentially work?12:40
Wizzup(e.g. the 'old' ones we use now on n900)12:40
uvosWizzup: maybe the probelm isent how to render the 2d elements per say12:44
uvosbut how to get them to the display12:44
freemangordonok, we even have file names12:59
freemangordonoh, 2d driver loads some code fragments into sgx (like blit)13:06
freemangordonI guess I can RE that in 1-2 weeks13:09
Wizzupmight be worth to check if it uses apis that are still available13:28
Wizzup(if not, REing makes a lot less sense)13:44
Wizzupstill, if we can get glamor to go with not too much effort (even though we copy a lot) it might still be worth just for the milestone + working thing13:44
freemangordonWizzup: I saw glamor semi-working on d4, takes a second to render xterm14:26
freemangordonthis is without copying14:27
freemangordoncopying it needed by firefox, for example14:27
freemangordonand it will slow-down already very heavy browser14:27
freemangordonlibpvr2d is still there on 1.17, don;t know how much APIs match between Graphics_SDK_5_01_01_02 and this14:32
freemangordonbut worths trying14:32
tmlindfyi, i think the pyra folks mentioned at some point that the neon functions were fastest for 2d, there's some xserver-neon or something14:43
tmlindi think xwayland suffers from the same glamor issues with gles2 as xorg meaning currently xwayland is not accelerated for sgx14:44
tmlindfreemangordon: so did you try that pm34xx.c fix and verify it blocks off idle?14:51
tmlindhmm warm reset in off mode, how do you do that?14:52
tmlindi think only the macro boards had a reset button..14:53
lelparazyd transferred a repository: https://github.com/maemo-leste/profilesx14:57
uvostmlind: rendering a buffer on cpu is not the issue14:59
uvosnote: check out how https://github.com/endlessm/xf86-video-armsoc works14:59
uvossome vague description: https://lists.x.org/archives/xorg-devel/2012-May/031250.html14:59
freemangordontmlind: well, fremantle kernel has that fix. no idea if it is needed or not, but judging by the fact Nokia created the patch, I would say yes15:02
freemangordonnot sure I understand "did you try that pm34xx.c fix" part15:02
tmlindi doubt that patch is needed, sounds like it's only for the macro boards15:13
tmlindbut yeah, if off mode stops working after a warm reset in off mode, then sure we need it15:13
tmlindwe can test that core off keeps working by decreasing the off idle mode time like i described earlier15:14
tmlinduvos: hmm so is your d4 consumes more in idle than bionic test case with the modem online?15:28
freemangordontmlind: ok, if you say we don;t need that patch, I believe you :)15:39
freemangordonuvos: re armsoc - IIRC it uses the API that was before GBM, and mmap buffers15:40
freemangordonDMABUF?15:42
freemangordonhttps://github.com/endlessm/xf86-video-armsoc/blob/master/src/armsoc_exa.c#L31015:43
* freemangordon checks if pvr driver supports this15:51
uvosGEM15:52
freemangordonmhm15:52
freemangordonPRIME?15:55
freemangordonit seems omapdrm supports that15:56
freemangordonhowever, this is not accelerated through PVR 2D engine, IIUC15:56
uvosprime exchaned buffers between gpus with gem iirc15:57
freemangordonok, but blits still won;t be accelerated, no?15:57
uvosno final blit would be cpu15:58
uvosbut that would be ok if the pvr dri node can give you a gem buffer without copying15:58
freemangordonpvr_drv does it through 2D engine, IIUC15:58
uvosyou have to transfer the buffer off of the gpu anyhow since its seperate from the dss15:59
uvosnot sure how this works atm actually15:59
uvos(ddk 1.9)15:59
uvosi gues -video-omap must do this15:59
freemangordonin Graphics_SDK_5_01_01_02 there is pvr_drv.so (xorg EXA driver), which allocates memory through libpvr2d.so16:00
freemangordonlater on this memory is passed back to PVR2DBlt16:01
uvosyeah but how dose it work in the fallback path16:01
freemangordonah16:01
freemangordonwell, omapdss supports GEM, IIUC16:02
freemangordonbut all this is not accelerated16:02
uvosyeah sure16:02
freemangordonmaybe I should simply RE that, 50K of code shouldn;t take that much16:02
uvosbut how dose the bufer from pvr for accelerated clients get into omapdsss16:02
uvosthey must share gem handle16:02
uvosfor that buffer16:02
freemangordonI think they do16:03
freemangordonbut I guess tmlind can share more info on that16:03
freemangordonI think he wrote a patch exactly for that16:03
* tmlind knows nothing about that stuff16:03
uvosthe guestion then becomes dose this api still work in 1.1716:04
freemangordonhmm16:04
freemangordonit should work, as this is part of the SDK16:04
uvoswhat is part of sdk?16:04
freemangordonlibpvr2d.so16:04
uvosno not that16:04
uvosthe fallback path16:05
freemangordonah16:05
uvosie create a gem handle on on card1 with accel client and move it to card016:05
uvosfor composing on cpu/ rendering out16:05
freemangordonI think this is what works with modesetting and no glamor16:05
uvosno16:05
uvosat least not for me16:05
freemangordonno?16:05
freemangordonwait, it was working16:06
uvosmesa just refuses to use pvr_dri.so in this constilation16:06
freemangordonI am sure16:06
freemangordonah, yeah16:06
freemangordonit uses dri2, IIUC16:06
uvosright16:07
freemangordonbut again, I don;t have any deep knowledge on the matter and it was while ago I used it16:07
uvosand something is missing for dri216:07
uvoswhich might be the gem interface16:07
freemangordonpvr_drv is what is missing :p16:07
uvosok16:07
uvosi have no idea how dri2 works16:07
freemangordonthat provides EXA through libpvr2d.so16:08
uvossure16:08
uvosbut dri2 works on ddk1.9 with no pvr2d accell16:08
uvosso whats missing in the ddk1.17 setup16:08
uvosis the question16:08
uvosfor the fallback path16:08
freemangordonah, right16:08
freemangordonsec16:08
freemangordonlibpvrws_KMS.so / libpvrws_WAYLAND.so16:10
freemangordonuvos: what do you mean "works"?16:11
uvosworks in what sentence16:11
uvos"i have no idea how dri2 works?"16:12
uvos?16:12
freemangordon"(17,08,26) uvos: but dri2 works on ddk1.9 with no pvr2d accell"16:12
uvoswell it works in that x is able to render its buffer on cpu that is combined with gles clients on pvr and sent to omapdrm  for output16:13
uvoswith bad but not unusable performance16:13
freemangordonthis is with that patched omap-fb exa?16:13
freemangordondo you know which repo are those binaries?16:14
freemangordonfor 1.916:14
uvosxf86-video-omap16:14
uvoshttps://github.com/maemo-leste/pvr-omap416:14
freemangordonyeah, those16:14
freemangordonuvos: libpvrws_OMAPDRI2.so is what is missing16:15
freemangordonactually, the whole 'WS' stuff was removed16:15
freemangordonif that wasn;t the case (removed) there would have been no need for the shim16:16
uvosyeah i know16:16
uvosthe question is how dri2 works and whats in there even16:16
uvosbut i should just read the omap ddx and what it uses in the fallback path myself16:16
freemangordonah16:17
freemangordonI think it still calls libpvr2d.so to mmap gpu memory16:17
uvosaha16:17
uvosneat16:17
uvosso we can do that16:17
uvos(if it still works with modern libpvr2d)16:18
freemangordonhmm, no16:18
freemangordonit calls omap_bo_map16:18
freemangordonbut should be the same basically16:18
freemangordonand that is in omap_drm, IIUC16:19
uvosomap_bo_map might be one of those functions that where there only to support sgx and where removed16:19
freemangordonIIUC, this was one of those HW specific libs that were needed by dri216:20
freemangordonit is in omap_drm lib16:20
freemangordonlemme check on my d416:21
freemangordonyes, there is such library16:22
freemangordonlibdrm_omap.so.1.0.016:22
freemangordonhttps://github.com/grate-driver/libdrm/blob/master/omap/omap_drm.c16:23
freemangordonso, I guess we can make this work16:23
freemangordonbut, I would say this is a dead-end as we don't use PRV 2D engine16:24
freemangordonmaybe the best option is to use PVR driver from meego and port it to modern xorg16:25
freemangordonor, /me to RE the ones in Graphics_SDK_5_01_01_02 and port them to 1.1716:25
freemangordonPVR2DMemMap is still there in 1.1716:36
freemangordonPVRSRVAllocDeviceMem too16:39
freemangordonuvos: also, we also have declarations of all the exported functions, structs, everything16:51
freemangordonfor example: https://github.com/tmlind/linux_openpvrsgx/blob/droid4-pending-pvr-omapdrm-v5.15/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/include4/services.h16:52
konafreemangordon: is the platform gated on modest-providers in some way?18:47
konai don't want to hold things up, but i haven't been able to give it any time18:48
Wizzupuvos: btw I was on the croatian/bosnian border a few times and got quite a few smss on sphone about changing country - was nice20:09
Wizzupfreemangordon: I wonder if our use case / problem is worth discussing with tomi or others who might know more20:10
uvosWizzup: neat20:19
uvosWizzup: well anyone who would listen how has more knowlage would be great, but ofc most will, rightly so, not be interested in pvr crap. tomi might ofc.20:20
Wizzupright20:22
uvosbtw freedreno works really well with xorg20:23
uvos(on pmos)20:24
uvosi should really maybe port leste to xt160220:25
Wizzupno keyboard though right?20:27
uvosno20:28
Wizzupstill, would be cool20:28
uvosbut otherwise its really well suported20:28
uvoseven calls and stuff work20:28
uvosexcept that it has audio routing issues20:28
Wizzupright20:28
uvoslike xt89420:29
Wizzupthe more the merrier I guess, although I think we'd still want to solve the pvr stuff20:29
uvossure ofc20:29
uvosi was just noteing20:29
Wizzupyeah good ideas20:29
uvosthat freedreno works well while we have problems with pvr and mali too20:29
Wizzupyeah, I also bought a nexus 5 for leste at some point20:31
WizzupI think parazyd has it20:31
Wizzupat the time I tried it we had some h-d bugs for rotation, but otherwise I already had 3d working20:31
Wizzupthis was 2+ years ago20:31
uvosrotaion works fine20:31
uvoswith xrandr20:31
Wizzupyeah, *now* :)20:31
uvosso is a solved issue or was hildon ackting up20:31
uvosyeah20:31
Wizzuphttps://wizzup.org/leste-n5-initial.jpg20:31
uvoslooks like the hildon dosent like the crtc changing bug20:32
uvosthat still exists20:32
WizzupI don't think so, this is a different one20:32
uvos(ie change resolution on hdmi, it looks exactly like that)20:32
uvosok20:32
Wizzupthis was about starting h-d on any display that was higher than it was wide20:32
Wizzupe.g. d4 too20:32
uvosok20:33
Wizzupso we should retry some time, but atm I don't want to, cause it feels like a bit of distraction20:33
Wizzupbut yea20:33
uvosif it wernt for the keybord i would be sorta ok with outright dropping the pvr devices over the constant strugels with 3d20:34
uvosbut well.....20:34
uvoshere we are20:34
Wizzupclearly there is a link between pvr and keyboards20:37
uvosyou joke but MSM8916 dosent have a keyboard matrix20:40
uvosbut other varants do afaik20:41
uvosnot that adding a i2c keyboard is hard20:41
Wizzuphehe20:42
uvoscase point for code formating: i want to change debug("something") to sphone_log(LL_DEBUG, "something")21:59
uvosbut sphone person used debug("something") debug ("something") debug    ("something") debug( "something" ) and debug ( "something" )22:00
uvosgreat22:00
Wizzupyikes22:01
uvosdebug("book_import_csv: add dial column: %d\n", column),dialcolumns++,headers[column]=1;22:05
uvosi have to admit i dident even know that was valid c22:05
Wizzuplol22:07
freemangordonkona: don;t worry, it is not important22:08
freemangordonstill, good to have some day :p22:09
freemangordonWizzup: what exactly to discuss with tomi? I'd say for the others xorg is dead and buried.22:09
freemangordonalso, what we have here is low-end HW noone but us is interested in22:11
freemangordonn900 is simply not capable of supporting galmor, according to to what I was able to understand so far22:11
uvoswell not the way its written, clearly you can draw with gles and compose everthing with gles to the screen from a hw perspective22:13
uvossince wayland wms do exactly that22:13
Wizzupfreemangordon: I figured he might have some ideas, but it sounds like you mostly have a good sense of what ought to be done now22:14
Wizzupstill, I'd take n900 with glamor (albeit slow) over 5.1 with old x ddx, but a path towards fast 2d is really nice (also for d4!)22:15
freemangordonright, but what is the point of wasting resource on something that we already know will be next to useless in terms of performance (glamor)22:18
Wizzupfair enough22:18
freemangordoneither we find a zero-copy way or we waste cpu/gpu cycles and battery juice22:18
Wizzupright22:18
freemangordonsee, maybe what I think shall be done is not the right thing to do22:19
freemangordonbut as I see it none of use have the whole picture and until we try, we never know22:19
freemangordonwell I tried glamor already and I am convinced this is not the correct thing for our usecase22:20
freemangordonon n900/d4 that is22:20
freemangordonfor more powerful ES3 devices, it is another story22:20
freemangordonbut for those who barely cover 2.1 we cannot use it and better look at TI already did back then22:21
freemangordonREing ~50KB lib is nothing compared to the time I already wasted on glamor/xorg without major success22:21
freemangordonI might be wrong as well, but...22:22
uvoswell reing that lib is hardly sufficant22:22
freemangordonfor 2D it should be22:22
Wizzupwe still need to use the lib in the modesetting fork22:23
Wizzupand integrate that22:23
Wizzupbut yeah22:23
uvosyou still have to port omap ddx to dri3 and whatever changes come with the newer blobs22:23
Wizzuphm, why can't we use modesetting?22:23
freemangordonmodesetting will be happy with dri2 EXA22:23
freemangordonif we dont; use glamor22:23
uvosexcept the iiuc dri2 path is not possible since you can shim it the same way22:24
uvosso how would 3d clients work...22:24
freemangordonyeah, I will have to think about that22:24
uvosin dri2 the server has to create the buffer and hand it to the client22:26
freemangordonuvos: but, honestly, do you think glamor is a viable option given it doe not support ES2?22:26
freemangordon*does not22:26
uvosi dont see how you gonna shim that22:26
uvoswdym? it supports es2 just fine22:26
uvosmostly22:26
uvosslightly out of spec maybe22:27
freemangordonBTW, if we are to implement video playback in glamor, we'll have something like 10fps for fullscreen22:28
freemangordonon n900 that is22:28
freemangordonSGX530 is simply not powerful enough for that22:28
uvosnot sure how you come up with these numbers but ok22:28
Wizzupprobably mem b/w?22:28
freemangordonbecause I played a lot with it back then when I was rtying to implement embedlite22:28
freemangordonback then mozilla switched to GL rendering for gecko22:29
freemangordonecause of webgl22:29
freemangordon*because22:29
freemangordonso, videos were decoded to textures22:30
freemangordonI played "Big Buck Bunny" countless times trying to optimize to an acceptable performance22:31
freemangordonno dice22:31
freemangordonwe have another option I don;t really like - bufferclass22:31
uvosim going to press x for doubt that sgx cant scale and transform  a 1080p texture at 30 fps, and the ducati decoder works in the same memory so there is no copying needed22:31
WizzupWhy would it be 1080p?22:32
uvosdecoder maximum22:32
WizzupThe n900 can't even decode 720p using the hw decoder22:32
freemangordonmhm22:32
uvosoh ok22:32
uvoswell omap4 then22:32
freemangordonit can, but low profile only22:32
Wizzupin any case I think this is not super relevant22:32
uvossoftware /driver issues non withstanding the hardware can do this22:32
freemangordonyes, decoding was through DSP22:32
WizzupSure smooth video playback is nice for low res videos, but we can't make the hw better than it is, I think having smooth scrolling and such is imortant22:32
Wizzuphaving in-browser video playback ... eh22:32
freemangordonactually it is possible, and HW supports it22:33
uvosside not in-browser video plackbak works absoulty fine on d4 wayland22:33
uvoswith gl surfaces22:33
Wizzupnot arguing one way or another, just saying it's not that important to me personally22:33
WizzupI really never play videos on my n900 fremantle much either, but having maps scroll smooth is important22:33
uvosdose sd @60 fps for youtube22:33
Wizzupe.g. maep on n900 is smoother now than on the d4 iirc22:33
uvosin ff22:33
Wizzup(on leste)22:34
freemangordonuvos: I was just givin an example22:34
freemangordonwhy I think about the numbers22:34
uvosand its more limited by the cpu than by sgx doing the presenting22:34
uvos*cpu decoding22:34
freemangordonnot, it is limited by the memory bus22:34
freemangordonbecause you have to push every frame to a texture22:35
freemangordonand then use SGX to render that texture22:35
freemangordonthis is not a zero-copy, sorry22:35
uvosno not atm in wayland its not zero-copy22:36
freemangordonwe can have zero-copy with bufferclass22:36
uvosbut its less copy22:36
uvossince the output dosent copy again22:36
uvosanyhow it works fine on d422:36
uvosbut its also faster ofc22:36
uvosthan n90022:36
freemangordonuvos: ok, I don't get it - tmlind said WL has the same issues with SGX ddk as xorg22:37
freemangordonyou say that it works fine22:37
uvos? wayland has allways worked fine22:37
uvosits very performant22:37
WizzupI think uvos is not talking about sgx at all22:37
uvosyes ofc22:38
Wizzupin this instance22:38
uvossgx output22:38
uvosim talking wlroots here22:38
uvosit renders via gles22:38
uvosits extreamly performant22:38
uvosfire up firefox and scroll around22:38
uvosor watch a video22:38
Wizzupmaybe try it on the n900? would be interesting22:38
freemangordoncould you try that on n900?22:39
freemangordon:)22:39
uvosif you provide me with a kernel that works22:39
uvosi guess i could also install pmos22:39
freemangordonwhich ddk? 1.17?22:40
uvos1.1722:40
freemangordonno problem, in 5 minutes22:41
siceloI don't think we should discourage/stop fmg from RE'ing the 50kb binary if he feels there's some hope there. Just my 2 cents22:42
freemangordonsicelo: OTOH, if GL is performant enough, we should really consider it22:42
uvossicelo: dont you use ddk1.17 on n900/wayland22:42
uvosor just d422:42
freemangordonI doubt22:42
freemangordonas we have useful 1.17 on n900 since yesterday :)22:43
uvoswell afaik it works in pmos i thought22:43
WizzupI don't think so22:43
freemangordonwith out working kernel?22:43
freemangordonI doubt too22:43
siceloI was using 1.17 with no issues on debian. No one tried it on pmos22:43
uvosthey use 5.7 or something22:43
uvospmos has pacakges for jonathings mesa sgx22:44
uvosfor omap4 at least22:44
freemangordonsicelo: with 2fps vbo I guess22:44
siceloI used TI blobs with debian22:44
siceloMmm, i don't have it handy right now, and can't remember the actual benchmark scores. However sway worked reasonably okay22:45
Wizzupon 5.1 h-d works quite nicely too :p22:45
freemangordonbut that's not 1.1722:45
freemangordon;)22:45
siceloYeah :-)22:46
uvoshttp://uvos.xyz/maserati/glmark-sway.txt22:51
uvosglmark on patched wlroots22:51
uvoson d422:52
freemangordonuvos: http://46.249.74.23/linux/n900.tar.gz22:53
freemangordonthis is omap2plus_defconfig22:54
uvoswhere are the blobs22:54
freemangordonWizzup: could you provide yours, mine are not patched22:54
freemangordonuvos: or you don't need patched ones?22:55
uvosi gues i could start with a debain rootfs22:55
freemangordonwhich debian is the question :). libc 2.28 or 2.3122:55
uvoswell i would choose 1122:56
uvosofc22:56
freemangordonok, gimme a minute to reboot to fremantle and will provide blobs22:56
freemangordonuvos: better clone https://git.ti.com/cgit/graphics/omap5-sgx-ddk-um-linux/22:57
freemangordonbranch 1.17.4948957-next22:57
uvosi wish we had a package for ddk1.1722:58
freemangordonti343x is what you need22:58
uvosinstalling stuff is major pain22:58
uvosbeacuse of the dependancy hell22:58
uvosok22:58

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