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
Cruft has joined #panfrost
<Cruft> Wow, Lenovo Duet packing a Mali-G72 MP3, May 6th~
<alyssa> Cruft: May 6th?!
<alyssa> I thought I had more time! :p
<anarsoul> Cruft: MediaTek Helio P60T? Is it even supported by upstream kernel?
<Cruft> No idea
<Cruft> Bestbuy, may 6th
<Cruft> If any sane keyboards existed i would pre-order
<Cruft> 1920x1200 <3
<alyssa> Cruft: thanks for posting that!
<Cruft> np
<alyssa> Cruft: I was rather hoping to have good Bifrost support in time for the Duet
<anarsoul> Cruft: egrep -Ri helio arch/arm64/boot/dts/mediatek yields nothing :(
<Cruft> wattttt. Need to check out chromiumos tree
<alyssa> anarsoul: try mt8183?
<Cruft> Bestbuy also did the samsung and the c101pa a few days before everyone else.
<anarsoul> alyssa: is it the same?
<alyssa> anarsoul: idk but I thought the Duet was mt8183 but I might be losing my marbl
<alyssa> at least https://patchwork.kernel.org/patch/11331381/ happened so there's *some* bifrost mt8183 thing :p
<anarsoul> I see
<alyssa> "Introducing the Lenovo IdeaPad Duet Chromebook powered by MediaTek Helio P60T | MT8183..." there you go :)
<HdkR> Oh? What's this then
<HdkR> Looks like a nice little Panfrost device
<HdkR> Nice 16:10 display even
stikonas has quit [Ping timeout: 265 seconds]
vstehle has quit [Ping timeout: 244 seconds]
robmur01 has quit [Ping timeout: 256 seconds]
<chewitt> this has signing instructions
<chewitt> has all the fip sources we've ever found for Amlogic boards, to do the signing with
<chewitt> so you don't need to do the README steps where you have to build vendor u-boot to create them
<chewitt> same sources used in the LE image that I linked
<chewitt> N2 has spi flash and Khadas have something called petitboot installed there to "help" boot, although I found it to be a PITA
<chewitt> s/Khadas/HK
<chewitt> AFAIK the mainline u-boot for Amlogic supports SPI boot, but I've never used it
<chewitt> Neil will know more details, but IMHO emmc install is easiest and works fine
warpme_ has quit [Quit: Connection closed for inactivity]
davidlt has joined #panfrost
Elpaulo1 has joined #panfrost
Elpaulo has quit [Ping timeout: 260 seconds]
Elpaulo1 is now known as Elpaulo
tomboy64 has quit [Remote host closed the connection]
tomboy64 has joined #panfrost
vstehle has joined #panfrost
tgall_foo has quit [Ping timeout: 256 seconds]
Green has quit [Quit: Green]
<tomeu> alyssa: what's the deal with sizzle members in the cmdstream on bifrost, btw?
yann|work has joined #panfrost
nlhowell has joined #panfrost
NeuroScr has quit [Quit: NeuroScr]
thefloweringash has quit [Quit: killed]
nhp[m] has quit [Quit: killed]
Ke has quit [Quit: killed]
NeuroScr has joined #panfrost
<tomeu> alyssa: chewitt narmstrong: btw, having the GPU permanently on via power/control makes it much more stable
<tomeu> I still see some faults that I don't see on the g31, but I think that could be due to differences in the cmdstream that we don't yet account for
<chewitt> tomeu: any extra kernel patches/tweaks you've done?
<chewitt> or still the same stuff in Neil's 5.8/bifrost branch?
<tomeu> no, just writing "on" to /sys/devices/platform/soc/ffe40000.gpu/power/runtime_status
<tomeu> yep
Cruft has quit [Quit: Leaving]
<chewitt> I'll have another go with bifrost support over the weekend
<chewitt> this week has been XU4 flavoured
thefloweringash has joined #panfrost
<tomeu> sorry, I meant above /sys/devices/platform/soc/ffe40000.gpu/power/control
warpme_ has joined #panfrost
yann|work is now known as yann
stikonas has joined #panfrost
Ke has joined #panfrost
nhp[m] has joined #panfrost
robmur01 has joined #panfrost
robmur01_ has joined #panfrost
robmur01_ has quit [Client Quit]
robmur01 has quit [Ping timeout: 260 seconds]
raster has joined #panfrost
icecream95 has quit [Ping timeout: 260 seconds]
robmur01 has joined #panfrost
kaspter has quit [Quit: kaspter]
austriancoder has quit [Quit: Connection closed for inactivity]
gcl_ has joined #panfrost
gcl has quit [Ping timeout: 256 seconds]
cwabbott_ has joined #panfrost
cwabbott has quit [Ping timeout: 272 seconds]
cwabbott_ is now known as cwabbott
gcl_ has quit [Ping timeout: 240 seconds]
gcl has joined #panfrost
tgall_foo has joined #panfrost
tgall_fo_ has joined #panfrost
tgall_foo has quit [Ping timeout: 260 seconds]
buzzmarshall has joined #panfrost
cwabbott has quit [Quit: cwabbott]
cwabbott has joined #panfrost
NeuroScr has quit [Quit: NeuroScr]
<alyssa> tomeu: G71 still had swizzles, later bifrost no
<alyssa> So now they're all forced to xyzw with missing components --> 0, and a flag you can set to force w -> 1
<alyssa> For textures, this is irrelevant since you can compose the swizzles and still fit
<alyssa> For attributes/varyings, it does mean some loss of freedom but very minimal. Probably good enough for GLES, probably not for a few desktop GL tests (like BGRA vertex which icecream just fixed on mdg)
tgall_fo_ is now known as tgall_foo
<tomeu> alyssa: and g31 is considered later than g71?
<alyssa> tomeu: Much later, yes.
<alyssa> G71 is first-bifrost
<alyssa> everything else is newer
<tomeu> alyssa: ok, so regarding swizzles, we can pass the ctx/dev to panfrost_get_default_swizzle and return depending on the GPU version
<tomeu> should those bits belong to the swizzle member?
<alyssa> tomeu: which bits?
<alyssa> 0x10 is the "w=1" bit which you'd set if there's no w channel to match OpenGL's behavior
<tomeu> alyssa: mali_attr_meta.unknown1
<tomeu> we need to not set it to 0x2 on bifrost
<alyssa> tomeu: Oh.
<alyssa> I don't know what that field is/does.
<alyssa> Honestly I'd just stick an (is_bifrost ? 0 : 2) in and call it a day at this point.
<tomeu> ack
<tomeu> and now we only have this one left:
<tomeu> if (rsrc->layout == MALI_TEXTURE_LINEAR) {
<tomeu> - rt->format.block = MALI_BLOCK_LINEAR;
<tomeu> + rt->format.block = MALI_BLOCK_TILED;
<tomeu> which I have no idea of how to tackle :)
<alyssa> Oof.
<tomeu> alyssa: you are not carrying any cmdstream hacks in any branches, right?
<alyssa> Uhh
<alyssa> tomeu: alyssa/mesa:conditionals is my latest stuff IIRC
<alyssa> though that's not pushd uh
<alyssa> just pushed what I have here
<tomeu> alyssa: ok, I think I already have all that
<alyssa> nice@
<tomeu> so wizzles I know already how to tackle, the block format thing no idea at all
<alyssa> tomeu: I would encourage looking into FBOs
<alyssa> which for the blob will mean AFBC or tiled
<tomeu> after that, I should probably look at how much of deqp we can run, because I'm starting to be afraid of breaking stuff
<alyssa> (For midgard blob if you make the framebuffer super tiny like 2x2, it'll do tiled over AFBC. I don't remember if Bifrost blob behaved like tha too.)
<tomeu> ok, what scene it was in glmark?
<alyssa> -bshadow and -brefract are the easy ones.
<alyssa> ./test-tex-fbo in freedreno is more comprehensive but that needs x11
<alyssa> I've been looking at sin/cos on Bifrost.
<alyssa> We have SIN_TABLE and COS_TABLE instructions which are used like:
<alyssa> sin(x) ~ SIN_TABLE( (2/pi)*x + 786432 )
<alyssa> cos(x) ~ COS_TABLE( (2/pi)*x + 786432 )
<alyssa> It's not clear to me what's special about 786432.0 yet
<alyssa> Of course, the precision of those tables is really bad
<alyssa> However, since those tables do have range [-1, 1] and sin/cos are nice enough functions, we can rigorously say that there exists some δ such that
<alyssa> sin(x + δ) = SIN_TABLE( (2/pi)*x + 786432 )
mixfix41 has joined #panfrost
<alyssa> and likewise for cos. We'll be a little handwavy and suppose it's the same δ
<alyssa> Even though the tables are pretty low precision, they are close enough that δ is small. I won't make this rigorous yet but conceptually it has to be true if the tables are of any use at all.
<alyssa> (Sorry for redefining δ somewhat here but illustrative, this is not a proof :P) -- The trick is to construct a Taylor series of sin around x.
<alyssa> sin(x + δ) = \sum_{i = 0}^{\infty} (sin^(i) (x) / (i!)) ((x + δ) - x)^i
<alyssa> and since sin' = cos and cos' = -sin, we can expand and simplify a bit to
<alyssa> sin(x + δ) = sin(x) + δ cos(x) - (1/2) δ^2 sin(x) + O(n^3)
<alyssa> (This should all be review from first-year calculus..)
<alyssa> In particular, for δ sufficiently small we have:
<alyssa> sin(x + δ) ~ sin(x) + δ cos(x) - (1/2) δ^2 sin(x)
<alyssa> So that motivates Bifrost's solution: if we would like to calculate sin(y), we first calculate:
adjtm has quit [Remote host closed the connection]
<alyssa> sin(x) = SIN_TABLE( (2/pi)*y + 786432 )
<alyssa> cos(x) = COS_TABLE( (2/pi)*y + 786432 )
adjtm has joined #panfrost
<alyssa> where y = x + δ
<alyssa> and then
<alyssa> sin(y) = sin(x + δ) ~ sin(x) + δ cos(x) - (1/2) δ^2 sin(x)
<alyssa> So all that's left is estimating δ, which is admittedly tricky without knowing how the tables behave
<alyssa> but as a spoiler the blob computes
<alyssa> δ = y - (pi/2) * (2/pi) * y
<alyssa> (Over R, obviously the factors cancel and we get δ = y - y = 0. Over floating-points, since both pi/2 and 2/pi are approximated anyway, (pi/2)*(2/pi) is close-but-not-exactly 1, so δ is some small nonzero estimate.)
<alyssa> and that's it :)
la-s has joined #panfrost
austriancoder has joined #panfrost
<raster> does anyone else here have a working panfrost + a wl compositor working they can try something for me?
<robmur01> raster: I have gdm up on my RK3399, if that counts
<raster> hmmm
<raster> a wl compositor after that?
<raster> to log into... ?
<raster> can you try that with
<raster> ./earlyz-bug
<raster> and
<raster> GLFINISH=1 ./earlyz-bug
<raster> ?
<raster> (usual meson build setup)
<Lyude> alyssa: how far do you guys think you are so far w/ Bifrost bring up?
<robmur01> raster: with GLFINISH=1, the entire background is grey (i.e. the blue outer cube is missing)
<alyssa> Lyude: Still early.
<Lyude> Cool :3
<alyssa> We have a chunk of glmark working but nothing 'real' yet. But things are progressing very quickly :)
<raster> robmur01: ha! so you see the same glfinish bug!
<raster> glfinish() is borked in panfrost... confirmed :)
<Lyude> good timing for me to be working on getting my systems setup then. Hoping to do that today
<alyssa> woo!
<alyssa> raster: uh oh
cwabbott has quit [Quit: cwabbott]
cwabbott has joined #panfrost
<robmur01> (FWIW this is mesa master as of Tuesday, according to the commit ID)
<raster> alyssa: do you see the same issue?
* alyssa has X open rn
<raster> robmur01: ok. so it's not my slightly older mesa and kernel
<raster> alyssa: if you get the time - just confirm u see it or not
<alyssa> ok
<raster> i justw ant to know if its pretty much universal ... or specific to some systems
<raster> so far 100% bug hit rate
<raster> i dont know what magic i did to get glfinish to break... but i did it :)
<robmur01> I might try giving the RK3288 box a poke later to see if I can confirm on T760 as well
<alyssa> is glFinish even in gles2?
<HdkR> Yes
<alyssa> Hrm.
<alyssa> [200~dEQP-GLES[0-9]*.functional.flush_finish.*
<alyssa> ^ that's in our CI skip list. so no wonder.
<raster> aky yes
<raster> alyssa: yes
<raster> oooh
<raster> hahaha
<raster> CI doesnt test it
<raster> well then
<alyssa> (everyone's CI skip list. slow on tilers.)
<raster> call me Mr. CI :)
* robmur01 is curious, likes API references, finds http://docs.gl/, is pleased :)
adjtm has quit [Remote host closed the connection]
adjtm has joined #panfrost
adjtm has quit [Remote host closed the connection]
adjtm has joined #panfrost
robmur01 has quit [Ping timeout: 260 seconds]
karolherbst has quit [Quit: duh 🐧]
alyssa has quit [Remote host closed the connection]
robmur01 has joined #panfrost
alyssa has joined #panfrost
raster- has joined #panfrost
karolherbst has joined #panfrost
jolan has quit [Quit: leaving]
jolan has joined #panfrost
raster has quit [Remote host closed the connection]
raster- has quit [Quit: Gettin' stinky!]
raster has joined #panfrost
paulk-leonov has quit [Ping timeout: 244 seconds]
karolherbst has quit [Quit: duh 🐧]
davidlt has quit [Ping timeout: 256 seconds]
karolherbst has joined #panfrost
karolherbst has quit [Quit: duh 🐧]
Green has joined #panfrost
karolherbst has joined #panfrost
paulk-leonov has joined #panfrost
robmur01 has quit [Ping timeout: 260 seconds]
paulk-leonov has quit [Excess Flood]
gcl has quit [Ping timeout: 260 seconds]
gcl has joined #panfrost
gcl has quit [Remote host closed the connection]
gcl has joined #panfrost
paulk-leonov has joined #panfrost
<alyssa> note: wrap modes seem wrong
urjaman has quit [*.net *.split]
AreaScout_ has quit [*.net *.split]
mani_s has quit [*.net *.split]
Marex has quit [*.net *.split]
forkbomb has quit [*.net *.split]
forkbomb has joined #panfrost
mani_s has joined #panfrost
AreaScout_ has joined #panfrost
icecream95 has joined #panfrost
cwabbott has quit [Quit: cwabbott]
cwabbott has joined #panfrost
urjaman has joined #panfrost
Marex has joined #panfrost
<icecream95> The glFinish bug is in my Mesa builds from September, so this isn't a recent regression
<icecream95> I wonder if bbrezillon:panfrost-zs-reload fixes it
<alyssa> icecream95: possibly, but IIRC that code is not really in mergeable state rn
<alyssa> colorMap is reading back all wonky, cmdstream texture bug I guess
stikonas_ has joined #panfrost
stikonas has quit [Ping timeout: 252 seconds]
gcl_ has joined #panfrost
gcl has quit [Ping timeout: 246 seconds]
<alyssa> yeah, finnicky detail about strides of tiled textures
kinkinkijkin has joined #panfrost
<icecream95> Using that branch somewhat fixes it: https://gitlab.freedesktop.org/snippets/978
<alyssa> icecream95: faulting, I see