alyssa changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - Logs https://freenode.irclog.whitequark.org/panfrost - <daniels> avoiding X is a huge feature
<HdkR> hmm, It's getting FDs from somewhere. Wonder if it is from the GPUD
stikonas has quit [Remote host closed the connection]
<HdkR> It opens /vendor/etc/meow.cfg, does a couple of other things, closes fd 6, then passes ioctls to an fd 6, first one being GET_VERSION
<HdkR> Something handing us an FD through a means I haven't found yet
<chrisf> HdkR: you found a valhall board that partly cooperates?
<HdkR> I have a Valhall cell phone
<chrisf> ah
<HdkR> Looks like kbase has changed reasonably since panwrap was last touched
<HdkR> time to switch up all the ioctls
<chrisf> you're being given the gpu fd over binder or something?
<HdkR> Does binder even work with a terminal ELF?
<chrisf> sure
<HdkR> Guess I'm not sure how to capture the FD that way then
<chrisf> can you hack around it? when you see the fd which you think doesnt exist, go fishing in /proc/ ?
<HdkR> My test app is managing to get the Mali-FD to be at FD 6 consistently so I'm just using that
<chrisf> not sure why this mechanism though-- what phone is this?
<HdkR> Iqoo 5G
<HdkR> With the Dimensity 1000
<chrisf> oh, it showed up?
<chrisf> \o/
<HdkR> yep
<HdkR> Hm, this isn't nice. Looks like it has two other ioctl FDs open as well
_whitelogger has joined #panfrost
<HdkR> ioctl bases 0x64 and 0x67 instead of 0x80
vstehle has quit [Ping timeout: 240 seconds]
camus1 has joined #panfrost
kaspter has quit [Ping timeout: 256 seconds]
camus1 is now known as kaspter
<HdkR> Hm, looks like glFinish causes the driver to communicate over this 0x67 ioctl interface
<HdkR> Welp there is a pointer there that I can strip a shader binary from. Will be interesting to see
<HdkR> Should be able to rip a shader binary after dinner
<HdkR> Alright, let's capture some binaries
davidlt has joined #panfrost
buzzmarshall has quit [Remote host closed the connection]
<HdkR> ooooh!
<HdkR> PROT_GPU_EX
<HdkR> cute
<HdkR> There's the binary
<HdkR> well, at least the fragment shader
icecream95 has joined #panfrost
vstehle has joined #panfrost
guillaume_g has joined #panfrost
nlhowell has quit [Ping timeout: 240 seconds]
<daniels> HdkR: we should have G52 in CI pretty soon btw
<HdkR> nice
<HdkR> Okay, enough Valhall shenanigans for the day
<HdkR> This would definitely be easier on a Linux device rather than Android
<HdkR> Would also be nice if kbase with support for Valhall was posted somewhere
<HdkR> Or this device's kernel source :P
robmur01_ has joined #panfrost
robmur01 has quit [Ping timeout: 258 seconds]
<HdkR> Alright, that works
yann has joined #panfrost
<HdkR> That explains the couple of undocumented ioctls
<icecream95> HdkR: You mean they aren't violating the GPL? I'm suprised...
karolherbst has quit [Remote host closed the connection]
<HdkR> :P
camus1 has joined #panfrost
kaspter has quit [Ping timeout: 258 seconds]
camus1 is now known as kaspter
raster has joined #panfrost
<HdkR> I've clone it already
<HdkR> I'll be using it for reference tomorrow as I continue on the journey of extracting shader binaries
kaspter has quit [Ping timeout: 265 seconds]
kaspter has joined #panfrost
l-as has quit [Quit: Idle for 30+ days]
stikonas has joined #panfrost
robmur01_ is now known as robmur01
karolherbst has joined #panfrost
kaspter has quit [Ping timeout: 256 seconds]
kaspter has joined #panfrost
<austriancoder> alyssa: do you have cases where there is one render-only gpu and multiple kms devices?
icecream95 has quit [Ping timeout: 264 seconds]
<robmur01> there are certainly SoCs with a Mali GPU and multiple display controllers, yes
<robmur01> I have two in front of me right now :) (RK3288 and RK3399)
<urjaman> huh?
<urjaman> as in, how? (i guess RK3399 could get one plugged in with PCIe, but RK3288?)
<urjaman> (and yeah they've got multiple _outputs_, but they're both on the same Rockchip KMS device...)
<robmur01> Oh, maybe I've misunderstood what "KMS device" means then
<robmur01> if it's multiple *different* display controllers, rather than just multiple instances of one type, then certainly some of our Juno FPGA setups look like that, but they don't really count
<urjaman> yeah i was thinking like ... two controllers driven by different drivers and thus appearing as two different cards (vs. the two on the RK3288 are one DRI card)
<urjaman> and now that i'm thinking about it, i don't think any PCIe cards would count either (unless it's some weird FPGA framebuffer proto device :P) since they're capable of rendering themselves too
<robmur01> Hmm, IIRC the two HDLCDs on Juno do show up as separate cards - I was assuming that the Rockchip VOPs behaved the same way (I don't have the means to actually use a secondary display on either of my boards)
<daniels> well, one KMS device can have multiple { planes, CRTCs, connectors }, so you can use a single /dev/dri/cardN to drive multiple heads, as on Rockchip
<daniels> what Christian's talking about is having multiple totally distinct IP blocks
<daniels> (NXP got very weird in some of the i.MX8 and have two totally distinct display controllers on the same SoC - by analogy, think of an SoC which has a Komeda for HDMI and HDLCD for internal panel, and both can be used simultaneously)
<robmur01> OK, so I guess it's mostly an issue of semantics as to whether a driver considers multiple hardware blocks to be independent devices or just CRTCs for one overall logical "device"
<robmur01> In which case I think Juno's HDLCDs fall into the former category even without extra tacked-on Mali-DPs in FPGA
<urjaman> well the two CRTCs and outputs of the rockchip DRM device act similarly to eg. a PCIe graphics card with two CRTCs and connectors (except for the rendering) as in they can be used as one system by one driver
<robmur01> yeah, I guess Rockchip couldn't do its intended trick of switching a single display between the "big" and "little" VOPs based on resolution if they were exposed as separate devices
<robmur01> I'm too accustomed to looking at things from the hardware level :)
<alyssa> HdkR: spill ;p
rak-zero has joined #panfrost
nlhowell has joined #panfrost
camus1 has joined #panfrost
kaspter has quit [Ping timeout: 256 seconds]
camus1 is now known as kaspter
nlhowell has quit [Ping timeout: 256 seconds]
camus1 has joined #panfrost
kaspter has quit [Ping timeout: 258 seconds]
camus1 is now known as kaspter
buzzmarshall has joined #panfrost
camus1 has joined #panfrost
kaspter has quit [Ping timeout: 258 seconds]
camus1 is now known as kaspter
kaspter has quit [Ping timeout: 258 seconds]
kaspter has joined #panfrost
<HdkR> alyssa: 100% spilling?
raster has quit [Remote host closed the connection]
raster has joined #panfrost
raster has quit [Remote host closed the connection]
raster has joined #panfrost
macc24 has quit [Quit: ZNC 1.7.5 - https://znc.in]
<alyssa> HdkR: about valhall :p
<HdkR> Oh, I don't have a glass of valhall to spill
<HdkR> :P
<HdkR> alyssa: Panwrap isn't able to capture everything currently. The driver communicates with 3 FDs over ioctls as work is happening
<HdkR> Caught JOB_SUBMIT on compute just now
<alyssa> HdkR: fun :(
<HdkR> It has a new atom format that is only available in the kernel source that I found last night instead of any kbase release
<alyssa> oh boy
<alyssa> I'm curious whether it "looks like" midgard/bifrost beyond the kernel though
<HdkR> Not sure yet
<alyssa> we'll know soon then :)
<HdkR> dealing with Android is a pain since I can't just open /dev/mali0
<HdkR> https://pastebin.com/qVBNHsAA This is currently what I'm looking at for a job submit
<alyssa> ----what panwrap is this
<alyssa> i haven't seen output like this in *years*
<HdkR> github.com/Panfrost/pantry.git
<HdkR> I queried the channel for where the latest pantry was and didn't get a response from the void
<alyssa> .....uhhhhh
<alyssa> that's so ancient uh
<alyssa> See readme
<alyssa> the "if your name is Ryan" part applies
<HdkR> bweh
<urjaman> i guess the void was too confused about the question ... or just missed it
<alyssa> if I wasn't highlighted I probably didn't see it, sory :(
<alyssa> anyway,`jc = 0x7afff12580` that's the address you want to look at
<alyssa> HdkR: The fact I am listed there as "Cafe" should date the repo :p
<HdkR> Oh well, I'm still getting through it
<HdkR> https://pastebin.com/CJvRyn69 Looks like 128bit instructions there :P
<alyssa> what am I looking at
<HdkR> Looks like all zero is nop
<alyssa> okay so for starters the job descriptor header is the same
<alyssa> so that's a good start :p
<HdkR> and it's dual or triple instruction execution
<alyssa> I mean the payloads will be descriptors still, not instructions
<alyssa> Presumably
<HdkR> oh
<HdkR> It changed predictably, confusing
<alyssa> HdkR: hm?
<alyssa> HdkR: Oh, cute, okay
<alyssa> Yeah, this is definitely a midgard variant :)
<HdkR> lol
<alyssa> L23 is the start of the draw descriptor
<alyssa> L40 is pointers to all the other descriptors from there
<alyssa> textures, samplers, push uniforms, state, attribute buffers, attributes, {???? not a pointer}, {? but probably shared memory}
<alyssa> given the ??? is where varyings should be, they probably got rid of varying descriptors which is a big "thank gosh"
<alyssa> or if this is compute, I mean, there you go
<HdkR> This is compute
<alyssa> then what are sampler/texture pointers doing there?
<HdkR> I don't have a graphics test generating a job submit atm
<alyssa> (is your compute job reading from images or something?)
<HdkR> reading from an ssbo
<alyssa> uhm, ok
<alyssa> at any rate, this is serious deja vu and not just because you insist on using 3 year old tooling ;P
<HdkR> Working on moving over
<alyssa> thanks :)
<HdkR> I didn't really do much changes to this old thing anyway
<HdkR> jeez xxhash spams a million warnings in mesa
macc24 has joined #panfrost
<HdkR> tsk tsk, empty initializers
<alyssa> there's uh a patch for that sorry
<HdkR> What is this, C++? :P
<HdkR> libpanfrost_decode not found, tsk tsk
<alyssa> uh
<alyssa> commit 1e922d6848a5ade1254ec9622e7f1db73870bbf4 yes?
<alyssa> and you built mesa?
<HdkR> yes
<alyssa> uhh
<alyssa> does meson+android have some insanity?
<HdkR> I'm not even building it for android
<HdkR> libpanfrost_encoder also not found
<alyssa> pwd?
<HdkR> /mnt/Work/Work/Panfrost/mesa/src/panfrost/lib/panloader/Build$
<alyssa> Angelica
<alyssa> /mnt/Work/Work
<alyssa> Eliza
<alyssa> sorry yeah that seems right
<HdkR> NFS folder nesting ends up making it weird
<alyssa> meson.build for panloader is a little.. terrible
<alyssa> so uhhh
<HdkR> panfrost_encoder isn't described in any meson file aside from panloader
<alyssa> oh heck
<alyssa> did I never update meson
<alyssa> i suck sorry
<HdkR> That's one way of self deprecating I guess
<alyssa> hdkr: okay pull panwrap change
<alyssa> I didn't sleep well :(
<HdkR> I see
<HdkR> That seems to have built
<HdkR> Now i just need to figure out how to cross compile
<HdkR> To Android specifically
<Lyude> alyssa: is valhall more similar to midgard?
<alyssa> Lyude: dunno, you know as much as I do right now :)
<alyssa> but by midgard I mean the data structures from Midgard
<alyssa> bifrost is also midgard data structures largely
<alyssa> (this is why we can share a driver)
<HdkR> GNUC_PREREQ not defined. ugh this is going to be a nightmare
<alyssa> mesa or panwloader?
<HdkR> mesa
<alyssa> oof
<alyssa> I'm *fairly* sure the ChromeOS folks have meson+android in production..
<HdkR> I'm sure they care about Android more
<alyssa> HdkR: -D platforms=android
<alyssa> -D glx=disabled -Dgbm=disabled
<HdkR> cutils not found if I set platform to Android
<alyssa> cutils is uhhhh ???
<HdkR> https://hastebin.com/ojohatagac.ini Random cross-file generated from copying things from the internet
<HdkR> I hate cross compiling so much
<HdkR> I'll just go lie down on the floor for a few hours to feel better about life
<alyssa> rip
<alyssa> sorry :)(
<alyssa> er that should be a :(
<daniels> i suspect that cross-file is wrong in a few ways
<HdkR> It was definitely just slammed together because meson and mesa both don't provide an Android cross-file template
<daniels> I'd probably poke robclark for that, he's the last one I know of who was doing Android cross-compiles
<Lyude> HdkR: I might have old meson cross files for android stuff laying around somewhere
<HdkR> ic
<Lyude> HdkR: here's the gcc one I had for android, should be able to make it use clang as well if you need that. also though these are old and may not work entirely, there might also be some tricks I used I forgot to mention
<robclark> krh is probably the one who knows a bit about meson+android (or meson+xcompile in general)
<macc24> have there been any fixes to chromium after 20.1.6?
kaspter has quit [Ping timeout: 265 seconds]
<HdkR> Didn't the Android NDK drop gcc?
kaspter has joined #panfrost
<Lyude> HdkR: I said it's old :P
<HdkR> true
nlhowell has joined #panfrost
<krh> you can't compile mesa against the NDK, you need to have the full android source tree
<alyssa> maybe having pandecode depend on mesa was premature..
<HdkR> Oh
<HdkR> So I'll just yeet this code
<krh> there's stuff like cutils and whatnot that we need to build in
<alyssa> krh: fwiw the goal here isn't to build mesa for android, just need enough to build the panfrost genxml decoders etv
<krh> it's something that we could conceivably pull into mesa so that we could build a working native android driver
<alyssa> that used to depend on NIR, I fixed that :p
<krh> oh
<krh> that should be easier
<alyssa> on linux, I just say "build mesa normal and then we'll snarf out what we need from your build dir", of course
<alyssa> HdkR: let me tease this apart so you can throw away the mesa dep actually
<alyssa> wth that the only mesa linking dep is the util subset
<alyssa> which should be... simpler? I hope
tomboy64 has quit [Remote host closed the connection]
raster has quit [Remote host closed the connection]
tomboy64 has joined #panfrost
raster has joined #panfrost
sphalerite has quit [Quit: WeeChat 2.6]
sphalerite has joined #panfrost
raster has quit [Remote host closed the connection]
raster has joined #panfrost
guillaume_g has quit [Quit: Konversation terminated!]
raster has quit [Quit: Gettin' stinky!]
kaspter has quit [Ping timeout: 264 seconds]
kaspter has joined #panfrost
<macc24> is fbdev driver supposed to be faster than modesetting?
<macc24> moving windows on modesetting lags
<macc24> like super lags
<macc24> i tried with all kmsdev options on modesetting
<macc24> i am using linux 5.8.1 with mesa 20.1.6
raster has joined #panfrost
raster has quit [Quit: Gettin' stinky!]
Ntemis has joined #panfrost
<Ntemis> where i can ask questions about rpi4 support in mesa?
<Ntemis> what channel if there is one
<HdkR> #dri-devel or pi specific forums
davidlt has quit [Ping timeout: 260 seconds]
<Ntemis> thanks
raster has joined #panfrost
Ntemis has quit [Read error: Connection reset by peer]
archetech has joined #panfrost
karolherbst has quit [Quit: duh 🐧]
karolherbst has joined #panfrost
archetech has quit [Ping timeout: 258 seconds]
archetech has joined #panfrost
yann has quit [Ping timeout: 246 seconds]
archetech has quit [Ping timeout: 258 seconds]
stikonas has quit [Remote host closed the connection]
stikonas has joined #panfrost
raster has quit [Quit: Gettin' stinky!]