ChanServ changed the topic of #panfrost to: Panfrost - FLOSS Mali Midgard & Bifrost - Logs https://oftc.irclog.whitequark.org/panfrost - <macc24> i have been here before it was popular
rasterman has joined #panfrost
<tomeu>
icecream95, alyssa: btw, the infra for measuring perf changes in panfrost is there, but to make it useful we need to fix/implement timestamp queries and add the traces we care about
<robmur01>
meh, still waiting for RK3588 in Q4 2020
<HdkR>
It's the SoC filled with sadness
<HdkR>
Might as well a yeet it and start a new one :)
<macc24>
i'm fairly certain yeeting wont bring any soc here
<macc24>
oh you meant throwing
<robmur01>
HdkR: well, they already put a new GPU in it during the first delay
<HdkR>
NATTv2 - I promise it has less bugs
<macc24>
can i PLEASE have a chromebook chip with a mali gpu that is NOT buggy
<robmur01>
T860's pretty bug-free, isn't it?
<macc24>
is being slower than llvmpipe on some machines a bug?
<HdkR>
Some call it a feature
<macc24>
and to those people we say '/kick'
<robmur01>
OK, so it looks like drm_gem_cma_mmap() is my not-setting-the-vma-flags culprit, now where in the conspicuous lack of grep results might that be getting assigned...
<robmur01>
oh wait no there it is
<alyssa>
robmur01: but it just defers to the device mmap()
<alyssa>
based on get_dma_ops
<alyssa>
so the bug depends on the dma ops in questions, I guess
<robmur01>
nah, it's not the DMA API's job to mess with vma flags
<alyssa>
robmur01: danvet seems to suggest otheriwse, see parallel discussion in #dri-devel..?
* robmur01
has vscode chugging away on a "find all references" to see how commonly gem_obj->funcs are overridden
<macc24>
>vscode
<macc24>
eww
<robmur01>
well even if I could run the Eclipse CDT I think it would probably set the SPX on fire
<macc24>
why not vim
<HdkR>
neovim needs to support popups, vim is too slow to use D:
<robmur01>
because vim is an editor, not an IDE
<robmur01>
ctags, global, etc. can't do a context-sensitive search of structure member references, as far as I've found
<robmur01>
I can *write* code in anything, but *navigating* a large codebase effectively is the reason I grew to tolerate a giant wheezing IDE eating 12GB of RAM
<robmur01>
(but also it's what drives the debug probe)
<macc24>
have i been programming wrong my entire life
<alyssa>
robmur01: I don't think I appreciated what a large codebase was before
<alyssa>
Mesa is small, for all intents and purposes. It's millions of LOC but I can keep the whole thing in my head.
<alyssa>
Linux ... is not.
<HdkR>
Linux is more something you want to keep OUT of your head
<alyssa>
haha
<alyssa>
oh that was serious.
<macc24>
uh, every time i tinkererd around linux kernel code i was using just plain vim
<robmur01>
macc24: no, you do you; I just happen to have the visual kind of mind that gets on best with GUIs and IDEs
<robmur01>
I'm less fond of command lines for the same reason I wasn't good at organic chemistry - you just have to know and remember everything, there's no cues
<macc24>
organic chemistry actually has quite some clues
<macc24>
some of the time you can tell what molecule is doing in someone's body based on its shape
<macc24>
for example most of drugs resemble serotonin or dopamin structure somewhat closely
<robmur01>
sure, like it's obvious what the difference between an alkane and an alkene is from the name alone :P
<macc24>
every C - C bond in alkane shares one electron, iirc in alkene there is one bond that shares both and that C atom has no H atom bonded to it
<robmur01>
...and the key point there being the "IIRC" part ;)
<macc24>
last time i did some actual chemistry talk was few years ago
<robclark>
robmur01: eclipse CTD can do kernel.. but re-indexing after rebasing == time for a coffee break.. but cdt has by far the best code navigation compared to vscode
<macc24>
robmur01: my point still stands, if you look at a molecule and it looks like serotonin it probably does stuff that serotonin would
<alyssa>
i am enjoying this conversation 🍿
<macc24>
wtf, according to some cadmium user, 4k youtube is watchable on duet
<robmur01>
robclark: right, I had a carefully tweaked kernel indexing setup which even had ARCH and stuff plumbed in, but I'm still waiting for AArch64 ports of Arm Development Studio :(
<alyssa>
IDK
<macc24>
robmur01: run arm development studio on fex B-)
<alyssa>
nothing but vim and the command line is totally usable for mesa dev, and even was when I was a mesa noob
<robclark>
I suppose I don't have any aarch64 system with enough RAM to have that problem.. I'll put up with vscode for on-aarch64 work since it's requirements are a bit more reasonable
<alyssa>
linux demands.. more of my software.
<alyssa>
robclark: 8GB m1 on my desk 😎
<HdkR>
robmur01: Gimme a license to DS-5 and I'll test it under FEX ;)
<macc24>
alyssa: there will be 8GB chromebook at some unspecified point of time on my desk B-)
<robclark>
for eclipse on kernel tree you probably want more than 8GB
<robclark>
(there are multiple 8GB chromebooks on my desk)
<alyssa>
yeah, fair
<alyssa>
I have used 4GB machines for so long, I don't know what to *do* with the extra RAM
<macc24>
alyssa: you know what you can do with extra ram? show other people how much you have
<alyssa>
macc24: oh, I should've bought the 16GB model for that then
<alyssa>
"this mac mini has as much RAM as my old chromebook had eMMC"
<macc24>
alyssa: i have a machine with 32gb of emmc, and i ended up buying a 128gb microsd card because i filled that in a week ,_,
camus has quit [Read error: Connection reset by peer]
nlhowell has quit [Remote host closed the connection]
nlhowell has joined #panfrost
chewitt has joined #panfrost
macc24 has quit [Ping timeout: 480 seconds]
<alyssa>
bbrezillon: "TIL. I'll add that debug flag from now on."
<alyssa>
FWIW it's new as of ~May this year
<alyssa>
Added as part of the push for more stable panfrost CI
<alyssa>
(Faults lead to flakes. Crashes are unconditional fails.)
nlhowell has quit [Ping timeout: 480 seconds]
chewitt has quit [Remote host closed the connection]
nlhowell has joined #panfrost
nlhowell has quit [Ping timeout: 480 seconds]
<alyssa>
stepri01: Also, what happens if you try to use panfrost (or kbase) on a kernel with 16k/64k CPU pages?
<alyssa>
we hardcode PAGE_SIZE a bunch...
* robmur01
kicks off a 64K kernel build...
<robmur01>
be thankful that my big-endian userspace is only busybox and I can't be bothered trying to cross-compile mesa :P
<HdkR>
That reminds me, I should throw a warning when running on !4K page size configurations
<alyssa>
HdkR: or you could fix !4k page size configs
<alyssa>
stepri01: I think the bug you raised on the ML might be impossible to hit. hm
<HdkR>
alyssa: I think some x86 software would non-gracefully implode when forced to use 16k pages :P
<alyssa>
Hmm
<alyssa>
:P
<HdkR>
Actually, I encountered a game yesterday that definitely would
<alyssa>
HdkR: M1 non-gracefully implodes when forced to use 4k pages
<alyssa>
Wonder what awful hack Rosetta has
<HdkR>
I thought M1 only fails to support 4k pages on IOMMU pages, while regularly mapped memory supports 4k?
<alyssa>
Yeah, but presumably XNU is 16k pages
<robmur01>
AIUI, the "awful hack" probably *is* the 4K page support bolted on to the CPUs
<alyssa>
Fair
<HdkR>
Yea, not like io pages are exposed to userspace frequently for them to tinker with :P
<robmur01>
what you want is an OS which uses 4K pages but still manages VA space at 64KB granularity for a mess of legacy reason :P
<HdkR>
Usually guarded by driver stacks that say your openGL buffers need to be aligned, and also breaking API if you mprotect a range...
<HdkR>
yes please
<HdkR>
Give me the Windows nightmare :D
<alyssa>
I don't know what result I was hoping for.
nlhowell has joined #panfrost
<alyssa>
I was doing out a page of algebra to see if a bug is possible to hit or not
<alyssa>
It looks like I was able to find a condition that does let it be hit. Uhm. Guess I'm sending an extra patch to the ML
<alyssa>
Oh. But we never actually call this with non page aligned stuff.
warpme_ has quit [Quit: Connection closed for inactivity]
macc24 has joined #panfrost
<robmur01>
looks like it essentially wants "size = DIV_ROUND_UP(size, PAGE_SIZE);" and save all the fannying about with shifts
<robmur01>
and then replace PAGE_MASK and PAGE_SIZE with more appropriate values, of course ;)
<robmur01>
hmm, isn't the magic "10" in the region_width calculation already trying to impose a minimum granularity?
<alyssa>
I mean, we specify in bytes, not in pages
<alyssa>
just log2 bytes with a minimum value that's not even the page size on birost
<robmur01>
but the rounded-up size is never used in its own right, only size >> PAGE_SHIFT
* robmur01
goes off to double-check the register format
<alyssa>
robmur01: Are you looking at main or the patches I sent?
<robmur01>
both
<alyssa>
why is git commiting as a@r.io but signing off as a.r@c.com
<robmur01>
Seems like basically "region_width = max(fls(size - 1) - 12, is_bifrost? 14: 11)" should do for the whole lot (modulo off-by-ones)
<robmur01>
pre-rounding seems pointless
<alyssa>
uhm, - 1 not - 12
<alyssa>
preclamping vs postclamping i guess is a matter of taste
<alyssa>
the ML amounts to `region_width = fls(max(size, 2^14) - 1) - 1`, your suggestion amounts to `region_width = max(fls(size - 1) - 1, 14)`, it's identical number of LOC / machine instructions / etc
<alyssa>
my preference is clamping before instead of after because it expresses the invariant on the *data*, the minimum of 32k bytes locked
<alyssa>
whereas clamping after merely expresses an invariant on the encoding
<alyssa>
anyway, this is orthogonal to the issue stepri01 raised which is solved with a simple `size += (region - iova)` at the start
<alyssa>
robmur01: planing to send off v2 unless you object. really not used to having to throttle code 🤔
<robmur01>
welp, 64K pages apparently broke efifb and killed the console during boot; kmscube ran, but stuttering at 10fps; glmark2 appears to have killed the machine to "capslock LED no longer responds" level
<alyssa>
nice!
nlhowell has quit [Read error: Connection reset by peer]
<macc24>
robmur01: 64k pages?
<macc24>
also
<macc24>
>efi on arm
<robmur01>
(annoyingly I don't have serial because I don't have anything with actual RS232 here to plug into Juno)
<robmur01>
((which is technically a lie because I found my Amstrad NC100 recently, but I still don't have a cable, and an 8-line console at 9600 baud wouldn't be much fun))
<alyssa>
Woof
<alyssa>
so... send v2 then?
<macc24>
alyssa: v2 of what
<alyssa>
obscure kenrel bug fixes
<macc24>
robmur01: if you have a x86 computer there most likely is a way to hook up rs232 to tit
<robmur01>
nah, feel free to go ahead with v2, I can perform any further whingeing on the list properly :)