/srv/irclogs.ubuntu.com/2016/11/13/#ubuntu-mir.txt

bschaeferfritsch, soo im guessing that DRM branch (if I cant show it works for multiple monitor + multiple gpu wont be a go)14:58
bschaeferwhich is fine. I can ifndef around to keep x11 in place then just DRM for anything else14:58
fritschbschaefer: :-)15:16
fritschdon't use ifdefs are he will get more "angry"15:16
bschaefer:)15:16
fritschyou did nothing wrong - but yeah, you hit something that broke kodi over time15:16
bschaeferyeah, the drm code was just put out in vaapi in 2014? or 1515:17
bschaefervery recent15:17
fritschnot really recent15:17
fritschas we (kodi) helped developing the egl interop15:17
fritschso for us not recent15:17
bschaeferyeah, im still not sure of the pro for using x11 display directly15:17
fritschthe discussion was not ontopic anymore - just some old battles fought out15:17
fritschabout recent "problems"15:17
fritschthere is no advantage15:18
fritschnone at all15:18
bschaefer(besides picking a device if youve multiple i suppose?) But i cant test that15:18
fritschit was from ancient time, when the vaPutSurface method for vaapi was tight to the rendering / display15:18
bschaefero i see, which im assuming your trying to decouple?15:18
bschaefer(though depends on EGL atm anyway)15:18
bschaeferfrom the display server15:18
fritschi see no point in coupling a decoder on a window server15:18
fritschif everything it needs is a EGLDisplay15:18
bschaeferright... which it already does that :)15:19
fritschthe libva guys also saw that ... if you look in the android "backend" code15:19
* bschaefer will have to poke RAOF about render nodes today when he gets on15:19
bschaeferfritsch, o yeah theres like nothing there15:19
bschaeferfritsch, the issue is i cant *open* card015:20
bschaefersince mir already opens that15:20
fritschno need to do so15:20
fritschlet me link you something15:20
bschaeferwhich is why render nodes are perfect15:20
* bschaefer is still waking up and starts making coffee15:21
fritschhttps://lists.freedesktop.org/archives/libva/2014-September/002719.html15:22
fritschhere is the patchset that added it15:22
* bschaefer looks15:22
fritschthe 2/2 patch15:23
fritschhas a test code15:23
bschaeferfritsch, o yeah i read that yesterday while digging around15:23
fritschgwenole (the master mind of intel va) - not at intel anymore sadly - gave that test code15:23
bschaefer(well when i was running into issues with drmOpen)15:23
fritschso, usage is perfectly fine15:23
fritschback at the time, when render nodes nor EGL dma buf sharing existed15:24
fritschthe only way to get surfaces was either use vaPutSurface15:24
fritschwhich was used for rendering, therefore used "X11" or whatever dependencies15:24
fritschbut then the infrastructure was finished15:24
bschaeferwhich makes sense!15:25
* bschaefer needs to read how render nodes was implemented in the kernel15:25
bschaeferas im not *sure* what happens if you multiple render nodes15:25
bschaeferthough reading it *shouldnt* matter15:25
fritschI'd say nothing15:25
fritschcaus either: you can't open the node at all15:25
fritschvaapi -> side15:26
fritschor b) the interop fails15:26
fritschbut that should only fail if the eglDisplay / context15:26
fritschis not valid15:26
bschaeferwell lets say you have intel +  nvidia and you want to make kodi run on nvidia while your main display server runs on intel15:26
bschaeferIIRC you *can* do that15:26
bschaeferwhich idk ... what would happen or if we even support that :)15:27
fritschnvidia has no support for the R8,G8 whatever sharing15:27
fritschthat means the moment the intel driver does no "own" the EGL context15:27
fritschquerying the extension will already fail15:27
fritschI assume :-)15:27
bschaeferwell then ... seems like more and more pointing to drm will work15:27
bschaeferhow it already works15:27
fritschyeah, as said - keep the PR as is for now. Thing will settle and calm down15:28
bschaeferyeah, I fixed the camel case and made a small comment but figured best left to let the dust settle :)15:28
bschaeferno worries15:28
bschaeferin the meantime ill now attempt to test mir how you mentioned in hopes of really testing the difference :)15:30
bschaeferit seems faster then x11 atm (at lease on my tests) for skipping at lease which means... the rendering15:31
bschaeferi think (vs drop which is the decoder?)15:31
fritschi hope it IS faster than X11 :-)15:33
fritschbtw. are you sure you use lanczos3 scaler?15:34
fritschafaik that only had GL support last time I looked15:34
fritschdrop is the decoder, yes15:34
fritschskipping <- render performance15:34
fritschbenchmark case: 3840x2160 h264 60p, downscaled with lanczos3 to 1080p6015:35
fritschyou might only have nearest neighbour + bilinear available, though15:35
bschaeferfritsch, i wasnt really sure, i tried to change things but the settings when i hit o didnt seem to reflect the changes15:35
bschaeferwhich was confusing15:35
fritschthey don't afaik15:35
fritschthose values are hold in a ProcessInfo class15:36
bschaefero well that makes sense since when i hit o it says dinterlace method: None15:36
fritschthat's fine15:36
fritschyou don't want to deinterlace progressive content15:36
fritschhttp://solidrun.maltegrosse.de/~fritsch/15:36
* bschaefer checks the scaler15:36
fritschhere are some samples I used when developing IMX6 support15:36
fritschthe 1080i50 should show something else, preferable VAAPI-MCDI15:37
fritschthen there is "Bob and Deinterlace" <- be careful with them, those cause a SSE copy and either deint in render (GL) or via ffmpeg's yadif on the cpu15:37
fritschthey switch the "path" in vaapi automatically, as told on github with the Prefer VAAPI-Output15:38
fritschwhich was the last line you got? :-)15:38
* bschaefer froze15:38
bschaefer<fritsch> you don't want to deinterlace progressive content15:38
bschaefersometimes devices like to fight when running two display serves15:38
bschaeferservers*15:38
fritsch16:37 < fritsch> http://solidrun.maltegrosse.de/~fritsch/15:39
fritsch16:37  * bschaefer checks the scaler15:39
fritsch16:37 < fritsch> here are some samples I used when developing IMX6 support15:39
fritsch16:37 < fritsch> the 1080i50 should show something else, preferable VAAPI-MCDI15:39
fritsch16:38 < fritsch> then there is "Bob and Deinterlace" <- be careful with them,  those cause a SSE copy and either deint in render (GL) or via  ffmpeg's yadif on the cpu15:39
fritschsorry :-)15:39
bschaefero sweet yeah missed all that!15:39
bschaeferright after i said checks the scaler i dropped :)15:40
fritschbtw. something for ubuntu: there is only one render node by default15:40
bschaeferfritsch, yeah youre right linear/bi15:41
bschaefereven when theres multiple gpus?15:42
* bschaefer use to have a laptop that had two15:42
fritschi think he is not correct15:43
fritschas the dma_buf is a kernel infrastructure15:43
bschaeferyeah x11 has the lanczo3 scaler15:43
bschaefernot mir15:43
fritschit is just used as a zero copy15:43
fritschinterface15:43
bschaeferyeah reading that link you put (which clearly states its not a 1to1)15:44
bschaeferits like that for legacy reasons15:44
fritschwhich one was that?15:44
bschaefer"It’s also important to know that render-nodes are not bound to a specific card. "15:44
bschaeferhttps://dvdhrm.wordpress.com/tag/drm/15:44
bschaefer Instead, if user-space requires hardware-acceleration, it should open any node and use it.15:44
* bschaefer would still like better documentation on render nodes, since i had a hard time finding the *real* number after renderD<num>15:45
bschaeferfound some kernel usage of 128->128+16 soo i assumed but still didnt find any real manual pae15:46
bschaeferpage*15:46
fritschyeah, try to link him that thingy above if you want to get into a discussion15:46
fritschin fact he is not right15:46
fritsch:-)15:46
fritschbut I gave up15:46
bschaefer"Yes, driver-specific user-space can figure out whether and which render-node was created by which driver, but driver-unspecific user-space should never do that!"15:47
bschaeferbut kodi *is* not driver specific15:47
bschaefersoo it *shouldnt* matter15:47
fritschjep15:47
fritschcite that and see what happens :-)15:47
bschaeferdone! But yeah I was going to poke RAOF later (which he knows far to many things...)15:50
bschaeferand hopefully can confirm the same... I can try to find more documentation or just read the kernel code15:50
bschaeferfritsch, so if im comparing against X11 and Mir doesnt support lanczos3 it seems unfair15:53
bschaeferto test them against each other using different scalers15:53
fritschyou needed to port the GL code of lanczos3 to the EGL render15:56
fritschyou can do differently15:56
fritschmmh, nope you can't15:56
bschaeferhaha, yeah something to *do* later15:56
fritschconcerning the render nodes15:57
fritschjust open two mirs15:57
fritschand two kodis15:57
fritschi say: both work fine, as the EGL ctx decides15:57
* bschaefer shutters at resampling for rewriting some of those bits for touch events15:57
fritschno matter which render node in use15:57
bschaeferfritsch, thats the things about render nodes though, they are unprivileged and allow for rendering on it with out any auth magic15:58
bschaefer(from my reading at lease)15:58
* bschaefer can try to open two mir servers in kms and see what happens never really did that15:58
fritschyou can also just run kodi twice15:58
fritschand see what happens15:58
bschaefero true15:58
fritschcause, consider the use case: video playback, someone comes via ssh15:59
fritschand transcodes his video15:59
fritschboth must work15:59
fritsch:-)15:59
bschaeferfritsch, yeah no issues15:59
bschaeferwith two kodis one 1 mir server16:00
fritschbschaefer: yeah, a nice screenshot would also help16:02
fritschthat proves: the EGL ctx16:02
fritschdecides16:02
fritschand the render node is just "below"16:02
fritschand even copes with two processes16:02
bschaeferfritsch, like http://i.imgur.com/fEsKY5p.jpg?16:05
fritschplay a different video :-)16:06
fritschin one of the windows16:06
bschaeferhaha true16:06
fritschbut yeah, it's obvious already16:06
fritschnice - two times 60 fps16:06
fritschor open the "o" dialogue on one16:07
bschaefero right16:07
bschaeferfritsch, http://i.imgur.com/0cEq880.jpg16:09
* bschaefer needs a different 60pfs video16:09
fritschhehe16:09
fritschreally fine16:09
bschaeferfritsch, also there was nothing else needed to be done on the mir branch it self?16:16
ogra_bschaefer, FYI  https://code.launchpad.net/~ogra/+snap/kodi-mir-snapshot ...  (but i cant get it to run )16:26
ogra_(and arm64 is completely unknown to the kodi build system it seems)16:27
bschaeferogra_, sweet! You cant get it to run because raspi?16:27
bschaeferor you're trying on the dragon board? I can imagine...16:27
ogra_i cant get it to run on qemu either ...16:27
bschaefer:(16:27
ogra_no, dragonboard is arm64 ... that doesnt build16:27
ogra_well, its a start ...16:28
bschaeferogra_, https://github.com/asciper/KodiDragonboard410c16:28
ogra_on the pi i have no mir-libs16:28
bschaefererr i ment arm6416:28
ogra_oh, cool16:28
* bschaefer hopes that *might* have some patches to make it work16:28
bschaeferive yet to dig to deep into that branch16:28
bschaeferit adds an arch64 though16:29
ogra_yeah, there are quite some changes to WinSystemX11.cpp16:29
bschaefersoo hopefully thats whats missing16:29
ogra_i guess the mir one would need them too16:29
* bschaefer looks16:29
bschaeferogra_, hmm looks like it just reports errors16:30
ogra_looking at https://github.com/asciper/KodiDragonboard410c/blob/master/patches/ubuntu/0001-Patch-for-DragonBoard410c-Kodi-build.patch16:30
bschaefermore so16:30
bschaeferyeah16:30
bschaeferdiff --git a/xbmc/windows/GUIWindowSystemInfo.cpp b/xbmc/windows/GUIWindowSystemInfo.cpp16:30
bschaeferthat *may* be needed16:30
ogra_anyway, i have the snaps but cant run them, there seems to be no armhf mir-libs in the store16:31
bschaeferpretty much ill need to go through and find any define for __arm__ and and __aarch64__16:31
bschaeferogra_, dang and alberto is out until nov 2216:31
bschaeferor 21st16:31
ogra_same for me (theoretically) ... i'm alread on vacation ;)16:31
bschaefer:)16:31
* bschaefer is just messing with kodi upstream patchs soo no real work today!16:31
bschaeferogra_, thanks for testing that and getting a snap on launchpad!16:32
ogra_well, there is still a lot work ahead i guess ... but its a start16:32
bschaeferyeah i agree16:33
ogra_(despite a horribly hackish one)16:33
bschaeferogra_, o also got vaapi working16:33
bschaeferfor mir16:33
bschaefersoo thats good16:33
bschaeferusing the DRM + EGL backend + Render Nodes16:33
ogra_nice16:33
ogra_(not much helpful for pi3 though ... which is what i'm after)16:33
bschaefer:( you mentioned that needed a kernel driver?16:33
ogra_but i guess there getting mir at all up is the biggest blocker16:34
bschaeferfor actually getting mir working?16:34
bschaeferyeah :)16:34
ogra_well, tvoss and ppisati seem to work on that16:34
bschaefercool, we can assume it'll be done eventually :)16:34
ogra_but i dont know any current status16:34
bschaeferogra_, do you use lxd or pbuilder or chroot for arm64?16:34
* bschaefer should get something setup for testing at lease vs the dragon board directly16:35
ogra_after an initial bringu i tend to rely on launchpad16:35
ogra_native and really fast ...16:35
bschaeferthat works as well!16:35
bschaefercool, and thanks again! Enjoy your vacation :)16:35
ogra_:)16:36
ogra_well, i'll surely tinker around during it :)16:36
fritschbschaefer: nope all fine I think, squash the relevant commits together and keep it standing there16:43
bschaeferfritsch, o so its bad to have like 20 commits? Wouldnt it all be merged into one when it gets pulled into xbmc?16:43
fritschnope16:44
fritschyou can decide what you want to squash before hand16:45
fritschit needs to be: bisectable after squashing16:45
bschaeferwell ill just squash into one commit Mir windowing system16:45
* bschaefer will look into that16:45
fritschcommits "fitting together" need to be squashed16:45
bschaeferhmm "fitting together?"16:45
fritschexample:16:45
fritschVaapi: 2 changes, LinuxRenderGLES: 3 changes16:46
fritschthe vaapi fixes is feature + squash for feature => squash the two commits16:46
fritschfor linux render, 1 bugfix and one new feature in 2 commits16:46
fritschsquash the 2 commits into one16:46
fritschand leave the bugfix separated16:46
fritschin your case: squash everything together that implements only MIR16:47
bschaefero ok that makes sense16:47
bschaeferyeah16:47
fritschif there was bugfixes for generic code, leave those as is16:47
bschaefersince its a feature + no bug fixes since it wasnt around before :)16:47
fritschyeah16:47
* bschaefer doesnt think he fixed anything for xbmc in this branch16:47
fritschbtw. rethinking the GPU1 and GPU2 scenario16:49
fritschthat scenario would be: intel gpu1, amd gpu216:49
fritschcause neither nvidia nor fglrx support dma_buf (GPL)16:49
fritschso that would mean, you need to use the intel gpu1 for processing (as gpu2 would not do vaapi anyways)16:50
bschaeferthats a more realistic example16:50
fritschnow you needed to display on gpu2, which is AMD16:50
fritschbut - this card does not support the R8G8 mesa extension16:50
fritsch:-)16:50
fritschso, figure16:50
fritschhttps://linux.slashdot.org/story/12/10/11/1918251/alan-cox-to-nvidia-you-cant-use-dma-buf <- nvidia16:51
* bschaefer trying to figure out *when* a render node is allowed to open16:51
bschaeferanytime?16:51
bschaeferi assume so16:51
fritschand something else:16:51
fritschthere won't be two heads active16:51
fritscheven not in a laptop16:52
fritschso the given code neither runs on amdgpu as of now via vaapi16:52
fritschand with nvidia it would make zero sense, that you choose the nvidia rendernode16:52
fritschas that is not vaapi capable16:52
bschaefertrue, i think that branch is a step forward (ie. it does everything that is currently supported)16:52
bschaeferfrom what i understand16:53
fritschyeah16:53
bschaeferi suppose possibly more voices will come through in a few days16:53
fritschthere is only exactly one "problem"16:53
fritschgpu1 decodes via vaapi16:53
fritschgpu2 would be needed to display and would support R8G8 dma_buf sharing16:53
fritschwhat would not happen, that's the only case I see a problem with16:53
fritschcause for now - we fail much earlier16:54
fritschand there are simple not two intel gpus16:54
fritschyou cannot just "stick" 2 of them into your computer16:54
bschaeferi suppose for ... imagining sake. *if* there were two active GPUs16:54
bschaeferit *shouldnt* matter from what im reading... render nodes *do not* 1to1 to a card16:54
fritschif there were, both need to support dma_buf and both need the mesa RG8 extension16:54
fritschjep, they don't16:54
bschaeferfor legacy reasons render nodes are create per device16:54
bschaeferdoes not mean they map 1to116:55
bschaefer1toany is more like it16:55
fritschdma_buf is a kernel API16:55
fritschit does not matter which gpu is rendering16:55
fritschas long as it supports dma_buf and the extension to create the image16:55
fritschyeah, take your time to reply ...16:55
fritsch:-)16:55
fritschgetting popcorn16:55
bschaeferits kind of misleading to be honest and i was thinking about the same :)16:55
bschaeferim going to wait a bit16:56
bschaeferas, i dont think that paper helped sway his point of view16:56
fritschyeah16:57
bschaeferas this point, i mean ill need a concrete example to convince which i dont have the hardware atm :)16:58
bschaeferat this point*16:58
fritschthere is no such hw combination16:58
fritschfor what he is asking16:58
fritschas there is no GPU besides intel that has this support: https://github.com/BrandonSchaefer/xbmc/blob/6a668e62f15c8114cb43585af8760ed7a42d01dd/xbmc/cores/VideoPlayer/DVDCodecs/Video/VAAPI.cpp#L128516:59
bschaefera mythical device16:59
fritschhe might come up with - then let's share with RGBA ...17:00
* bschaefer doesnt actually fully understand that code :)17:01
bschaeferas i understand it, you get a raw decoded image17:01
fritschit's quite easy17:01
bschaeferfrom vaapi then copy it17:01
bschaefer(into a texture then render?)17:01
fritschyou tell vaapi to derive an image17:01
fritschuse that via vaAcquiteBufferHandle17:01
fritschand now create an egl image of it17:02
bschaeferwhich is just the decoded buffer from the hardware?17:02
fritschyeah17:02
fritschthen the eglCreateImageKHR is used17:02
fritschto create Y17:02
fritschand VU17:02
fritschthis is later used in a yuv2rgb shader for display17:02
bschaeferthen just render this through a shader?17:02
fritschjep17:02
bschaeferwell that makes sense17:02
bschaeferand you need EGL_LINUX_DRM_FOURCC_EXT to get that raw image?17:02
fritschthat's the format we use17:03
fritschYUV 8 bit17:03
fritschY -> 8 bit17:03
bschaefer    This extension allows creating an EGLImage from a Linux dma_buf file   descriptor or multiple file descriptors in the case of multi-plane YUV  images.17:03
fritschand UV17:03
bschaeferright17:03
fritschyeah, was created for kodi :-)17:03
bschaeferotherwise you would have to convert?17:03
bschaefero very nice!17:03
fritschotherwise we needed to say to vaapi: create a RGBA17:03
fritschand 4*8 >> 8 + 2*4 = 1617:04
bschaeferi suppose the shader could do that... possibly17:04
fritschand doing yuv-> RGBA needs an intermediate17:04
fritschyeah, but why?17:04
bschaeferhaha yeah :)17:04
bschaeferbetter then software17:04
bschaefer(looking at how bad software was!)17:04
fritschI am currently in contact with the intel guys to get RG16 and R1617:04
bschaefero nice17:04
fritschas their hevc-10 bit is stored in P010 format17:05
fritschbasically same as NV1217:05
fritschbut 16 bit and the 10 bits are only relevant17:05
fritschso the shader afterwards needs to do something "additional"17:05
fritschdown dithering for 8 bit rendering17:05
fritschand extracting the values17:05
bschaeferhuh its 16 bits but you only use 1017:05
bschaeferfor p01017:05
fritschjep17:05
* bschaefer has never heard of that17:05
fritschhow would you efficently store 10 bit?17:06
fritsch:-)17:06
fritschwhile still using fast data access?17:06
bschaeferhaha yeah17:06
fritschand that way we are ready for 12 bit, 16 bit and so on17:06
* bschaefer would hope to use those extra 5 bits for more data17:06
fritschbtw. "more data"17:07
fritschi hope MIR has something like metadata17:07
fritschall that 10 bit to 8 bit17:07
fritschlimited range to full range17:07
fritschjust sucks for userspace17:07
fritschwe would normally juse say: here -> texture / image / whatever -> it is limited range17:07
bschaeferhmm most pixel formats we have are 32 bit + some 24 bits17:07
fritschdisplay it properly17:07
* bschaefer isnt fully sure17:07
fritschthat's the desktop17:07
fritschyes17:07
fritschbut when doing video we have limited range by default17:08
fritsch16 .. 23517:08
fritschvalues17:08
fritschif you display them 1:1 on a full rgb display17:08
fritschyou end up without whites17:08
fritschand without blacks17:08
bschaefero eww17:08
fritschthat's why metadata is so important17:08
bschaeferthats something RAOF would know :)17:08
fritschi am quite sure he does17:08
fritschnow good luck with your reply17:08
bschaeferhaha17:08
bschaeferthanks17:09
fritschafk a bit17:09
* bschaefer does the same17:09
bschaeferfritsch, also is there interest in support arm64 in kodi? At lease for me there is :)20:43
bschaeferconfigure: error: unsupported native build platform: aarch64-unknown-linux-gnu20:43
bschaeferhttps://launchpadlibrarian.net/293127083/buildlog_snap_ubuntu_xenial_arm64_kodi-mir-snapshot_BUILDING.txt.gz20:43
bschaeferogra_, also you can try cmake vs their autotools.... since they plan on deprecating autotools: http://bazaar.launchpad.net/~brandontschaefer/+junk/xbmc-snap/view/head:/snapcraft.yaml#L4821:38
bschaeferits commented out (plus you can fix some of the extra options since you've ffmpeg manually)21:38
=== JanC is now known as Guest39718
=== JanC_ is now known as JanC

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!