alyssa changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - https://gitlab.freedesktop.org/panfrost - Logs https://freenode.irclog.whitequark.org/panfrost - <daniels> avoiding X is a huge feature
megi has quit [Ping timeout: 245 seconds]
popolon has joined #panfrost
<popolon> hi (again)
<popolon> (emilia) pinball works too on git version, didn't tested on RC1 one => https://aur.archlinux.org/packages/pinball/
<popolon> armagetronad too (a tron lightcycle like)
<popolon> the tutorial part seems to crash, but the game itself works perfectly
<popolon> minetest (a minecraft like) works perfectly too :)
<popolon> I tried to change rendering settings, to near maximum and it freeze, but from start, with default settings, it works
<popolon> loop debuggings info on terminal during the freese => finish with a LLVM ERROR: out of memory
<popolon> looks like a problem with shaders
<popolon> bye
<popolon> and thanks again for your great work.
popolon has quit [Quit: WeeChat 2.5]
<SolidHal> belgin, SolidHal here, the creator of that patch. I would advise against using that one. It causes memory corruption, and leads to kernel crashes. I developed a new fix that doesn't break anything. You can see it here
vstehle has quit [Ping timeout: 245 seconds]
davidlt has joined #panfrost
davidlt has quit [Ping timeout: 245 seconds]
Elpaulo has joined #panfrost
vstehle has joined #panfrost
herbmilleriw has quit [Ping timeout: 245 seconds]
herbmilleriw has joined #panfrost
<bbrezillon> robher: hm, then I don't understand what's happening
guillaume_g has joined #panfrost
empty_string has quit [Quit: Disconnecting from server]
mani_s has quit [Read error: Connection reset by peer]
griffinp has quit [Read error: Connection reset by peer]
mani_s has joined #panfrost
guillaume_g has quit [Quit: Konversation terminated!]
guillaume_g has joined #panfrost
<bbrezillon> robher, tomeu: I traced the time spent waiting on BO readiness and out_sync objs, and it looks like on the tests I running locally it's usually between 200 and 400 usecs
<bbrezillon> while on the CI it's 0 usec
<bbrezillon> like if the fence was signaled before the job is scheduled
warpme_ has joined #panfrost
pH5 has joined #panfrost
Elpaulo has quit [Read error: Connection reset by peer]
Elpaulo has joined #panfrost
bbrezillon has quit [Ping timeout: 245 seconds]
bbrezillon has joined #panfrost
davidlt has joined #panfrost
warpme_ has quit [Quit: warpme_]
grw has quit [Ping timeout: 246 seconds]
<tomeu> bbrezillon: hmm, are you sure the logging is working as expected?
<bbrezillon> tomeu: I think so
<bbrezillon> it's no longer 0usec though
<bbrezillon> but it's still pretty low
<tomeu> guess you are using the performance devfreq governor locally?
<tomeu> 200-400 usecs is probably too much for the kind of jobs that deqp submits
<bbrezillon> actually, I wasn't
<bbrezillon> I just switched to it
<bbrezillon> and now the numbers I get are lower
<bbrezillon> closer to the CI ones
<bbrezillon> but it keeps working locally :-(
<tomeu> well, at least something worked as expected :p
<tomeu> bbrezillon: have you tried already running through valgrind?
<tomeu> wonder also about helgrind
<bbrezillon> nope, I haven't
<bbrezillon> tomeu: valgrind didn't spot any memory issues http://code.bulix.org/8w11jh-857704
warpme_ has joined #panfrost
<bbrezillon> tomeu: here is the helgrind one http://code.bulix.org/e9w89c-857710
<bbrezillon> nothing apart from the dEQP watchdog stuff
megi has joined #panfrost
<bbrezillon> which I guess we can ignore
<tomeu> hrm
<tomeu> and I guess you haven't been able to retrieve the qpa from lava?
raster has joined #panfrost
<bbrezillon> tomeu: I can
<bbrezillon> I only run one test through deqp-gles2
<bbrezillon> I can just cat the qpa file
<tomeu> oh, but we need the images, or are they base64 encoded?
<bbrezillon> they are base64 encoder
<bbrezillon> encoded
<bbrezillon> AFAIR
<tomeu> awesome
<tomeu> otherwise, we can always do the curl POST as gtucker said
<bbrezillon> this being said, I'm pretty sure the problem is related to not waiting after flushing jobs
<bbrezillon> since adding a delay makes it work
<tomeu> oooh
<tomeu> didn't have that peice of info
<tomeu> then we just need to fix the waiting :)
<bbrezillon> but I do call the wait_bo and even wait_syncobj
<bbrezillon> which is why I was wondering if it couldn't be that the kernel signals the fences too early
<bbrezillon> though I checked the kernel code and could spot any issues in the job scheduling logic
<tomeu> could be, yeah
<tomeu> were you able to enable dynamic debug logging?
<bbrezillon> yes
<bbrezillon> but now the test passes :'-(
<bbrezillon> same kernel, same everything, just a new config option
<bbrezillon> to be fair, DYNAMIC_DEBUG is pretty invasive
<bbrezillon> so I'm not surprised it hides the race (assuming this is a race condition we're looking for)
<tomeu> yeah, I'm a bit surprised it's such a small race though
<tomeu> where exactly is the delay making things pass?
<tomeu> maybe we should update the CI to 5.3, btw
<tomeu> well, we should probably run the CI on both
<bbrezillon> and yes, I'd rather find where the problem comes from
<bbrezillon> it's likely that this race already existed before my changes
<bbrezillon> I just triggered it by queueing jobs more agressively
<tomeu> yep
<tomeu> oh oh
<tomeu> bbrezillon: are the statements given to the asserts evaluated?
<bbrezillon> yes
<bbrezillon> and they pass
<bbrezillon> which means the kernel returns the BO is ready and objsync has been signaled
<bbrezillon> I'm recompiling a CI kernel without DYN_DEBUG
<bbrezillon> let's see if the problem is still present
<tomeu> may be worth it checking in kbase when jobs are signaled as done
<tomeu> in case I botched that
davidlt has quit [Ping timeout: 258 seconds]
<bbrezillon> I did check that
<bbrezillon> there are a few corner cases that aren't handled in the mainline driver
<bbrezillon> but I doubt we hit those cases
<bbrezillon> tomeu: oh come on! now the test passes
<bbrezillon> same kernel (with dyn_debug) just recompiled
<bbrezillon> and everything seems to work properly
<tomeu> bbrezillon: but with the udelay?
<bbrezillon> maybe a compiler issue
<bbrezillon> without the delay
<bbrezillon> I'll just remove all my traces to be sure
<tomeu> ouch
belgin has joined #panfrost
<alyssa> "loop debuggings info on terminal during the freese => finish with a LLVM ERROR: out of memory"
<alyssa> Uhhhhhhh are you sure you're using Panfrost?
<alyssa> Panfrost doesn't use LLVM
<HdkR> Maybe they're using clang to compile :P
<alyssa> bbrezillon: That's your issue, the assert
<alyssa> :V
<alyssa> assert(panfrost_bo_wait(bo, INT64_MAX)); assert(drmSyncobjWait(pan_screen(ctx->base.screen)->fd, &ctx->out_sync, 1, INT64_MAX, 0, NULL) >= 0);
<alyssa> you can't do that
<alyssa> You can't do an assert() with side effects
<alyssa> it'll run locally since you have a debug build, but won't ru at all in a release build
<alyssa> and we compile CI without asserts
<alyssa> So the CI isn't executing either of those functions
<alyssa> you need to execute them yourself and store the return value and then assert on the return value, so the statement always executes (but is only checked for debug)
<HdkR> Oof. I've done that before on accident :<
<alyssa> Otherwise the waits get deadcode eliminated away on a release build
<alyssa> tomeu: ^^
<tomeu> yep, that's what I was expecting to happen
<tomeu> alyssa: you seem to be in a much better timezone!
<alyssa> Heh
* bbrezillon facepalm
belgin has quit [Quit: Leaving]
<bbrezillon> alyssa: thx for reminding me this subtelty :)
<bbrezillon> I've been chasing this problem for 2 days
<alyssa> bbrezillon: Hay, sometimes you just need the fifth and sixth eyeball :)
<bbrezillon> alyssa: let's see if CI is happy now
<bbrezillon> yay! this is much better => https://gitlab.freedesktop.org/tomeu/mesa/-/jobs/571767
<tomeu> \o/
<tomeu> maybe that fixes some flip-flops
<bbrezillon> still have a few things to address apparently
<alyssa> a ver
<alyssa> I'm sorry to add more to the pile, but would it be possible to look into the right way of determining if depth writes should be enabled?
<alyssa> Forced flushes and depth writes are the only uses of that function, and your series wonderfully eliminates the former (!)
<alyssa> There's also something of an implied scanout check in `panfrost_resource_hint_layout`
<alyssa> I confess I don't understand bind flags well enough to know if that one is safe.
<alyssa> bbrezillon: Oh, nice, your series fixes four tests :D
<bbrezillon> alyssa: can I do that separately?
<bbrezillon> (the depth and scanout detection)
<alyssa> bbrezillon: Yeah, this is big enough as it is :)
<bbrezillon> need to fix the few failing tests (which work locally BTW)
<alyssa> Oh, that's good to know...
<alyssa> ^ That logic seems racy
<bbrezillon> you mean the 3 if()s?
<alyssa> Yeah, just trying to understand
<alyssa> Is the idea to never stall unless we're OOMing?
<bbrezillon> yes
<bbrezillon> actually no
<bbrezillon> the idea is to not wait on BOs if we don't have to
<bbrezillon> first try to get a BO from the cache, without waiting
<bbrezillon> if it fails, try to allocate a new one
<bbrezillon> and if the new allocation fails, try to get one from the cache, but this time wait
<alyssa> Sure, okay!
* alyssa has to run, but please do discuss in here and I'll try to give feedback time permitting! :)
davidlt has joined #panfrost
davidlt has quit [Ping timeout: 245 seconds]
guillaume_g has quit [Quit: Konversation terminated!]
guillaume_g has joined #panfrost
rcf has quit [Ping timeout: 245 seconds]
megi has quit [Ping timeout: 258 seconds]
<warpme_> alyssa: in my todo bookmarks I have https://rosenzweig.io/t760.patch . I want to play a bit with H6 t720. Is it worth to play with this patch or rather this is old thing and let’s forget it?
rcf has joined #panfrost
<alyssa> warpme_: I believe everything you need to get started is already in current git master :)
<alyssa> (That patch was pushed a while ago)
<warpme_> perfect
<warpme_> current master gives me black screen so probably we are not yet there :-p
rcf has quit [Client Quit]
rcf1 has joined #panfrost
rcf1 is now known as rcf
tgall_foo has quit [Read error: Connection reset by peer]
<alyssa> Oops
tgall_foo has joined #panfrost
davidlt has joined #panfrost
<tomeu> warpme_: I think we just regressed at some point
<tomeu> warpme_: I was planning to start with the simplest test case (kmscube?) and dump cmdstream traces from blob and panfrost to see what differs
<alyssa> tomeu: Better start with a job that does nothing but clear.
<alyssa> After that, one triangle.
* tomeu was assuming that somple clears do work
<alyssa> Though if you have traces on hoof from kmscube/etc, I can take a peak
raster has quit [Remote host closed the connection]
raster has joined #panfrost
<daniels> bbrezillon: 'not wait on BOs if we don't have to' - or not wait at all :P
raster has quit [Remote host closed the connection]
raster has joined #panfrost
<bbrezillon> daniels: well, not waiting at all would be better, but unfortunately tomeu's CI doesn't like it
<daniels> :D
<alyssa> :|
<alyssa> bbrezillon: Very much sounds like a bug masking another bug
<bbrezillon> alyssa: which one?
<alyssa> bbrezillon: "not waiting at all would be better, but unfortunately tomeu's CI doesn't like it"
<alyssa> It much sounds like something is borked deeper in the stack, and the extra wait there is just masking the problem
<bbrezillon> daniels is trolling because the 21FPS -> 25FPS improvement I was mentioning the other day actually became 25FPS -> 26FPS after fixing a few bugs
<bbrezillon> most of them relating to not waiting on BO readiness :)
<alyssa> bbrezillon: Woop.
<bbrezillon> and I guess the 21FPS was because I didn't use the performance governor when testing
<alyssa> I recall getting 23fps or so on -bterrain
raster- has joined #panfrost
raster has quit [Read error: Connection reset by peer]
raster- has quit [Remote host closed the connection]
raster has joined #panfrost
<bbrezillon> alyssa: with a release build?
<bbrezillon> and performance governor activated?
<tomeu> will be lots of fun to work on performance
<robmur01> robher, bbrezillon: you know the joke is that even "non-cacheable" is cacheable, right? ;)
<tomeu> here we were all, happily not thinking about caches...
afaerber has quit [Quit: Leaving]
megi has joined #panfrost
Lyude has quit [Read error: Connection reset by peer]
Lyude has joined #panfrost
griffinp has joined #panfrost
afaerber has joined #panfrost
rcf has quit [Ping timeout: 268 seconds]
rcf has joined #panfrost
rcf1 has joined #panfrost
guillaume_g has quit [Quit: Konversation terminated!]
warpme_ has quit [Quit: warpme_]
rcf has quit [Quit: WeeChat 2.1]
rcf1 is now known as rcf
rcf1 has joined #panfrost
warpme_ has joined #panfrost
davidlt has quit [Ping timeout: 258 seconds]
pH5 has quit [Quit: bye]
<bbrezillon> alyssa, daniels: do you want me to rename panfrost_job.c into panfrost_batch.c ?
<bbrezillon> (I'm respinning the s/job/batch/ series)
adjtm_ has joined #panfrost
<daniels> bbrezillon: no opinion; whatever you think is best
<bbrezillon> I'll keep job then
<daniels> it was more the principle of function naming - having panfrost_job_*() operate on struct panfrost_batch * was quite jarring
<bbrezillon> yes, I agree
guillaume_g has joined #panfrost
<bbrezillon> alyssa, tomeu: after debugging this, I can tell you one thing => using u_blitter for the wallpaper was not such a great idea
belgin has joined #panfrost
<alyssa> bbrezillon: Sure
<alyssa> And this is true
<alyssa> u_blitter is the bane of my existence
<bbrezillon> alyssa: I might change that at some point (forge the wallpaper FS manually)
pH5 has joined #panfrost
warpme_ has quit [Quit: warpme_]
warpme_ has joined #panfrost
yann has quit [Ping timeout: 245 seconds]
warpme_ has quit [Quit: warpme_]
davidlt has joined #panfrost
davidlt has quit [Ping timeout: 246 seconds]
jernej has quit [Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net]
jernej has joined #panfrost
raster has quit [Remote host closed the connection]
<alyssa> bbrezillon: That'd be great!
<alyssa> Also, while you're at it, give the same treatment to mipmaps
<alyssa> Mipmapping (generate_mipmap) is currently handled via u_blitter
warpme_ has joined #panfrost
<alyssa> Mathematically, mipmapping is doing a downscale with a bilinear filter
<alyssa> It's working always on powers-of-two, so essentially, you're taking 2x2 sets of pixels and averaging their colour values to get a single 1x1 pixel.
<alyssa> The upshot is that bilinear texture filtering does exactly that, given a suitable sampler.
<alyssa> Also, automipmap generation is loosely defined in the spec iirc so it just has to look right :p
<alyssa> So essentially the idea to mipmap a m-by-n texture is to render to an FBO of size (m/2)-by-(n/2)
yann has joined #panfrost
<alyssa> And the fragment shader is "just" sampling from the (m-by-n) texture with a linear MIN filter (the MAG filter is irrelevant, establishing so is left as an exercise to the reader)
<alyssa> This is a slightly different shader from the wallpaper shader -- wallpapers can use texelFetch() whereas mipmapping gets texture() -- but conceptully the same
<alyssa> So that's established with a TILER/FRAGMENT pair
belgin has quit [Quit: Leaving]
<alyssa> The other catch is that it's recursive, of course -- for mxn, you have l=log2(min(m, n)) levels (iirc), so you have l TILER and l FRAGMENT jobs
<alyssa> By constructing manually, however, we can do an optimization we can't with u_blitter: chain all of the TILER jobs together into a single job chain, and chaini all of the FRAGMENT josb together into a single job chain
<alyssa> Conceptually, TILER jobs do tiling which can be done in parallel for different render targets (with distinct tiler heaps and polygon lists for each render target). Whether that parallelism matters is debatable, but it is correct.
<alyssa> The FRAGMENT jobs, of course, have a strict in-order dependency of higher level rendering on lower levels (why?). You can enforce this by setting the job_barrier` flag in the job descriptor header.
stikonas has joined #panfrost
megi has quit [Quit: WeeChat 2.5]
davidlt has joined #panfrost
guillaume_g has quit [Quit: Konversation terminated!]
warpme_ has quit [Quit: warpme_]
warpme_ has joined #panfrost
warpme_ has quit [Quit: warpme_]
adjtm_ has quit [Ping timeout: 268 seconds]
warpme_ has joined #panfrost
megi has joined #panfrost
<alyssa> I see patches.
<alyssa> ....a *lot* of patches
<alyssa> 26 files changed, 1277 insertions(+), 1264 deletions(-)
<alyssa> bbrezillon: You've been busy!
<anarsoul> +13 lines net
<anarsoul> :)
<alyssa> Well, yes
<anarsoul> that's nice
<anarsoul> is it job dependencies patchset?
<alyssa> alyssa note to self: make TLS scratchpad CPU-invisible (?)
<alyssa> alyssa note to self: remove tiler_dummy
<xdarklight> "I'll let future alyssa deal with this." ;)
<xdarklight> and then in the future "damn you past alyssa"
<alyssa> xdarklight: Past Alyssa is kind of annoying
<alyssa> But whatever, I don't care about future Alyssa
<alyssa> ;)
<xdarklight> :)
<xdarklight> been there, done that myself
<alyssa> xdarklight: Would you like to write that patch? First contribution woot woot?
* alyssa would deal with it now but her dev machine is like a 5 minute walk away :p
<xdarklight> I have way too much on my own TODO-list
<alyssa> Aww
<xdarklight> still need to review some Amlogic and Intel SoC patches, then there's this board lying on my desk with serial TX soldered where I still have to figure out the boot selection pins to boot it via UART so I can then find out there the serial RX line goes
<alyssa> Wee
afaerber has quit [Quit: Leaving]
<xdarklight> enough rambling. this made me smile on Monday: https://patchwork.kernel.org/cover/11125309/
<alyssa> :ojos:
<alyssa> xdarklight: That's awesome (and insanely impressive)
<alyssa> Thank you for linking!
<alyssa> ("mesa driver for the PS2 GPU")
<alyssa> Do NOT tempt me I am very busy but.... ehhhhh... how hard could it be already wrote one driver.... ummmmm ;p
<alyssa> Lack of programmable fragment shaders dramatically limits usefulness
<alyssa> Neat fixed-function effects but... you'd have to start writing GL extensions
warpme_ has quit [Quit: warpme_]
<alyssa> Back to code review..
popolon has joined #panfrost
<popolon> hi again.
<popolon> magaglest works fine, just a little slow (some things are slow like selecting units, and select a place by right click is often on bottom of the screen, could be related to GL face detection)
<popolon> on RK3288.
<popolon> with last git version of panfrost.
adjtm_ has joined #panfrost
<popolon> extremetuxracer (command etr) has a some glitchs not so far from warzone2100, but seems to work fine.
<popolon> and I can't launch warzone2100, don't know why I changed, i have an error : [wzMainScreenSetup:1692] Can't create a window, because: Couldn't find matching GLX visual
<alyssa> bbrezillon: Reviewed the first half of the series, need to run but will get to the second half sometime later
afaerber has joined #panfrost
davidlt has quit [Ping timeout: 245 seconds]
pH5 has quit [Quit: -_-]
NeuroScr has joined #panfrost
<alyssa> The quality of my reviews is a highly nonlinear function of my sleepiness.
<HdkR> Just fall asleep at the desk like I do
<alyssa> note to alyssa: attach_vt_*fbd can be inlined in
stikonas has quit [Remote host closed the connection]
stikonas has joined #panfrost
krh has joined #panfrost