01:00 makinbacon21: re: gsp being a hw decision, wouldn't that mean that orin would support it? given it's an ampere die?
01:04 makinbacon21: we don't have "gsp.bin" per se but we have three acr-gsp bins, not sure exactly what can be used there or what format you get.
02:44 balisj: hi everyone
02:45 balisj: I'm curious if there is a roadmap to having cuda equivalent support for parallel programs with Noveau
02:46 balisj: and if this seems unrealistic, I'm interested to hear why
03:37 fdobridge: <a​irlied> An actual ampere die? Or a die with ampere compute cores? But acr-gsp bins might be meaningful
03:40 fdobridge: <a​irlied> Roadmap is currently unrealistic, implementing cuda also so, but maybe some other paths
03:56 pabs: the person asking about cuda left after an hour, so missed your answer
04:47 fdobridge: <a​irlied> doh can't see on discord 😛
06:04 fdobridge: <2​46tnt> `RUSTICL_ENABLE=nouveau` ? 😅 I'm not sure what it takes for a driver to support that TBH.
08:34 airlied: TimurTabi: I left a comment on the github repo, hopefully you can see it
13:24 TimurTabi: airlied: I think it got cut off, so I'm still a little confused. My concern is that I don't want a link between Nouveau and the proprietary driver. You wouldn't install both drivers anyway, and even if you did, it's highly unlikely that you would install the exact same version of both.
13:25 TimurTabi: The proprietary driver is always going to be more recent than what Nouveau uses.
14:31 makinbacon21: airlied (dont know how to ping on here) jetson orin (t23x) is an actual ampere die, ga10b, and yea we have 3 acr-gsp bins (different mem regions)
14:32 makinbacon21: i dont think it's just compute cores
14:36 makinbacon21: but re: the driver stuff, my understanding is that the way tegra drm works, you need both a drm-compatible framebuffer from whatever inits the dc (previously the tegradrm driver) and a render node from nouveau, and the two don't interact until mesa connects them (as per thierry's commit here: https://gitlab.freedesktop.org/mesa/mesa/-/commit/1755f608f5201e0a23f00cc3ea1b01edd07eb6ef)
14:37 makinbacon21: that would imply that with some modification, one could use the already existent nvidia-drm driver as that framebuffer and dc init, and would not need to interact with nouveau at all
14:37 makinbacon21: edit: and nouveau itself would not need to interact with the proprietary driver at all
14:38 makinbacon21: tho fwiw, it looks a bit like a fully oss tegradrm-like driver for t234+ is coming anyway if thierry's github is anything to go by
14:40 makinbacon21: (https://github.com/thierryreding/linux/commit/686ad38ff65bc1fae57c97c8440d44838dceeb93)
17:56 airlied: TimurTabi: no it doesnt need the other driver and i picked paths to avoid conflicts with where the binary installs put things
17:57 airlied: TimurTabi: you will always instsll linux firmware
17:57 TimurTabi: airlied: I still don't understand what's wrong with the current paths
17:58 airlied: i just prefer to keep nvidia names for the files
17:58 airlied: and link to them
17:58 TimurTabi: Ah
17:58 airlied: makes it easier to see at a glance how many gsp vers we have
17:58 airlied: also
17:59 TimurTabi: So /lib/firmware/nvidia/tu102/gsp/ will contain the file gsp_tu10x.bin and the symlink gsp-535.54.03.bin -> gsp_tu10x.bin ?
18:00 airlied: no id put the files somewhere separate
18:00 TimurTabi: I'm not sure I see the value of that.
18:01 airlied: i can look in lib/firmware/nvidia/gsp/
18:01 airlied: and see every version we used in one place
18:02 airlied: instead of having to dig into subdirs
18:03 airlied: makes it easier to audit that we dont screw up
18:03 TimurTabi: Do you want that scheme for just gsp.bin or all the other firmware files?
18:03 airlied: i think just gsp.bin
18:04 TimurTabi: well, okay. I understand know what you're asking for, but I don't think it's an improvement, personally.
18:04 airlied: the other files are pretty chipset specific
18:05 airlied: do you not think it makes it easier to see what we are using? esp as we start using more bin files
18:06 airlied: like now with one fw its not bad
18:06 airlied: but that probably wont stay that way for too long
18:06 TimurTabi: I don't think it's important enough to warrant two different paths for the same group of files.
18:07 airlied: i also like to keep the original names, as i guess those may change over time
18:10 airlied: do you have a script to generate those links now?
18:10 airlied: for gspmbin
18:10 TimurTabi: Yes, it's in the WHENCE file
18:10 airlied: gsp.bin
18:12 TimurTabi: I don't have a script like extract-firmware-nouveau.py for gsp.bin, if that's what you're asking. I do the moves manually.
18:14 airlied: hmm i suppose its hard to write a future proof script since the tu vs ga decision is in driver code
18:14 TimurTabi: and it will change
18:16 airlied: like i did a trial update to try latest 535 fw and its non trivial effort :-)
18:17 karolherbst: airlied: what's the status of the kernel module loading stuff btw?
18:18 airlied: karolherbst: the fw loading?
18:18 karolherbst: yeah
18:19 airlied: need to go and track down where my last idea derailed
18:19 airlied: someone wanted versions in fw names
18:20 airlied: to be meaningful
18:20 airlied: when they are anything but
18:20 karolherbst: ehh
18:20 TimurTabi: what's wrong with versions in filenames?
18:21 airlied: just that nobody can agree on them
18:21 karolherbst: I think the problem is rather, that version in filenames might not be in linear order (and syntax)
18:21 airlied: where to put them, how to order them
18:21 karolherbst: just do semantic versioning, everything is wrong :P
18:21 karolherbst: end of discussion
18:22 karolherbst: at least I would ask if we could agree on semantic versioning, and if not, then we agree on nothing in regards to versioning. It's really pointless to have a rando discussion there
18:22 airlied: it wasnt agreeing on versioning
18:23 airlied: it was deciding if we could evem use it
18:23 TimurTabi: $ strings gsp_tu10x.bin | grep 535.86.05
18:23 TimurTabi: Driver Version: 535.86.05
18:23 karolherbst: yeah.. I doubt we could
18:23 TimurTabi: In theory, we could just extract the version from the binary itself.
18:23 karolherbst: we can't
18:23 karolherbst: well.. we can use it to rename the file/symlink
18:23 airlied: this problem space is for the whole kernel
18:24 karolherbst: but we can't use it for loading
18:24 airlied: not just nouveau
18:24 karolherbst: it's pointless to have it inside the binary anyway
18:24 airlied: and some fw version strings are very inventive
18:24 karolherbst: we could however verify in nouveau if the file name matches the binaries version
18:25 airlied: karolherbst: if we had major vers abi stability it would be useful
18:25 airlied: but we dont
18:25 karolherbst: mhhh... yeah, fair enough
18:26 TimurTabi: Well, I'm not a fan of complicating the directory structure just so that we can keep the gsp_tu10x.bin filename. I don't see anything wrong with renaming the gsp.bin file to something that Nouveau expects, and I don't see any problem with having to do "find /lib/firmware/nvidia -name gsp*.bin" to find all the binaries.
18:28 airlied: i would ideslly like to audit things against run files in the future to make sure we actuslly have what nvidi releaes
18:29 karolherbst: but for that it doesn't matter if the version is in the path or in the file name, does it?
18:29 airlied: it saves parsing whence
18:29 airlied: to work out tu10x vs ga10x
18:30 airlied: like we rename both nvidia files to gsp-vers.bin and bury them in a symlink foresy
18:31 karolherbst: we could also change what nouveau expects
18:31 airlied: and WHENCE is only source of truth
18:32 karolherbst: but we already have the problem with e.g. tu116 vs tu106, those could also become different firmware files, or such a case might arise in the future, where we kinda have to parse it anyway
18:32 TimurTabi: The problem is that "gsp_ga10x.bin" is not necessarily only for GA10x. In fact, there was a time (internally, at Nvidia) that gsp_tu10x was for Hopper.
18:32 karolherbst: right, but we already have this problem within a generation
18:33 karolherbst: we have to know if a generation has its own file or shares one with another, regardless of the architevture
18:33 TimurTabi: So the actual filename that Nvidia provides is not as meaningful as it sounds. The actual difference between gsp_tu10x.bin and gsp_ga10x.bin is the libos version embedded in the bin that bootstraps GSP-RM.
18:34 karolherbst: yeah.. we shouldn't focus on the "tu" vs "ga" bit, that's entirely arbitrary
18:34 airlied: its also something we can revisit later
18:34 airlied: by adding symlinks
18:35 airlied: but the process to add a new fw is non trivial and I felt it made it easier
18:36 karolherbst: yeah.... I _think_ with gsp it makes sense to just move to a `nvidia/$version/$chipset` structure (also on the nouveau side), because that's kinda mapping to the hierachy quite nicely
18:36 TimurTabi: I think a bigger problem is that the WHENCE file contains the version number for all the filenames, so when I eventually have to push a new version of GSP-RM to linux-firmware, it'll be a mess.
18:36 karolherbst: why?
18:37 karolherbst: or rather
18:37 karolherbst: why would it change?
18:37 karolherbst: we have to add all entries anyway
18:37 airlied: yeah whence is additive
18:37 TimurTabi: Do we expect to keep old and new versions of gsp-rm in linux-firmware at the same time?
18:37 karolherbst: yes
18:37 karolherbst: we have to keep them all
18:37 airlied: yes we have to, forever
18:37 karolherbst: like _all_
18:37 TimurTabi: So will WHENCE install all versions or just the newest?
18:37 karolherbst: why do you think that the file size is such a pita
18:37 karolherbst: all
18:38 TimurTabi: I was hoping it would just be the newest.
18:38 karolherbst: nope
18:38 airlied: nope all
18:38 karolherbst: and newer kernels also have to support loading old firmware
18:38 karolherbst: because $regressions
18:38 karolherbst: we can't require changes to userspace when updating the kenrel
18:38 karolherbst: it has to still work
18:38 TimurTabi: So 5 years from now, when there are 3 versions of GSP-RM, WHENCE will install 180MB of images, of which only 60MB will actually be used?
18:39 karolherbst: yes
18:39 TimurTabi: That seems silly.
18:39 karolherbst: it's not silly :P
18:39 karolherbst: there is a reason for it
18:39 airlied: but which 60MB
18:39 karolherbst: and the reason is: we don't regress userspace
18:39 karolherbst: there are some ideas on how to decrease the cost of initramfs file generation
18:39 airlied: new kernels cant require new fws
18:40 karolherbst: but in the firmware repository (and the users system) we kinda have to keep them all
18:40 airlied: for exisitng he
18:40 airlied: hw
18:40 airlied: distros could in theory cull old ones
18:40 karolherbst: yeah...
18:40 karolherbst: distributions are free to do whatever they want here
18:40 airlied: but linux firmware cant
18:40 karolherbst: but it's helpful if you have to boot older kernels
18:40 karolherbst: e.g. for a `git bisect`
18:41 TimurTabi: I suppose.
18:41 TimurTabi: Well, I need to get lunch. I'll be back.
18:41 airlied: TimurTabi: thats why i want a toplevel :-)
18:42 airlied: and simpler audit tra
18:42 airlied: tra
18:42 airlied: trail
18:42 karolherbst: yeah.. I think personally we want somethign like nvidia/r535/tu10x_gsp.bin and then a bunch of symlinks to it
18:42 karolherbst: uhm..
18:43 karolherbst: *nvidia/gsp/r535/tu10x_gsp.bin
18:43 karolherbst: and then an update just adds another directory
18:43 airlied: yeah i was suggesting nvidia/gsp/535.54.08/
18:44 airlied: since nvidia/535.54.08 is where the nvidia packaging puts em and i dont want to conflict
18:44 karolherbst: mhhh
18:45 karolherbst: that won't be confusing at all, but uhhh
18:45 karolherbst: can we ask nvidia to not install into /lib/firmware? :D
18:53 airlied: karolherbst: we could, but they've got a bunch of run files doing it already that won't change
18:54 karolherbst: pain
19:09 airlied: TimurTabi: I also see a thing called CrashCat in the newest openrm, is that new logging?
19:10 TimurTabi: Yes it is
19:35 TimurTabi: On a side note, do we care that Ben's GSP-RM code only works on little-endian platforms?
19:36 fdobridge: <a​irlied> probably not, I don't think nvidia supports any big-endian platforms anyways
19:36 TimurTabi: I think it would be cool if Nouveau worked on big-endian PPC systems
19:44 TimurTabi: There is some endian-aware code:
19:44 TimurTabi: + u32 rate = (le16_to_cpu(rates[i]) * 200) / 10;
19:57 airlied: I don't think any big-endian PPC systems really exist since nv40 times
19:58 airlied: TimurTabi: yeah we cared back in the nv40 days
19:58 airlied: and some code probably does do the correct wrappers, but it's not a major concern anyomre
19:59 TimurTabi: I wonder why we don't have "depends on LITTLE_ENDIAN" in the Kconfig
19:59 airlied: just because it used to work on nv40
19:59 airlied: and probably still does
20:01 airlied: I tried getting 535.104.05 to boot, doesn't get past booter-loader
20:03 airlied: but I noticed in the traces the dmem setup is quite different
20:03 airlied: https://paste.centos.org/view/raw/e7e3a206 is the working 535
20:03 airlied: https://paste.centos.org/view/raw/33bb0975 is updated
20:03 airlied: note dmem ranges 5d00 and above are empty in the second
20:04 airlied: not sure if that is the problem, I'll trace openrm load
20:10 TimurTabi: If you apply my debug patch and send me the contents of loginit and logrm, I can see if something comes up. It's on my to-do list, but it'll be a while before I get to it.
20:39 airlied: TimurTabi: I don't even get past booter-load, not sure I've even setup loginit
20:40 airlied: probably have though, will see how I go
20:41 TimurTabi: Can you try booter from 535.54.03 with gsp-rm from 535.104.05? That should actually work.
20:41 TimurTabi: or booter-load or whatever
20:55 airlied: ah that dies as well, with a different mbox code, I'll try and get more out of it later
21:39 TimurTabi: ok, I'm almost done reviewing the 44 patches. I'll debug this issue tomorrow.
21:41 karolherbst: big endian is kinda best effort...
21:41 karolherbst: but besides that I don't think it's even worth caring
21:42 karolherbst: mesa is a dumpster fire on big-endian anyway
21:42 karolherbst: it kinda works, but a lot of the format handling is just wrong
21:42 karolherbst: kinda works as long as you only do plain rgba
21:43 karolherbst: we can make it work, but that requires somebody with a loooot of time to look at the big endian handling in mesa and do it from scratch
21:43 TimurTabi: I feel sad for my former PowerPC brothers.
21:44 karolherbst: yeah.. but there aren't enough people to care and make it works
21:44 karolherbst: mesa's BE support is basically "make gnome run somehow"
21:44 karolherbst: and mostly for s390x
21:44 karolherbst: and only CPU
21:45 karolherbst: if somebody cares to fix it all, be our guest
21:46 karolherbst: mesa's BE support is basically on a "we just reverse the channel order" level, and as you might have guessed, it's broken for packed formats and other funky bits
22:01 RSpliet: AFAIK you can also run a PowerPC processor in little-endian mode. There is no reason to suffer https://catfox.life/2018/11/03/clearing-confusion-regarding-modern-powerpc-endianness/
22:03 RSpliet: actually, a closer-to-the-source source: https://www.ibm.com/support/pages/just-faqs-about-little-endian
22:14 fdobridge: <m​ohamexiety> PPC + NV was interesting given iirc Pascal + Power9 was the first uniform memory system combo?
22:14 fdobridge: <m​ohamexiety> but I may be really badly misremembering things
22:14 fdobridge: <m​ohamexiety> I know it was Power9 and _something_... either Volta or Pascal. then nothing until Hopper reintroduced it
22:23 airlied: there are certain OpenGL things that are really hard to do in BE as well
22:23 airlied: like qbos
22:23 airlied: unless you fix the apps and cts etc