libera/#maemo-leste/ Wednesday, 2021-10-20

freemangordonhmm, xf86-video-omap loads, but there is nothing on the screen, even for 2d stuff08:37
freemangordonweird08:37
freemangordonoh, ok, finally I was able to mmap gbm bo for writing :)10:06
freemangordonthe same bo EGL renders to10:06
freemangordonuvos: so, how that helps us with dri3? :) hack modesetting to not use glamor and do 2D SW render to back buffer?10:07
freemangordonthe other option is to use dri2 driver and do a PVR blit of gbm EGL bo10:09
freemangordonweh have to teach dri2 driver on dri3 ofc10:10
freemangordonbut thats simple, more or less10:10
tmlindfreemangordon: nice :) fyi, things are moving towards the /dev/dri/cardX being used only for allocation with the rest using the render node, but current pvr mesa seems to only work using the /dev/dri/card0 node10:12
tmlindthat's to avoid all the permission issues10:13
tmlindif there are other reasons for doing it, i don't know what they might be10:13
freemangordontmlind: I don;t understand how's that relevant, sorry. all this dri/drm/ whatever stuff is still in a тхицк фог фор ме :)10:14
freemangordonoos10:14
freemangordon*still in thick fog for me10:15
freemangordonif you have an idea how thing should work (given that I can read/write bo's EGL renders to), please share10:15
freemangordonI mean - in terms of xorg that is10:16
freemangordonI would really love if we have zero-copy but not sure what rendering pipeline should look like10:16
tmlindyeah i don't know how it works either :)10:18
freemangordontmlind: BTW, definitely there is something wrong with the kernel, xf86-video-omap driver renders nothing on the screen, but pretends to work. *but* - it worked couple of times. 3 of 20, for example10:19
tmlindweird10:19
freemangordonthe same happened yesterday with glmark10:19
tmlindwhich hardware?10:19
freemangordond410:19
freemangordonon n900 it seems there is no issue10:19
tmlindyeah ok d4 needs to update the command mode lcd also to refresh it10:19
tmlindthat patch you reverted might fix it for d4?10:20
freemangordonbut I have "drm/omap: Fix page fault handling and flush what framebuffe wants flushed" reverted there (on n900)10:20
freemangordonyeah, lemme try it10:20
freemangordonwhile we are at it :)10:20
tmlindok, not sure what might be broken with that patch for n900.. and not even sure if that's the right fix for d410:20
tmlindheading out here, bbl today at some point10:22
freemangordonttyl, will let you know if it is better with that patch reverted10:22
tmlindyeah ok hopefully it works on d4, then we can figure out what's wrong with that patch10:24
freemangordonmhm10:27
freemangordonunfortunately it does not:10:32
freemangordon[  148.602752] PVR_K: HWRecoveryResetSGX: SGX Hardware Recovery triggered10:32
freemangordonfullscreen PVR2DBlt color clear operation over EGL allocated BO uses ~15% CPU12:58
freemangordongood news - I was able to make PVR2DBlt work12:59
freemangordonon d4 that is12:59
lelMerlijnWajer deleted a repository: https://github.com/maemo-leste/clown-boot-kernel13:00
Wizzupfreemangordon: sweet13:03
freemangordonbasically I do GlClear on the surface and then  PVR2DBlt on top (screen height - 64, to see that GLClear actually works)13:04
freemangordonif I calculate FPS correctly, this should render with 80 fps13:04
Wizzupit's not zero copy but quit egood13:13
freemangordonit is13:14
freemangordonseems that CPU load comes from a leaking /me calling  PVRSRVMapFullDmaBuf on every swap13:16
Wizzupah13:16
freemangordonfor sure I am doing this wrong, as after couple of seconds PVRSRVMapFullDmaBuf fails13:16
freemangordonsomehow I am leaking something :D13:17
Wizzupuvos: ugh I can't push the stable stuff to github because it rejects it over size13:17
* Wizzup bbiab13:17
freemangordonWizzup: with that leak fixed, cpu load is ~ 3.5%13:44
freemangordonyep, FPS is 78 :D13:50
bencohneat!13:54
bencohwait, 78 is more than 60 ... do you render to screen?13:54
freemangordonyes13:54
freemangordonthis is d413:54
* bencoh headscratches13:54
freemangordonglmark reports same fps13:55
freemangordond4 is manually updated display13:55
freemangordonwill try on n900 in a minute13:55
bencohyeah, but it still means it can reach more than 60fps, which is ... slightly surprising13:55
bencoheither that, or it silently drops frames13:55
freemangordonno idea13:55
bencohanyway, nice work :)13:56
freemangordonbut, it should be able to render with 80 fps, why not<13:56
freemangordon?13:56
freemangordonI mean - we don;t really have vsync here13:56
bencoheven with no vsync, the max rate depends on the DSI clock speed and lanes number13:57
bencohbut I dunno how that was configured on d4, so ... :)13:57
freemangordonso, it seems it is capable fo doing refresh 80 times per second13:58
bencohwell, unless it really renders to some internal buffer and frames are dropped13:58
freemangordonI doubt13:58
freemangordonsee CPU load13:58
freemangordon3% means this is done in HW13:59
freemangordonearlier today I was doing the same with mmap, CPU load was about 50%13:59
freemangordonbut yeah, who knows13:59
siceloi know the primary goal of this work is for hildon/x11, but side question - will this improve things wayland side?14:00
freemangordonno14:00
freemangordonnext step is to write DDX/EXA, but this is not related to WL14:01
bencohout of curiosity, how does WL do it?14:01
freemangordonno idea14:01
siceloah, okay.14:03
freemangordonn900:14:03
freemangordonCurrent Frames Per Second: 5714:03
freemangordon:D14:03
sicelo:-)14:03
freemangordonthis is 3D+2D rendering14:03
freemangordonwell, 3D rendering is  glClear(GL_COLOR_BUFFER_BIT); and 2D rendering is   PVR2DPATROPcopy (solid fill rectangle), but still14:05
freemangordonoh, lemme check cpu usage on n90014:05
freemangordon7.5%14:05
freemangordonwow14:05
freemangordonok, now we know what HW is capable of14:07
bencohdo you know what fremantle does?14:09
freemangordonsomething similar AFAIK14:09
bencohand/or whether it gets similar perf results? ah14:09
freemangordonbut, it is missing GBM stuff, so I doubt it is as fast14:09
freemangordonfremantle uses omapfb14:10
bencohI wonder if the pvr2d engine includes scaling functions14:10
freemangordonI think yes14:10
freemangordonlemme check14:10
bencohif so it might speedup a lot of things14:11
bencohlike video playback, among others14:11
freemangordonmhm14:11
freemangordonfor sure it supports blitting of YUV etc14:12
freemangordonnot sure this is zero-copy, but still14:12
freemangordonbencoh: https://github.com/TexasInstruments/dri3wsegl/blob/master/SGX_DDK_REL_1.14%404004414_API_headers_MIT/eurasia/pvr2d/pvr2d.h#L41614:13
freemangordonPVR2DBLTINFO has src and dst sizes14:15
bencohPVR2D_3DBLT_EXT mentions scaling as well14:15
bencoh(at least in comments)14:15
freemangordonmaybe it scales when you set different dst size14:15
bencohso it looks like PVR2DBlt3DExt might allow scaling14:15
freemangordonmhm14:15
bencohyeah14:15
bencohwhich is pretty nice14:15
freemangordonI don;t think we want 3d blits14:15
bencohI was about to ask if it was really "3d"14:16
freemangordon3d stuff isa lready fast enough through gbm/egl14:16
freemangordonno idea14:16
freemangordonhow am I supposed to know14:16
freemangordon:)14:16
bencoh:)14:16
freemangordonI really wonder why IMG don;t want to open the documentation14:16
freemangordonbut yeah, corporate mindset14:17
bencoh"trade secret" (sigh)14:17
freemangordonyeah, sure14:17
bencoh(I guess)14:17
sicelo:-(14:17
freemangordonanyway, I am impressed that n900 is capable of rendering 2d+3d with such speed14:17
siceloold warrior14:18
freemangordonyeah14:18
freemangordonhmm, lemme record a video to show you what it looks like14:19
siceloyay, that'll be really great14:19
bencoh:)14:19
bencohsurprisingly enough those old GPUs could do "a lot"14:20
freemangordonhttp://46.249.74.23/leste/20211020_001.mp414:25
freemangordonvarying green color is 2d rendered14:25
freemangordonred on is 3d14:25
freemangordon*red one14:26
freemangordonttyl14:26
bencohawesome :)14:28
uvosbencoh: i dimly remember some android applications also reporting 70 ish fps14:29
uvosi think the pannel might be able to refesh slightly faster then 6014:29
bencohah, interesting14:30
Wizzupneat14:30
uvoswitch makes it a high refresh rate variable refresh rate display14:30
uvosgamerz creed14:30
Wizzuplol14:30
bencohyeah, I was about to joke about that14:30
bencohactually it would be pretty neat for arcade games14:31
bencohI should try fiddling with that :]14:31
bencoh(many many games need a non-standard refresh rate)14:32
bencohseriously though, does the DSI subsystem gets in some kinda of low-power mode between frames?14:33
bencoh(assuming there are no frequent updates, for instance)14:33
freemangordonuvos: so, what way shall we go? make modesetting not rely on glamor or add dri3 support tom opam_drv?14:35
freemangordon*omap_drv14:36
uvosno idea, surely you have the better understanding fo the details rn.14:36
Wizzupif you can make it work with modesetting that would be better IMHO14:36
uvosi assume that bringing 2d the buffer to the display would involve pvr2d?14:37
Wizzupor maybe I misunderstood14:37
bencohWizzup: that's assuming the change is generic enough for it to be at least seemingly upstreamable though14:37
Wizzupbut I'd prefer not to use xf86-video-omap14:37
bencohwhy not?14:37
Wizzupbencoh: even so rebasing on maintained code is better than being the sole maintainer14:37
bencohhmm14:37
uvosif you can do it without using pvr2d or special omapdrm ioctls modesetting would be better14:37
uvosotherwise -omap is the better choise14:38
uvosWizzup: -omap is not that large14:38
uvosand the xf86-video api is very stable14:38
Wizzupuvos: true it's not large14:38
uvosalso xf86-video-omap is part of xorg14:38
Wizzupwhere do they host it?14:39
WizzupI suppose that can work yeah14:39
WizzupI didn't realise it was that small (~2000 lines including headers)14:39
Wizzupstill it seems to carry quite some kludges14:39
Wizzupstuff like the output_names14:40
uvoshttps://gitlab.freedesktop.org/xorg/driver/xf86-video-omap14:40
WizzupI suppose that could work14:41
bencohdo we have a properly working version of -omap?14:41
uvossure14:41
Wizzupthe d4 uses it now14:41
bencohah, alright14:41
uvosit works on d4 with sgx 1.914:41
Wizzupbut it has no DRI314:41
bencohyeah14:41
uvosand it works on just omapdrm14:41
Wizzupomap_dri.c is 672 lines14:42
bencohI'd say it's the way to go14:42
bencohespecially if we plan on adding more omap-specific features at some point14:42
bencoh(video decoding anyone? :) )14:42
uvoslets not get ahead of ourselves14:42
uvosbesides the ddx dosent do decoding14:43
uvospresentation maybe14:43
WizzupI think exa can help with scaling but yeah14:44
Wizzupnot the actual decode pipeline14:44
Wizzupbut also the hw video decoders are kind of at the bottom of my list, I never watch videos on my phone14:44
Wizzup(but yeah, *my* list)14:44
Wizzupanyway14:44
bencohright, but I vaguely remember it playing a role in the presentation part, and iirc one of the devs working on it had the ddx patched for that purpose14:44
bencohbut yeah, anyway :)14:45
Wizzupgrepping for gri3 in glamor/ makes it look easy14:45
Wizzupdri3* even14:45
uvosmodern ddx dont do video presenstaion either14:46
uvosopengl is used14:46
bencohuvos: I'm talking about 2012 code :)14:46
bencoh(and I might be wrong)14:46
Wizzupuvos: you mean glamor does xv14:46
WizzupX-Video Extension version 2.214:46
Wizzupscreen #0 Adaptor #0: "GLAMOR Textured Video"14:46
uvosWizzup: xv is depricated nothig uses it anymore14:47
uvosWizzup: but yeah it dose have it as a fallback14:47
Wizzupoh, what replaced it?14:47
uvosnothing14:47
uvosgl14:47
Wizzup:D14:47
bencohplain gl, you just have it render to a surface14:47
bencohor something similar14:47
uvosyeah14:47
Wizzupfreemangordon: great work, hope we can get it all the way there14:47
Wizzupuvos: any other PRs you need me to look at?14:50
freemangordonuvos: I will get rid of omap-specific ioctls14:50
freemangordonthis is easy14:50
freemangordonmy test program uses only non-omap stuff14:51
uvosfreemangordon: that wasent about omap-sepcifc icotls in -video-omap14:51
uvosits about if you can make dri3 work on sgx without using sgx or omap specific code14:51
freemangordonbut what?14:51
uvosif you can14:51
uvosthen change modesetting14:51
freemangordonI can, for 3d14:51
uvosif you cant chagne -omap14:51
uvosright 2d is a different story14:51
freemangordonI can for 2d too (by using mmap), but it will be slow14:52
bencoh(just for the records / logs, regarding video decoding on omap: https://github.com/robclark/libdce )14:52
freemangordonsure, 3d is through gbm14:52
uvosbut i thought mmap only worked through prv2d?14:52
uvoslibpvr2d that is14:52
lelMerlijnWajer created a repository: https://github.com/maemo-leste/clown-boot-kernel14:53
uvosWizzup: "uvos: any other PRs you need me to look at?" no14:53
uvosbtw if command mode display is giveing you grief you can work around it / check if this is the case by connecting a hdmi display14:54
uvosthat makes both displays fall to video mode14:54
bencohoh, that'd be interesting14:55
freemangordonuvos: no14:55
bencohjust to see if refresh rate falls down to 60fps14:55
freemangordonpvr2d doesn't do mmap14:55
freemangordonmmap is done through  DRM_IOCTL_MODE_MAP_DUMB14:56
lelMerlijnWajer edited a repository: https://github.com/maemo-leste/clown-boot-kernel14:56
Wizzupuvos: https://github.com/maemo-leste/clown-boot-kernel hope this works for you14:56
uvossure14:58
uvoswheres the defconfig14:58
Wizzupdidn14:58
Wizzupt push that yet14:58
WizzupI had to fight github or an hour first14:58
uvosok14:58
Wizzupis there some tool to create a defconfig, or shall I just commit my .config ?14:58
WizzupI also need to push the dts, etc14:58
bencohmake savedefconfig?14:58
uvosindeed14:59
Wizzupok14:59
uvosfreemangordon: ok so sounds like adding a dri3 fallback path for modesetting using mmap is possible for its AccelMethod "none" case15:00
uvosadding this would be a great service to others15:00
uvosit would for instance also slove the pps issues15:00
freemangordonuvos: pvr2d does  PVRSRVMapFullDmaBuf15:00
uvosso i twould do that15:00
freemangordonok15:00
freemangordonPVRSRVMapFullDmaBuf just sets SGX MMU15:00
Wizzupuvos: didn't he say it would be slower though?15:01
Wizzup(but yeah I suppose it could still be useful)15:01
uvoswell its mmaping and rendering via cpu15:01
uvosthats slow15:01
uvosbut short of implementing exa on pvr2d i dont see how anything would be faster15:01
uvosand ofc thats something to be done later and not now15:02
uvosalso current d4 works exactly like this15:02
uvosso it should not be unusably slow15:02
Wizzupthe current d4 is kinda slow in 2d15:02
uvosi mean 2d on d4 is slow15:02
Wizzupesp scrolling is painful15:02
uvosbut its not usage breaking15:02
uvosyeah15:02
Wizzupdepends on who you ask15:02
Wizzupfreemangordon might disagree :P15:03
bencohterminal scrolling is atrocious15:03
Wizzupany scrolling is atrocious15:03
Wizzupthere's many seconds in delay15:03
uvoswell other than gpu accel15:03
uvoslike qt stuff scrolls fine15:03
uvosbecause it uses gl instead of xorg primitves15:03
WizzupI mean it's a good first step if we have a way to als omake 2d fast15:04
Wizzupotherwise perhaps the path makes less sense15:04
uvosit makes plenty of sense for pp i think, no one cares about xorg on it, we dont have the bandwith to also fix its 3d driver and its cpu is fast enough to make this ok15:04
uvosgets the mapphones working right now, and we can still investigate resurecting -video-omap or adding a accel plugin to replace glamor for modesetting-pvr15:05
freemangordonguys, we can implement it through mmap initially and then to pvr2d accel where possible15:07
Wizzupok15:09
WizzupI do not have a strong opinion, just trying to help15:10
Wizzupfeel free to do what makes sense15:10
sicelois there a big x11 issue with PP? there's sxmo, so i guess it's working reasonably okay for them15:10
Wizzupuvos: https://github.com/maemo-leste/clown-boot-kernel/commits/clown-boot-5.10.y dts is untested, I need to check if me adding the memory{} and &dsi1 there directly works15:11
Wizzupbut at least no changes to motorola-mapphone-common.dtsi atm15:12
Wizzup(again untested)15:12
Wizzupwe can probably trim that defconfig some more15:12
Wizzup(we don't need the modem, etc)15:12
uvoswait what if i want to take a call in the bootloader15:13
Wizzup:D15:13
WizzupI needed a few seconds to realise15:13
uvosprobubly a feature they considerd for uefi15:14
uvosanthow ok15:14
uvosyeah that looks fine15:14
uvos509 MB? whats in the upper 3MB region?15:20
uvoswhy are we disabeling aes15:20
Wizzupuvos: this is just omap2plus_defconfig with m->y and dvb removed15:27
Wizzupfeel free to cut more in that config15:27
uvosWizzup: no i mean this https://github.com/maemo-leste/clown-boot-kernel/blob/96b2525f1fa10bca22d40549e8bdc8973881452f/arch/arm/boot/dts/omap4-droid3-xt862.dts#L8815:29
Wizzuphm this is from bionic or d4 I think15:34
Wizzuphm15:34
WizzupI don't see it in either.15:34
Wizzupuvos: that can probably go then15:35
uvosyes its new i assume your forgeting the reason you placed it there15:35
Wizzupyeah15:36
Wizzupcan probably remove it15:36
Wizzup&i2c4 is in there twice too15:39
uvosheh15:40
uvosyeah15:40
uvosWizzup: parazyd: cant build profilesx15:41
uvosi assume the pacakge still wants to pull from extras15:41
Wizzupchecking15:44
Wizzupuvos: try again?15:45
uvosUnauthorized15:47
Wizzuphmm15:49
uvosWizzup: yeah that was it16:15
uvosworks now16:15
Wizzupcool16:16
uvosWizzup: maemo/beowulf buils in a stable enviroment wrt dependancies right16:16
Wizzupyes16:16
uvosand beowulf-devel in a devel enviroment16:17
uvosok16:17
Wizzupyes16:17
uvosdose simple-brightness and the new cp applet work for you btw?16:18
uvosim sortof afraid i missed some patch since i have lots of dirty pacakges on my device16:18
WizzupI will check in a bit16:21
Wizzupuvos: can you add the src for the modules here? https://github.com/maemo-leste/clown-boot-kexec19:51
Wizzup(maybe also with binaries?)19:51
uvosWizzup: we need 2 repos19:52
uvosWizzup: one for 3.0 kernel and one for 2.6 kernel19:53
uvosor do you want to do it in 2 branches?19:53
uvosi gues that makes sense too19:53
Wizzupbranches or even directories19:53
uvosok19:53
uvosill do it as branches later19:53
uvosbinaries makes no sense19:53
uvosthose are in the main clownboot repo anyhow19:53
Wizzupok, since I was not able to compile it ;-)19:54
uvoscompileing it remains tough yeah19:55
uvosi have old gcc installed on my main machine but its not something i can easly just export19:55
freemangordonhow old?19:56
Wizzupuvos: yeah so I commented out the aes disabled thing and now it suspiciously doesn't seem to boot19:56
freemangordonas the one in scratchbox is old too ;)19:56
Wizzupuvos: let me add it back in..19:56
uvosWizzup: wierd19:57
uvosWizzup: maybe there is some errata tmlind told you about19:57
uvoson old omap4 chips19:57
Wizzupuvos: yes that is what I recall vaguely19:57
WizzupI can grep logs19:57
uvosok would make sense19:57
Wizzup06:17 < tmlind> Wizzup: oh cool, you got it booting :) looks like aes2 is not accessible on those devices, try setting:19:57
uvosthe d3 is a really early omap4 device19:57
uvosok so what about the high 3mb19:58
Wizzupone by one please19:59
uvosthe android kernel parameters sugesst all 512 are useable on d319:59
Wizzupok19:59
Wizzupsomething funny I think I have noticed, if serial is not in by the time the kexec mod probes (before actually calling kexec), the serial output is not visible until after the kexec20:03
uvosfreemangordon: 4.4.120:03
uvosfreemangordon: (ggc version)20:03
uvosgcc even20:03
freemangordonsbox-arm-none-linux-gnueabi-gcc (GCC) 4.2.120:04
freemangordonthis is scratchbox20:04
uvosok20:04
uvosscratchbox is easy to install on modern linux?20:04
Wizzupis that the right version?20:04
uvosshould work20:05
freemangordonsbox-arm-none-linux-gnueabi-gcc (Linaro GCC 4.7-2012.07) 4.7.2 20120701 (prerelease)20:05
freemangordonthis is scratchbox with cssu-thumb20:05
uvosthats to new20:05
uvoscut off is 4.6 iirc20:05
uvosfor 3.020:05
freemangordonok, "vanilla" SB then20:05
uvosand 4.4 for 2.620:05
Wizzupuvos: I think your suggestion to rotate 180 degrees over z didn't quite have the right effect20:05
uvosscratchbox is easy to install on modern linux?20:06
Wizzupfor portrait rotation I still have to keep it upside down, but for landscape it's now fine20:06
freemangordonuvos: no idea, but in a VM should be easy20:06
Wizzupwhat about just some old debian?20:06
uvoswell then its not superior to booting realy old debian20:06
Wizzupare the repos not still avail?20:06
uvosyeah20:06
freemangordonsure20:07
freemangordonon marmo.org :p20:07
freemangordon*maemo.org20:07
WizzupI mean the old debian ones20:07
Wizzupnot the maemo ones20:07
freemangordonI don't understand20:09
freemangordonMaemo_Ubuntu_Lucid_Desktop_SDK_Virtual_Image_Final.7z ?20:10
Wizzupfreemangordon: both uvos and I are suggesting to take say debian 6 or so20:11
Wizzup(I made that number up)20:11
Wizzupas opposed to using the maemo specific SB just to build a motorola kernel module20:11
Wizzupto be clear if it works I suppose it can be fine20:11
freemangordonah20:11
freemangordonwell yeah, you can install old debian in a VM20:11
Wizzupright20:12
freemangordonbut, you can take the pre-build maemo SDK images20:12
uvosbtw you can also use the android sdk to emerge the exact gcc version motorola used to complie the kernel20:12
uvosnever done it20:12
uvosbut should work20:12
Wizzupemerge - gentoo based?20:12
uvosno20:12
freemangordonas I am not sure old debian will still have repos alive20:12
WizzupI think that's just kind of confusing to suggest using scratchbox since it has for the most part outlived it's usefulnes and it mighr confuse people20:13
Wizzupquite some maemo folk I also speak to don't like sb20:13
Wizzupbut yeah20:13
freemangordonthat's why we us VM on leste :)20:13
uvosbuild/tools/make_standalone_toolchain.py20:14
uvosin android NDK20:14
Wizzupuvos: any way I can dump the accelerometer data?20:14
uvosWizzup: cat /sys/bus/iio/somedvice/acell_x_raw20:14
uvossomething like that20:14
Wizzupok20:14
uvosdont forget to remove the bionic matrix btw20:14
uvossince its 180deg from the resulting values with the bionic matrix20:15
uvosnot 180deg from the I matrix20:15
WizzupI multiplied the bionic matrix with the rotation matrix20:16
uvoshttps://developer.android.com/ndk/downloads/revision_history20:16
uvosshould be able to get the correct sdk here20:16
uvosthat contains the gcc used by moto themselves20:17
Wizzupuvos: https://dpaste.com/GCN5FKB5P20:17
Wizzupwas that not what you meant?20:17
uvoslol20:17
uvos& using np20:17
uvos*@20:17
uvossure that looks sane20:18
Wizzuphmmmm20:18
WizzupI think it doesn't get picked up in the kernel, perhaps20:18
uvos?20:18
Wizzuproot@devuan-bionic:/sys/bus/iio/devices/iio:device2# cat in_accel_mount_matrix20:19
uvosthe kernel dose not20:19
Wizzup1, 0, 0; 0, 1, 0; 0, 0, 120:19
Wizzupunless this is a different file20:19
Wizzupoh, this is a udev thing?20:19
uvosi repleat not have anything to do with this20:19
Wizzupok, let me read backlog20:19
WizzupI changed it in the dts, yeah, ok, my bad.20:19
uvosthe matrix is used by iio-sensor-proxy20:19
uvosfrom udev20:19
uvosaccel_mount_matrix is not supported by our driver20:19
uvosif it where the kernel would simply tell udev about the matrix20:20
uvosand the config file would be unessecary20:20
uvosi have yet to come across a driver that implements this tho20:20
uvosthe kernel never applies the matrix iteself in any circumstances20:20
uvos( a grave error in interface design imo)20:21
Wizzupthis should make it pick up the changes, right: udevadm control --reload-rules && udevadm trigger20:21
uvosyes20:21
uvosdevadm info -e | grep WHATEVER_THE_MOUNT_MATRIX_IS_CALLED20:22
uvosor if you know the device path you can give udevadm that to just dump its pops20:22
Wizzupso it looks like at least it shows up with the new matrix there but nothing is picked up20:23
uvos picked up where?20:23
Wizzupby mce I suspect20:23
Wizzupi.e. the rotation of the device is not affected20:23
Wizzupregardless of what I set20:24
uvosyou have to restart iio-sensor-proxy20:24
Wizzupah...20:24
Wizzupnow it works20:25
uvosgreat20:26
Wizzupit is just I20:26
Wizzupthat's nice20:26
Wizzupor is this matrix applied on top of the matrix in the dts?20:26
Wizzup(in which case I might need to change it once more)20:27
uvosno the matrix in dts in impotent20:27
Wizzupimpotent, not important, ok20:27
Wizzupshall I sync it with udev matrix anyhow?20:27
uvosyeah20:27
uvosthe driver might start supporting this feature some time in the future20:27
Wizzupit's this atm:20:28
Wizzup        rotation-matrix = "0", "-1", "0",20:28
Wizzup                  "1", "0", "0",20:28
Wizzup                  "0", "0", "1";20:28
Wizzupso I'll just make it I as well?20:28
uvoswhy I isent your matrix20:28
uvos0 1 020:29
uvos-1 0 020:29
uvos0 0 120:29
uvos?20:29
Wizzupin the dts?20:29
uvosin udev20:29
Wizzupudev is identity matrix20:29
uvosand its correct?20:29
Wizzupyes20:29
uvosin monitor-sensor20:29
Wizzupuh, let me check monitor-sensor specifically20:29
Wizzupyes, it is20:30
uvosok20:30
uvosthen you can remove the udev rule20:30
uvosand the dts entry20:30
Wizzupok20:30
uvosor leave it I20:30
uvosbut its redundant20:30
WizzupI'll leave it I I think20:31
uvosok20:31
Wizzup(ok the I usage gets onfusing now lol)20:31
Wizzuplet me try to decipher your i2c suggestions from yesterday20:31
uvos$I$20:31
uvoswe speek latex :P20:31
Wizzuphehe20:32
Wizzupthis command verifies led chip is on the same i2c place and present, right:20:33
Wizzupi2cdetect -r 0 0x38 0x3820:33
Wizzup(with UU showing)20:33
uvosyes20:33
uvosalso the kernel is using it20:33
uvosUU20:33
Wizzupbut that is not the backlight, I assume20:33
Wizzupjust the rgb led controller20:33
uvoswell it is20:33
Wizzuphmm20:33
uvosits changeing the wrong channel20:33
uvosprobubly20:33
uvosthe chip has 3 channels iirc20:33
Wizzupyeah you suggested I try 0x16, 0x18 or 0x1A, but I don't know where exactly20:33
uvoson d4 i is the backlight20:33
Wizzup(I don't speak i2c much)20:33
uvosone is the keyboard20:34
uvosand one is unused iirc20:34
uvosthose are addresses to write to voer i2c20:34
Wizzupat the 0x38 range?20:34
uvosno20:34
uvosso 0x38 is the chip address20:34
uvosor chip id20:34
uvosyou wirte that to the bus if you want to talk to that chip20:35
uvosthen 0x16 is the register address on the chip you want to write20:35
Wizzupok20:35
uvosso i2cget 0x38 0x1620:35
uvosshould provide you some value20:35
uvosand then use i2cset to slightly change it20:36
Wizzup# i2cget 0x38 0x1620:36
WizzupError: Could not open file `/dev/i2c-56' or `/dev/i2c/56': No such file or directory20:36
Wizzup# ls /dev/i2c-*20:36
Wizzup/dev/i2c-0  /dev/i2c-1/dev/i2c-2  /dev/i2c-320:36
uvosoh right20:36
WizzupI guess I need to provide the bus20:36
uvosbus first20:36
uvosso i2cget 0 0x38 0x1620:36
Wizzupso i2c1 in dts would be ..20:36
uvosnot 0 nessecarly20:36
uvosi dont remember what bus20:36
uvosi2c1 in dts is 020:37
Wizzupoh20:37
uvosdts starts at 1 and kernel starts at 020:37
uvos someone hates us20:37
Wizzuplol20:37
Wizzuphm, all busses at 0x38 and the various channel fail with 'Error: read failed'20:38
Wizzupactually bus 0 says 'device of resource busy'20:38
uvosright20:38
Wizzupcould be because driver is loaded?20:38
uvosyou have to remvoe the module20:38
Wizzupleds_lm3532 ?20:39
uvosthat would be my assumption yes20:39
Wizzupthe reads also fail on that bus on 0x38 with 0x16, 0x18 or 0x1a20:40
uvosthe driver owns the device20:40
uvosthe register address is immaterial20:40
Wizzupwhat I mean is that the driver is now gone, there is no more busy20:40
Wizzupand now I get the same error as on the other busses20:40
Wizzupi.e.20:41
Wizzup# i2cget 0 0x38 0x1620:41
WizzupWARNING! This program can confuse your I2C bus, cause data loss and worse!20:41
WizzupI will read from device file /dev/i2c-0, chip address 0x38, data address20:41
Wizzup0x16, using read byte data.20:41
WizzupContinue? [Y/n] y20:41
WizzupError: Read failed20:41
Wizzupmaybe I need to run some command to wake up the chip, maybe the driver unload disables it20:42
Wizzupsince it's '--' now in i2cdetect as well20:42
uvostry reading from 0x7120:42
uvos0x71 as chip addres20:42
uvosalso yeah might be an enable pin20:43
Wizzupsame output on 0x71 for the three data addresses you gave20:43
uvosshould say in dts20:43
Wizzup        enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;20:43
uvosright20:43
uvosso enable the gpio then20:43
Wizzupmhm20:43
uvosdatasheet contains ADDRESS: 0x38 (7 bit), 0x70 for Write and 0x71 for Read20:44
uvosnot sure what it means20:44
uvosoh ofc20:45
uvosnvm its fine20:45
uvos0x3820:45
Wizzup        enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>; I am not sure which gpiochip this is in /sys/class/gpio20:47
Wizzup(yeah I really know little about this)20:47
uvos cat /sys/kernel/debug/gpio20:48
uvostells you20:48
Wizzupah!20:48
Wizzupgpiochip6: GPIOs 508-511, parent: platform/50000000.gpmc, omap-gpmc:20:48
Wizzuponly three gpios there it looks like20:48
WizzupI guess I should load the driver again20:49
Wizzuphm, nope, didn't change much20:50
Wizzupmy confusion is that I was expecting to find at least 12 gpios there20:50
Wizzup(under gpiochip6)20:50
Wizzupoh, maybe this is also off by one thing20:51
Wizzupso <&gpio6 12> == gpiochip 5, 1220:51
uvosright20:52
Wizzuplooks like20:52
uvosso export pin 1220:52
Wizzupyeah that is 14020:52
Wizzuproot@devuan-bionic:/sys/class/gpio/gpio140# echo 1 > value20:53
Wizzup-bash: echo: write error: Operation not permitted20:53
Wizzuptruly has to fail every step of the way :P20:54
uvosheh20:54
Wizzupah I guess I might need to set the direction20:55
Wizzupright20:55
uvosnot sure on the interface sorry20:55
uvosbut yeah makes sense20:55
Wizzupyeah, echo out > direction worked20:56
Wizzupnot that it helped with i2c, but hey :)20:56
uvosis the chip on the bus20:56
uvoshmm20:56
uvoswait you did change value too20:57
uvosnot just direction20:57
uvosits active high20:57
Wizzupvalue set to 1, with active_low set to 020:57
uvospulling it low wont help20:57
uvosok20:57
uvoshmm20:57
WizzupI think it might make more sense to look at android at this point20:58
Wizzupof course there we have the problem that the dts had the wrong endianness ;)20:58
uvosHeresy20:58
Wizzupmaybe this is for another time then20:59
Wizzupwhat should i2cdetect show if it's present but not in use?21:00
uvosyes21:00
Wizzupliterally "yes"?21:00
tmlindfreemangordon: nice work, so you probably figured out ddk-1.17 no longer uses any of those proxied ioctls in omapdrm driver ddk-1.9 was using, whatever you do let's not add those back :)21:06
tmlindthat was a pain to maintain with a big pile of extra patches against the mainline kernel21:07
Wizzupuvos: heh the kbd brightness is the screen21:07
Wizzupor something like that it seems..21:07
Wizzupthis turns on the screen brightness: echo 1 > /sys/class/leds/lm3532\:\:kbd_backlight/brightness21:08
Wizzup(no diff between 1 and 255)21:08
uvosok21:10
uvosjust swap the channels in dts then21:10
Wizzupright21:10
Wizzupuvos: so that's the reg = <> or led-sources = <> ?21:11
uvostmlind: btw reading the above21:11
uvosled-sources should be swaped21:11
uvosie in the end21:12
uvosleds for backlight21:12
uvosthe leds phandle should link to the one currently used by the keyboard backlight21:13
Wizzupright so https://dpaste.com/GX9WGHC5J.txt21:13
uvos?21:15
uvosjust swap the backlight_led identifier over to led@121:15
uvosand label = ":backlight";21:15
uvosthen leds = <&backlight_led>; phandle will grab the right one21:16
Wizzupah21:17
Wizzupuvos: did the swap, but it doesn't give any granularity still21:22
uvoshmm21:23
uvosin datasheet granularity depends on other regs21:24
uvosnot sure how is controled in lm3532 driver21:24
Wizzuphmm21:24
uvosled-sources means something different than i expected21:26
uvosled->num_leds21:26
uvosits not the channel it seams21:26
Wizzupah21:26
uvosRequired child properties:21:28
uvos- led-sources : see Documentation/devicetree/bindings/leds/common.txt21:28
uvos      List of device current outputs the LED is connected to. The outputs are21:28
uvos      identified by the numbers that must be defined in the LED device binding21:28
uvos      documentation.21:28
uvosso led device is defined somewhere else in dts21:29
Wizzupok21:31
uvosjust swap led-sources too21:31
uvosbut id like to know where this is defined exactly21:32
Wizzuprebooting21:33
uvosno wait21:36
uvosit is the ouput channel i read that wrong21:37
* uvos slight confusion21:37
Wizzupin any case I need to go now, the backlight always worked in the sense that it at least turned *on* so that I could see the screen21:37
uvosok21:37
Wizzupbut I noticed that writing to the kbd backlight sysfs file changed the backligt too21:37
Wizzupso there's something wrong there for sure21:37
Wizzupuvos: thx for your help btw21:50
uvosWizzup: yw22:44
uvosWizzup: also the faster you stop messing with the d3 the faster your back on things that benefit me more directly :P22:45
Wizzuphehe23:10
bencoh:]23:24

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