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

RAOFbschaefer: Yo!00:33
bschaeferRAOF, hey! Sooo questions about render nodes!00:34
RAOFCool.00:34
bschaeferif you had a mythical machine that supported drm buf with multiple render nodes00:34
bschaeferdoes it matter which node you pick? From my reading they dont relate to the specific card and is there for legacy reasons only00:35
* RAOF has such a machine, yes.00:35
RAOFIf you've got two different GPUs you'll have two different render nodes, one per GPU.00:35
bschaeferright00:35
RAOFSo it does indeed matter which render node you pick.00:35
RAOFBut!00:35
bschaeferRAOF, https://dvdhrm.wordpress.com/tag/drm/00:35
RAOFWhichever node you pick, you should be able to display.00:36
bschaeferso if mir is rendering on intel00:36
bschaeferand youve an amd gpu and you told kodi to render on it00:36
bschaeferand then picked the amd render node, it wouldnt display on mir?00:36
RAOFIt would.00:36
RAOFThat's what dma-buf is for!00:36
RAOFCross GPU sharing.00:36
bschaefersooo then it doesnt matter which one you pick!?00:36
bschaefer:|00:37
bschaeferRAOF, https://github.com/xbmc/xbmc/pull/1092200:37
RAOFIt *does* matter which one you pick.00:37
RAOFFor example, if you pick the one that doesn't support GPU decoding you won't be able to do GPU decoding on it :)00:37
bschaeferit matters *but* it'll always display?00:37
RAOFYes.00:37
RAOFAsterisk.00:37
bschaefer:)00:37
RAOFThe relevant asterisk here is: You can't currently hand a buffer to Mir at all.00:38
bschaeferhmm so how would one pick a GPU render node that *supports* this? Poke the extension?00:38
bschaeferfrom the fd?00:38
RAOFCorrect.00:39
bschaefersooo thats *all* that matters is picking a correct render node that supports the extension you want to support00:39
RAOFYou'd just need to initialise vaapi on the render node.00:39
bschaeferright, soo its up to me to pick a render node that supports what i expect out of vaapi00:39
bschaeferso for kodi, in this case only supports intel atm00:40
RAOFOr, rather, you could initialise the vaapi library on *all* render nodes, and then pick!00:40
bschaeferEGL_LINUX_DRM_FOURCC_EXT00:40
bschaefersince it *needs* this00:40
bschaeferbased on which one fails?00:40
bschaeferwhen you init vaapi?00:40
RAOFYou could happily use both simultaneously if you wanted - picture in picture, or something.00:41
RAOFThere's no requirement that you use a single GPU :)00:41
RAOFExcept, I think, in the kodi code :)00:41
bschaefer:)00:41
bschaeferyeah it slightly depends on one va display atm00:42
* bschaefer can possibly come up with a decent solution to query extensions *somehow* from the fd00:42
bschaeferRAOF, the good news is it *does* work on mir00:42
bschaeferand works well00:42
RAOFOh, sweet.00:43
bschaeferthe drm side of things00:43
bschaeferso DRM + EGL + Render nodes 100% works (with only liner/bi for scaling)00:44
bschaeferscaler* since nothing else seems to be implemented in the driver as far as i know?00:44
bschaeferRAOF, running the same video 3840x2160p60 on mir with the same settings frames dropped 0, frames skipped 000:45
bschaeferfor X11 dropped 0, skipped 10100:45
bschaefererr skipped for mir was 300:45
bschaefer(for 8 min of that video)00:45
bschaefer(using mir on kms)00:46
bschaeferRAOF, are... the extensions part of the inode? ie. stat that fd?00:47
* bschaefer looks around more00:47
RAOFNo.00:50
RAOFThe only way you can check extensions is to bring up a driver on the fd.00:50
RAOFBecause it's the driver that implements the extensions, anyway :)00:50
bschaeferright, soo bringing up the driver on the fd00:50
bschaeferopening a gl context?00:50
bschaeferRAOF, i suppose the kernel does that somewere i can dig around as my googling is missing specific terms atm haha00:51
RAOFNo, not the kernel.00:51
RAOFThe userspace driver.00:51
bschaefero so mir would be doing that?00:51
RAOFNo, mesa/libva00:51
bschaeferRAOF, which would be part of the vaDisplayMir?00:52
bschaeferbits?00:52
RAOFWell, which is currently a part of the vaDisplayDRM bits.00:52
bschaeferright, but the DRM part puts that on the users00:52
bschaeferwell for RenderNodes00:52
bschaefersince we cant drmOpen a device00:52
bschaefersince kms already opens it00:52
* bschaefer locked up his machine debugging that a few times...00:53
RAOFSo, if vaDisplayDRM returns non-null you've handed it a rendernode that it has a driver for.00:53
bschaeferRAOF, but that doesnt mean *it* supports an extension we need00:53
bschaeferso for kodi it has a specific extension EGL_LINUX_DRM_FOURCC_EXT00:54
RAOFRight.00:54
bschaeferthat it uses to get a decoded image in an expected format00:54
RAOF*That* extension is required on the *display* device.00:54
RAOFSo, since you've already got an EGL context on the Mir surface, you can query it.00:54
bschaeferooo right and we use00:54
bschaeferthe egl context in vaapi atm00:55
* bschaefer checks if they already do that00:55
bschaeferhm no they take the current egl context from the windowing system and create a different one00:55
RAOFWell, whatever EGL context they create on the Mir surface is going to be on the display device.00:56
bschaeferriht00:56
bschaeferright*00:56
bschaeferthey make current with00:56
RAOF(Which is not necessarily the same device that vaDisplayDRM is using, but that doesn't matter much)00:56
bschaefererr create a context00:56
bschaefernew_context, mir_context00:56
bschaeferRAOF, right, which is where i was wrapping around to00:57
bschaefersoo if mir is using amd00:57
bschaeferwhich wont have EGL_LINUX_DRM_FOURCC_EXT, it'll have to bail out *anyway*00:57
bschaeferbefore we even get to the drm va display btis00:57
* bschaefer doesnt see any extension checking strangly00:57
bschaefer  if (gpuvendor.compare(0, 5, "intel") != 0)00:57
bschaefero yeah they check for that specificly00:57
RAOFThe proprietary drivers may or may not support EGL_EXT_image_dma_buf_import ; AFAIK all the mesa drivers do, though.00:58
bschaeferRAOF, i suppose from there is up to me not to pick the wrong render node though?00:59
bschaeferie. if we are on render node 130 (the one mir is using with the intel support)00:59
RAOFNope, doesn't matter.00:59
bschaeferas long as the display00:59
bschaeferright00:59
RAOFWhat you *should* do, though, is loop through all available rendernodes.00:59
bschaeferso that extension is only required on w/e card the mir serve ris running on01:00
bschaeferRAOF, what im doing currently is just running through 128 --> 128 + 16 and seeing if they exist01:00
RAOFBecause there's no guarantee that vaGetDisplayDRM will return non-null on the first one you pick.01:00
bschaeferooo very true01:00
* bschaefer updates branch01:00
RAOFArgh.01:01
* RAOF notices the lack of ++counter in the test.01:01
bschaeferthanks for answering those... and enjoy fixing tests!01:03
=== chihchun_afk is now known as chihchun
fritschRAOF: bschaefer: this mysticaly machine needed to support RG8 and R8 extensions for the dma_buf transfer - and as besides intel no one implements it ...05:41
fritschconcerning the post on github: vaPutSurface is no usecase for kodi, we use egl_createImageSomething extension05:42
RAOFfritsch: Only the EGLImage consumer needs that extension, though, right?05:42
fritschjep05:42
fritschso intel would be the "consumer"05:42
RAOFfritsch: So Intel is the only GPU that can *output*, but any dma-buf capable GPU can decode.05:42
fritschand amd for example would be the decoder05:42
fritschjep05:43
RAOFYup. Fierce agreement!05:43
fritschyeah, in that github discussion something else, we had a little fight two days before was "discussed" un the vaapi cover ...05:43
RAOFWhy don't you use vaPutSurface, by the way?05:43
fritschlol05:43
fritschreason in 1 minute, as work is calling:05:43
fritschit scales05:43
fritschit scales limited video range to full range without dithering05:44
fritschkilling all the grey ramps05:44
fritsch2nd: it does a full copy!05:44
fritschso, quality sucks and performance also05:44
RAOFUrgh.05:44
fritschwith the dma_buf approach we can directly use a shader on the Y and VU plane05:44
fritschand are done05:44
fritschwithout copying anything05:44
fritschalso vaPutSurface is GLX only05:45
fritschthere is no EGL alternative to it and also (obviously) no DRM alternative05:45
RAOFFair enough. vaPutSurface *should* be able to do zero-copy to display in optimal circumstances, but I don't know if it *does* :)05:45
fritschit can't05:45
fritschit is basically a texture from pixmap approach05:45
fritschor better said: you can use it as texture from pixmap copy05:45
fritschthat will only work with real opengl05:46
fritschoki - got to go. Back in 12 hours :-)05:46
RAOF:)05:46
fritschthx for your post in the bugreport05:46
RAOFIt should be able to use the Present extension and zero-copy it, but probably doesn't :)05:46
fritschdoes anyone on the planet use its present extension?05:46
fritsch:-)05:46
fritschespecially if you are an OpenGL / OpenGLES application?05:46
fritschs/bugreport/pull request/05:47
RAOFYeah, GL uses the Present extension nowadays.05:54
RAOFGLX (via DRI3)05:55
=== dandrader is now known as dandrader|afk
alan_gattente: where's the best place for tracking gtk-mir bugs? I've seen them reported against lp:mir and lp:miral and am not 100% sure where to redirect them.15:10
attentealan_g: against gtk with the tag gtk-mir15:12
attentealan_g: can you point me to your surface positioning feedback branch? sorry it's taken so long for me to look at it15:13
alan_gattente: therre's two parts, one is in mir-0.25 (which is in a silo somewhere) the other got released in miral-0.2 but needs the unreleased Mir for you to make much use of it.15:17
attentealan_g: it's ok, don't need a release, but if you have links to the branches, that works too15:17
alan_glp:mir/25 lp:miral/release15:18
kdubdoes anyone know if the -egl and -egl_sync flags work on xmir? strange green-screen behavior for me15:34
kdubsw works alright15:34
anpoklast time i tried I experienced the same..15:36
kdubanpok, thanks15:45
=== dandrader|afk is now known as dandrader
fritschRAOF: can you test the patches with your amd gpu doing vaapi decoding and the intel card doing the rendering?19:04
fritschkodi's code blocks non "intel" renderers anyways ...19:05
fritschvaapi will be disabled for these when not overwritten19:05
fritschanyways19:05
bschaeferfritsch, he is on UTC + 11 :)19:06
fritschah - so he will wake up soon, right? :-)19:06
bschaeferhmm maybe 4 hours?19:07
bschaefermaybe 3 when he'll be on19:07
fritsch:-)19:07
fritschwas for the backlog anyways. I met him that morning before I was going to work19:07
fritschso just returned19:07
bschaefero nice19:07
* bschaefer didnt see the backlog due to sleep and to lazy to setup a way to be on at all times :)19:08
fritschisn't it publically logged somewhere?19:08
bschaefero yeah i think so19:09
* bschaefer should fix kodi seg faulting when theres no mir socket19:18
bschaeferhmm actually that happens on x11 as well19:20
fritschjep19:20
fritsch:-)19:20
=== dandrader is now known as dandrader|afk
=== dandrader|afk is now known as dandrader
=== chihchun is now known as chihchun_afk
=== King_InuYasha is now known as Son_Goku
bschaeferfritsch, eek... i rebased... and seem to have added random things?21:45
bschaeferhttps://github.com/xbmc/xbmc/pull/1089821:46
bschaeferfritsch, nm fixed, just needed to fetch upstream and rebase21:51
bschaefer(also thanks for telling me about ctrl+o made me realize I didnt do that for mir :) fixed now21:55

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