alyssa changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - https://gitlab.freedesktop.org/panfrost - Logs https://freenode.irclog.whitequark.org/panfrost - Discord Discard
chewitt has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<hanetzer> FINAL TOMORROW!
<tomeu> daniels: I put delays before and after submitting job batches and saw no differences, but I guess I should try as you say because it would be telling and quick
<tomeu> alyssa: those are good suggestions, I have to look at panwrap at some point but was trying to postpone the time needed to setup the blob for as long as possible
<tomeu> alyssa: btw, I'm getting error detected from slot 0, job status 0x00000058 (DATA_INVALID_FAULT) when running kmscube, but not with weston, which shows similar artifacts
<tomeu> or I think, will check next time I hack on panfrost
BenG83 has quit [Ping timeout: 240 seconds]
<cyrozap> I've been reading through the channel history since I haven't really been paying attention the last month or so, and I just stumbled across this gem: https://freenode.irclog.whitequark.org/panfrost/2018-11-09#23455749;
<cyrozap> That gave me a good chuckle :P
anarsoul|2 has quit [Ping timeout: 272 seconds]
davidlt has joined #panfrost
pH5 has quit [Quit: bye]
TheKit has quit [Remote host closed the connection]
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
TheKit has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<narmstrong> alyssa: I also have error detected from slot 0, job status 0x00000058 (DATA_INVALID_FAULT), but output is correct
BenG83 has joined #panfrost
<narmstrong> tomeu: I have near-zero-artifact weston now, but it blocks after a few seconds
<tomeu> narmstrong: sounds great, what did you have to do?
<narmstrong> same for kmscube, it stops after a few seconds
<tomeu> will give another look at event handling when I get back to panfrost
<davidlt> tomeu, you mean rendering or working weston?
<narmstrong> tomeu: (It may be a shame) I backported all the panfrost patches on top of the lima-18.3 branch and took your "Don't emit framebuffer at context creation time", "Use struct base_jd_event_v2 when handling events" and "increment correctly kbase_ioctl_job_submit.addr array pointer" fixes
<narmstrong> davidlt: both
<davidlt> nice, that's a nice progress even for 2 seconds :)
<narmstrong> tomeu: I created a monster, but I will be able to run Kodi with it (Lima renders perfectly with kodi)
<tomeu> I'm a bit confused, what has lima to do with this?
<narmstrong> davidlt: sure ! It's a great move, considering we don;'t have a binary libMali for the t820
<narmstrong> tomeu: nothing, but it doesn't use mesa master branch, but the 18.3 release, it may be related
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<narmstrong> davidlt: but I can't run es2gears_wayland or glmars2-es2-wayland, I get an error initializing EGL
<tomeu> ok, then I guess I won't be able to directly help with it
<tomeu> narmstrong: where is the process blocked?
<narmstrong> tomeu: no idea, I need to figure that out, when blocked weston can't be killed and stays defunct, but it's the same behaviour as with kmscube, I see a bunch of `TODO panfrost_flush_resource` then nothing
<tomeu> ok, if it's in force_flush_fragment, then we probably need to expand it to handle more events, like I did with BASE_JD_EVENT_JOB_INVALID
<narmstrong> ok, it's the `error detected from slot 0, job status 0x00000058 (DATA_INVALID_FAULT)` that causes the blocking
<narmstrong> And I can't even stop GDB in this case
<tomeu> if you attach to the blocked process with gdb -p <pid>, you cannot get a backtrace?
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<chewitt> tomeu: the backport to 18.3 is largely my request .. we are proving/testing lima on other hardware from the same OS build-system so the lima/panfrost patch-sets need to coexist
<chewitt> using 'stable' releases as the base is also lots easier when working with large patch-sets
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
raster has joined #panfrost
<narmstrong> tomeu: no it’s stuck in the kernel, it’s a wait_event_killable... I’m trying to switch to an interruptible wait so I can backtrace
<narmstrong> But the gpu fault is the main issue ! And I have really no idea how to solve it
<narmstrong> I’m not sure Alyssa worked a lot on this kbase driver version, so maybe it was fixed in the older version
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
raster has quit [Ping timeout: 268 seconds]
raster has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
BenG83 has quit [Quit: Leaving]
BenG83 has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<narmstrong> tomeu: mmind00: does the rockchip upstream driver handles implicit fencing in the drm driver ?
<tomeu> I was assuming this is being taken care of in drm core helpers, but also wanted to check
<tomeu> I'm not sure that could explain the artifacts, as randomly inserting sleeps didn't seemt o make a difference
<tomeu> I was planning to look at all the ioctls and soft jobs to see if there's anything that we should be obviously doing in flush or so
<tomeu> but hav ea bunch of stuff to do solve before I can go back to panfrost
<narmstrong> tomeu: mmind00: drm_gem_fb_prepare_fb doesn't seem to be called in the planes
<narmstrong> tomeu: try this https://www.irccloud.com/pastebin/LZAyxwvZ/
<narmstrong> Lyude: alyssa: no idea how to debug the GPU DATA_INVALID_FAULT...
<mmind00> narmstrong: you mean this one https://patchwork.kernel.org/patch/10706103/
<mmind00> narmstrong: looks like I still need to pester someone for a Reviewed-by, before I can apply that
<mmind00> narmstrong: and yep, at least on the lima side this made output a bit nicer
<narmstrong> mmind00: oh I missed it
<narmstrong> I can r-b it
<narmstrong> mmind00: can you apply it ?
<narmstrong> now you can :shipit:
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<Lyude> narmstrong: not 100% sure myself either, I'm thinking a place to start might be getting some replays and start trying to disable various steps to see which one causes the error to go away
<Lyude> have you used panwrap before?
<narmstrong> Lyude: not at all
<Lyude> alyssa: btw, do you know if it's possible that different Mali GPUs in the t8xx generation might not all have the same fragment shader core and thus, some might only support SFBDs?
<Lyude> I've been meaning to check the Mali GPU props to make sure we aren't hitting some silly issue like that
<Lyude> narmstrong: so currently the mesa fork we have builds a libpanwrap.so
<Lyude> If you LD_PRELOAD it and run something with panfrost, it will generate a "replay" which essentially consists of an autogenerated C program based off the API interactions between kernel and panfrost
<Lyude> If you compile and run that program, it's supposed to be identical to the actual demo you ran, but since it's all C code you can modify the replay, recompile and mess around with it without needing to change panfrost
<narmstrong> Wow super cool !
<Lyude> Mhm-its a neat idea Alyssa got from Lima, I think they used to have something similar
<Lyude> narmstrong: something I forgot to mention-i haven't tested replays with the kapi update
<Lyude> So some stuff in that might need fixing
<Lyude> It generates code, but I haven't tried compiling any of it
<alyssa> tomeu: panwrap is not just for the blob, it's also for tracing our own driver :P
<Lyude> Until we have our own kmod of course
<alyssa> Lyude: "btw, do you know if it's possible that different Mali GPUs in the t8xx generation might not all have the same fragment shader core and thus, some might only support SFBDs" This is highly unlikely
<alyssa> Since SFBD/MFBD support corresponds to support for MRT, a feature mandated in ES 3.2
<Lyude> alyssa: eventually we should probably split it back out again eventually so we can have it in a position so we can use it like how freedreno uses it in addition to just having replays: e.g. allow it to translate whatever kapi calls we make to our (eventual) kernel driver to mali_kbase to make new hw bringup easier
<Lyude> alyssa: ahhh
<Lyude> Good to know :)
<alyssa> AFAIK, all t8xx is labeled as 3.2 compliant
<Lyude> (also that panwrap split won't happen for a pretty long while, but figured I'd just put that out there)
<Lyude> alyssa: does that make sense btw? I know you wanted to also figure out how to get the disasm integrated into mesa
<alyssa> Lyude: Ehh
<alyssa> The reason I had it split out is so we're sharing headers
<alyssa> And every build of mesa also builds panwrap
<Lyude> alyssa: mhm-we could just install the headers alongside mesa
<alyssa> Which means I can gaurantee panwrap is still working at every given commit and not out of sync (which is what was happening like crazy)
<Lyude> btw
<Lyude> This wouldn't happen until we have a fully functional kernel driver
<alyssa> Gotcha
<alyssa> Lyude: Also, PM?
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
<narmstrong> Lyude: I’ll have a run, thanks !
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
anarsoul|2 has joined #panfrost
rhyskidd has quit [Quit: rhyskidd]
rhyskidd has joined #panfrost
pH5 has joined #panfrost
cwabbott_ has joined #panfrost
cwabbott has quit [Ping timeout: 250 seconds]
cwabbott_ is now known as cwabbott
robert_ancell has joined #panfrost
<narmstrong> Lyude: currently trying, but dummy question, where does it "generate" the code ?
<Lyude> narmstrong: stdout
<narmstrong> hmm, it outputs only shaders
<Lyude> narmstrong: mind showing me?
<narmstrong> (oops, I left a debug print)
<Lyude> yeah it's definitely not loaded, and you made sure to LD_PRELOAD it?
<narmstrong> Yep
<Lyude> libpanwrap.so I mean
<narmstrong> yep
<narmstrong> `$ LD_PRELOAD=/usr/local/lib/aarch64-linux-gnu/libpanwrap.so ./kmscube`
<narmstrong> `LD_PRELOAD=/usr/local/lib/aarch64-linux-gnu/libpanwrap.so ldd` shows me libpanwrap in the list
<Lyude> might be that panwrap needs to be updated to detect the new ioctls
<narmstrong> let me retry
unoccupied has quit [Quit: WeeChat 2.2]
<Lyude> narmstrong: if what you're trying now doesn't work I bet we just need to update panwrap a bit
<narmstrong> Lyude: yeah maybe !
<Lyude> narmstrong: the way it starts tracing is basically by overriding the ioctl() functions through the LD_PRELOAD, then checking what the arguments/file names being passed through to it are
<Lyude> or rather, that's an old branch
<narmstrong> hmm yeah I have a different code
<Lyude> yeah, just go to that spot in your own branch and see what it's doing there
<narmstrong> yep, I'l have a look there, thx
anarsoul|2 has quit [Remote host closed the connection]
<Lyude> narmstrong: np, let me know if I can help anymore. probably won't be able to look at this until tonight/more likely the weekend
<narmstrong> fun stuff, mali_fd is not detected correctly
<Lyude> ahhh, lol
<narmstrong> maybe because I'm running aarch64 ?
<Lyude> that would explain it
<Lyude> narmstrong: no, most of that is tested only on aarch64
<Lyude> narmstrong: sure it has permissions to open?
<narmstrong> in fact, I get the open for /dev/mali0 but it nevers catches any ioctl for this fd
<Lyude> narmstrong: mind linking me to your branch again?
anarsoul|2 has joined #panfrost
<narmstrong> I get ioctls for fds not catched by panwrap
<narmstrong> i get a mali0 open without any ioctls after, and I don't get drm either
<Lyude> dunno if I'd expect drm
<narmstrong> well, I see the drm ioctls !
<Lyude> narmstrong: oh, huh
<Lyude> (will look at your branch in just a moment)
<narmstrong> If I force the mali FD I get some code :-)
<Lyude> oh cool!
<narmstrong> Ah ah, someone does a fcntl(5, F_DUPFD_CLOEXEC, 3)
<Lyude> oh, lol
<Lyude> we will need to override fcntl then
<Lyude> a warning btw: debugging panwrap can get weird sometimes
<narmstrong> yeah, LD_PRELOAD can get weird
<narmstrong> http://termbin.com/xrhr the panwrap up to when the ioctl locks
<narmstrong> uint32_t ubuf_0_165[] = {
<narmstrong> 0x0, 0x0, 0x0, 0x0,
<narmstrong> 0x0, 0x0, 0x0, 0x0,
<narmstrong> }; doesn't look very good
<Lyude> narmstrong: does the rest of panwrap seem to work?
<Lyude> erm, s/rest of//
<narmstrong> By compiling it ? Haven’t tried
<narmstrong> But looking and the output, the last which generates the gpu fault looks bad
raster has quit [Quit: Gettin' stinky!]
<Lyude> ahh
<Lyude> narmstrong: btw: you can also view the actual AS of the job if you've got the mali_kbase debugging stuff enabled
<narmstrong> Lyude: I tried to enable the mali_kbase debug but failed miserably, can you point me to it ?
<Lyude> that's why I added ./config :), but now I need to refresh myself on what options enable this, sec
<narmstrong> Yep it’s very handy ! I enabled MALI_DEBUG but it did nothing...
<Lyude> narmstrong: feel free to change the platform name if you need https://paste.fedoraproject.org/paste/T3ALG84mZZJrf0xYqLEQUA
<Lyude> iirc that's what I had which enabled it
BenG83 has quit [Remote host closed the connection]
BenG83 has joined #panfrost
<narmstrong> Indeed I missed a few options
TheKit has quit [Ping timeout: 252 seconds]
TheKit has joined #panfrost
pH5 has quit [Quit: -_-]
<alyssa> narmstrong: Lyude: FWIW, "compiling replays and rerunning" doesn't work anymore and is no longer supported
<alyssa> But the output is stil super for debug
<Lyude> alyssa: i already mentioned it's probably broken
<alyssa> Not probably, definitely :p
<Lyude> didn't know it was unsupported tohugh
<Lyude> *though
<alyssa> After getting the first tri on the screen it mostly loses its usefulness and becomes a major maintenance burden imo
<alyssa> Reading the panwrap now
<alyssa> mali_attr is kind of suspect
<alyssa> The lack of a fragment shader core is also suspect but it's possible panwrap isn't printing them right anymore
<alyssa> Wondering if it's an ordering type/interjob dep/etc issue instead tho
<alyssa> Wait, that doesn't make a ton of sense, uh
<Lyude> alyssa: panwrap at least should have been updated alongside everything else with the uapi change, but it might be worth looking at the diffs
<alyssa> Mm