00:23 skeggsb9778[d]: I did a bit last week, but it works for me 😛 I have one more system I can try on, but I hit another bug there which I haven't solved yet
01:12 kuter7639[d]: Probably not very useful for nouveau at this point but here is 4090 ISA https://kuterdinel.com/nv_isa_sm89/
01:12 kuter7639[d]: some weird surface instructions are missing
01:22 HdkR: kuter7639[d]: Where's the ray tracing instructions :P
01:24 kuter7639[d]: HdkR: If you send me some binaries with those instructions used I will add them. I mutate instructions from libcublasLt + enumerate opcodes but that doesn't work all the time
01:25 HdkR: I see
01:26 kuter7639[d]: sometimes you need some bits set (like modifiers and flags) for the instruction to decode. which increases the search space significantly
01:27 mhenning[d]: kuter7639[d]: That probably will be useful for nouveau - every once in a while we want to add new opcodes and we've mostly been doing the RE work as we need it. Having a reference will speed that up
01:28 mhenning[d]: As for raytracing instructions, my understanding is that nvdisasm can't decode them, so they'll be a little harder to figure out
01:28 kuter7639[d]: Cool. Reading nouveau code thought me a lot. It's great to be able to contribute back
01:30 kuter7639[d]: https://github.com/kuterd/nv_isa_solver this is the code that creates those ISA spec files. In a bit of an experimental state 😄
01:30 kuter7639[d]: As long as NVIDIA doesn't remove the nvdisasm tool from cuda we should be able to decode any future ISA as well
01:34 HdkR: Yea, nvdisasm refuses to disassemble the RT stuff. It's cute obfuscation
02:30 skeggsb9778[d]: That's a way fancier version of how I fuzzed nvdisasm to do the bring-up for the last couple of ISA changes
02:31 skeggsb9778[d]: Except I had a couple of bash scripts, and manually entered the data into envydis 😛
02:31 skeggsb9778[d]: This seems easier
03:02 kuter7639[d]: skeggsb9778[d]: am I correct in citing the https://doi.org/10.1145/3018743.3018755 paper for the original fuzzing technique?
03:21 skeggsb9778[d]: No idea. I've never read it. As I said, what you've done goes *well* beyond what I was doing
03:35 redsheep[d]: gfxstrand[d]: Do you mean like the shader model 6.6 and 6.7 stuff from the tracker? That and fs interlock would get vkd3d up to as far as will really be possible without understanding the RT instructions
03:36 gfxstrand[d]: No, hardware shader models
03:37 gfxstrand[d]: Volta vs. Turing, etc.
03:37 redsheep[d]: Oh? So like making better use of latest isa, or what?
03:37 gfxstrand[d]: It's not well abstracted right now and leaks all over everywhere.
03:37 redsheep[d]: Ah I see
03:38 gfxstrand[d]: When I first wrote NAK, I didn't have a good sense for how hardware generations would impact the compiler. Now I do, or at least I understand it better.
03:41 skeggsb9778[d]: gfxstrand[d]: out of curiosity, what are the biggest performance blockers right now?
03:42 skeggsb9778[d]: in nvk in general, i mean
03:42 skeggsb9778[d]: particularly if the kernel is involved
03:43 redsheep[d]: It's unfortunate the RT instructions are shrouded in so much secrecy. They seem like they could be tricky from a compiler perspective so being able to account for that sooner than later would be nice
03:43 gfxstrand[d]: Compiler tuning is probably a big one. I also know that descriptors need more work. I finally landed the deep compiler work that was blocking all that a few weeks ago but I haven't figured out the right heuristic yet.
03:45 gfxstrand[d]: I also need a better story with images. I know bound images are faster, even if I don't know why yet. But promoting to bound without adding stalls is tricky.
03:46 gfxstrand[d]: I'm not aware of any big kernel things affecting perf just yet. I do have a short wishlist but nothing that's absolutely breaking us right now.
03:49 airlied[d]: I still think zcull will help
03:50 skeggsb9778[d]: Yeah, an I suspect compression in general would too (it definitely did back when we added it to earlier GPUs)
03:50 airlied[d]: And not sure where we are at with xompression
03:51 redsheep[d]: Regardless of whether they will have huge impact that will be needed to get to matching perf
03:52 redsheep[d]: I don't think tiled cache is huge on ada just based on you generally being able to hold your entire screen in one or two tiles in most configurations
03:53 redsheep[d]: Even at 4k I had to set up trianglebin in some really silly ways to get it to use more than 4 tiles
03:55 skeggsb9778[d]: gfxstrand[d]: What's the wish-list?
03:56 gfxstrand[d]: skeggsb9778[d]: Userptr and some sort of engine version query that doesn't require creating channels. I think those are the big ones.
03:57 gfxstrand[d]: I've got ideas on what I'd like for both of them. I think I wrote up something in a userptr issue. I haven't made an issue about the other yet.
03:57 skeggsb9778[d]: Ack. I suspect userptr would require more discussion and planning. But the latter should be do-able
03:57 skeggsb9778[d]: Ideas on the UAPI you'd like would be great though
03:58 skeggsb9778[d]: No rush though 😉
04:01 gfxstrand[d]: I've had got two thoughts:
04:01 gfxstrand[d]: 1. A getparam per engine type. It's a bit verbose but it's straightforward and getparam enums are cheap.
04:01 gfxstrand[d]: 2. The kernel to return a list of all engines that both it and the hardware supports as an array of `u16`s. I can get the kind of engine from the bottom byte and it avoids having anything super fixed like getparams.
04:02 gfxstrand[d]: I kinda like 2 but it also feels a bit too clever for its own good. I also need to take a good hard look at the context creation API again and make sure that whatever we do makes sense in the context of that. But those are the thoughts kicking around my head.
04:04 skeggsb9778[d]: So. What NVKM reports to the DRM driver is:
04:04 skeggsb9778[d]: - A list of all engines, and the classes each supports
04:04 skeggsb9778[d]: - A list of available runlists, and the engines available from them
04:05 gfxstrand[d]: What's the distinction between a runlist, engine, and class? All I see for the most part are classes.
04:06 skeggsb9778[d]: Yeah, nouveau's UAPI for channels is out of date since kepler 😛
04:06 skeggsb9778[d]: When you create a channel, you create it on a specific runlist
04:07 skeggsb9778[d]: That runlist can reach certain engines (as mapped to subchannels, which is fixed these days)
04:07 skeggsb9778[d]: And each engine supports a set of classes
04:08 skeggsb9778[d]: (which define the method layout on the subchannel)
04:13 gfxstrand[d]: I guess the thing I'm missing is "why?" Why wouldn't I just always use the one runlist that can reach all of the engines?
04:13 skeggsb9778[d]: Because there isn't one
04:13 gfxstrand[d]: Hehe. Fair.
04:13 gfxstrand[d]: Okay, more targeted question: are compute and 3D different engines?
04:14 gfxstrand[d]: Or is there one engine that supports both classes?
04:14 skeggsb9778[d]: Yes and no 😛
04:14 gfxstrand[d]: In that order?
04:15 skeggsb9778[d]: The graphics runlist has two "run queues", the first supports 2d+3d+i2m+compute, the second only supports compute
04:15 skeggsb9778[d]: (both have their own copy engine)
04:15 skeggsb9778[d]: which is why you can do 2d+3d+i2m+compute+copy from one channel
04:16 skeggsb9778[d]: you need a channel on a different runlist to, say, use nvdec
04:17 skeggsb9778[d]: Using the compute-only pipe gets you async compute
04:21 gfxstrand[d]: Okay, do what's the difference between a list and a queue? 😅
04:21 gfxstrand[d]: I think it would help if I could see all this laid out in a tree or something.
04:22 skeggsb9778[d]: Haha. The runlist has the dma fetcher etc for all the channels on it, the queue would be the interface to the engine (so, gr has two, so it can do graphics+compute simultaneously)
04:24 gfxstrand[d]: Okay, so the runlist is the thing that processes my command stream and directs stuff to the different engines based on subchannel?
04:24 skeggsb9778[d]: Yes
04:25 gfxstrand[d]: So how do I select between the "main" run queue for 3D and the async one?
04:27 skeggsb9778[d]: You can't with current UAPI. But, in general. You create a channel group., then you create multiple channels inside that. One channel can select runqueue 0 (2d+3d+i2m+compute+copy), and then some number of channels can select runqueue 1 (compute+copy)
04:28 gfxstrand[d]: Kk
04:29 skeggsb9778[d]: NVKM supports this on HW (from gk110 onwards), but not GSP currently. It's sorta why I'm asking about UAPI stuff around engines etc, because if I fix it to work on GSP it'd be good to plumb it to userspace finally
04:30 gfxstrand[d]: I need to digest this some more but I think this just moved further up the priority list. We need proper async compute.
04:30 skeggsb9778[d]: Cool 🙂 As I said, there's no rush, but I'd love to have your thoughts here
04:31 gfxstrand[d]: Yeah, I need to digest the details of the topology more. From a first brush, it sounds like there's more detail there than I care about. On the other hand, I have a feeling that those details will matter.
04:34 gfxstrand[d]: But it's late here so I need to sign off. We'll talk about this more for sure.
04:35 skeggsb9778[d]: No problem 🙂 Have a good evening
13:18 gfxstrand[d]: https://www.phoronix.com/news/NVK-Platform-Abstraction
13:19 gfxstrand[d]: Okay, that was a way better article than I expected when I saw the headline. He immediately took it in a Nova direction, not theorizing about OGK or anything like that.
13:19 karolherbst[d]: well.. he also did that later, but yeah
13:27 gfxstrand[d]: Well, naturally. But he assumed something innocuous instead of going straight for the conspiracy theory. 😂
13:34 rayquaza: I'm having issues running nouveau, I keep getting some error: [ 33.300675] nouveau 0000:01:00.0: gsp: rc engn:00000001 chid:8 type:45 scope:1 part:233
13:35 rayquaza: here is my dmesg: https://pastebin.com/9aPsrgrg
13:52 rayquaza: I've enables the GSP in my kernel paramters
13:55 clangcat[d]: rayquaza: Does the card boot without error if you disable GSP.
13:55 clangcat[d]: Also is the error something that happens on boot or does it happen after trying to use the card? Like what do you see as a user because of the error?
13:56 rayquaza: I have hybrid graphics if that's important, these error appear when I boot up my system and look at my dmesg
13:56 rayquaza: I'll try disable the firmware and see what happens
13:57 tiredchiku[d]: I mean, disabling the gsp will 100% get rid of the gsp messaging in the dmesg
13:57 rayquaza: so I shouldn't do it?
13:58 tiredchiku[d]: what issue are you facing, what are the symptoms
13:59 clangcat[d]: https://cdn.discordapp.com/attachments/1034184951790305330/1260233836134928454/grafik.png?ex=668e93b8&is=668d4238&hm=dbea56f80148c8c545c616d678464c3fd8b4eed665295ecbacb0248ed279824f&
13:59 clangcat[d]: tiredchiku[d]: I know that but I wanna know if these go away.
13:59 rayquaza: I get a bunch of errors on dmesg, I honesly have no idea on how to check which gpu is being used when I run a steam game
13:59 clangcat[d]: rayquaza: Also another question when your in your system does the card show up under `/dev/dri/card*`?
13:59 tiredchiku[d]: display init failing because it's a laptop with no external display connected I imagine
14:00 clangcat[d]: I'd assume it doesn't by the init failed message
14:00 clangcat[d]: tiredchiku[d]: No mine only displays that message when the actual nouveau driver fails for me. and the card is then missing from `/dev/dri`
14:00 tiredchiku[d]: I see
14:01 tiredchiku[d]: actually
14:01 tiredchiku[d]: it might be the same GPU as yours clangcat[d]
14:01 tiredchiku[d]: GA107
14:01 clangcat[d]: Oh it might?
14:01 tiredchiku[d]: rayquaza is this an RTX 3050 laptop?
14:01 rayquaza: I see 2 gpus
14:01 rayquaza: yes I think, give me a sec
14:02 rayquaza: from fastfetch: GPU 1: NVIDIA GeForce RTX 3050 Ti Mobile [Discrete]
14:02 karolherbst[d]: worst case it's one of the GPU we need an updated GSP...
14:02 rayquaza: rip
14:02 tiredchiku[d]: _almost_ the same GPU
14:02 tiredchiku[d]: same die though, meaning same GSP firmware
14:03 tiredchiku[d]: GA107
14:03 rayquaza: let me reboot after disabling GSP and see what happens with dmesg
14:03 karolherbst[d]: rayquaza: ever tried the open source nvidia driver with that? I'm curious if 535.113.01 loads on it using GSP
14:03 tiredchiku[d]: you can't build 535 with the latest kernel anymore
14:03 tiredchiku[d]: some function names changed somewhere
14:03 rayquaza: open source driver? nvidia-open?
14:04 tiredchiku[d]: yes, nvidia-open
14:04 karolherbst[d]: mhh
14:04 clangcat[d]: rayquaza: very similar card as me you might need a patch from patchwork as that's what fix it for me.
14:04 karolherbst[d]: right...
14:04 karolherbst[d]: clangcat[d]: ohh.. or that
14:04 karolherbst[d]: what patch was it?
14:04 rayquaza: I'll try reboot then install the nvidia-open
14:05 tiredchiku[d]: https://patchwork.freedesktop.org/patch/591858/?series=132966&rev=2
14:05 tiredchiku[d]: I think
14:05 tiredchiku[d]: Sid127: I kinda asked about it too
14:05 karolherbst[d]: mhh, that's a different issue tho
14:05 tiredchiku[d]: but got no response
14:05 clangcat[d]: tiredchiku[d]: No I think that's a different one as this person doesn't have SG_DEBUG problem.
14:05 tiredchiku[d]: I see
14:06 clangcat[d]: karolherbst[d]: Yea I have an issue that I clear my browser history :p and I've not rebuilt my kernel in a while.
14:06 clangcat[d]: Mainly cause low memory kernel building is a headache.
14:07 tiredchiku[d]: do you have the patch file
14:07 tiredchiku[d]: but yeah, it does appear GA107 is rather problematic currently: https://www.techpowerup.com/gpu-specs/nvidia-ga107.g988
14:07 rayquaza: Here is the new dmesg with GSP disabled: https://pastebin.com/t9XUusQq
14:07 clangcat[d]: tiredchiku[d]: Not in my history.
14:08 tiredchiku[d]: I could try it out in a liveISO on my brother's laptop (3050Ti) over the weekend
14:08 clangcat[d]: tiredchiku[d]: Could be an idea.
14:08 tiredchiku[d]: he'd kill me if I nuked windows on it or did a dual boot
14:08 tiredchiku[d]: but I think he should be ok with letting me borrow it for liveISO shenanigans
14:09 karolherbst[d]: rayquaza: it's still using GSP
14:09 tiredchiku[d]: I can even roll my own iso with custom kernel builds, no big deal
14:09 clangcat[d]: rayquaza: The GSP messages are still there question did you always get these messages or only on this kernel?
14:09 karolherbst[d]: rayquaza: you need to boot with `nouveau.config=NvGspRm=0` to disable it
14:10 rayquaza: clangcat[d] This is the second kernel I'm testing it on, tried the TKG linux-git first
14:10 rayquaza: will do karolherbst[d]
14:10 rayquaza: how do you reply in IRC?
14:10 karolherbst[d]: rayquaza: what do you mean?
14:11 rayquaza: like ping someone
14:11 clangcat[d]: rayquaza: Uhhh I don't think IRC has like a reply feature. But @ us works here.
14:11 rayquaza: @clangcat[d] does this work?
14:11 tiredchiku[d]: rayquaza: you just type out their username
14:11 karolherbst[d]: rayquaza: you already did
14:11 tiredchiku[d]: no need to @ either
14:11 clangcat[d]: rayquaza: Yea username works fine.
14:11 rayquaza: ah I see
14:11 clangcat[d]: rayquaza: Yup
14:11 karolherbst[d]: normally on IRC you do $username: ...
14:11 karolherbst[d]: but clients usually highlight if they see the username written anywhere
14:11 tiredchiku[d]: anyway, I'll try to take a look at it over the weekend
14:12 clangcat[d]: tiredchiku[d]: It would be nice if you fixed my issues.
14:12 clangcat[d]: Or
14:12 tiredchiku[d]: I know sweetie
14:12 clangcat[d]: if Nova would finally come out and possibly fix them.
14:12 clangcat[d]: XD
14:12 tiredchiku[d]: gonna be interesting trying to get 535 openrm driver into a live iso
14:13 clangcat[d]: It should be possible
14:13 tiredchiku[d]: I know
14:13 tiredchiku[d]: just interesting :P
14:13 tiredchiku[d]: I'll figure it out
14:13 tiredchiku[d]: no promise I'll look at it this weekend, since it's gonna be my first weekend back at home, but I will take a look at it for sure
14:14 clangcat[d]: Sid127: Also tiredchiku[d] did airleid ever get back to you about this
14:14 rayquaza: thanks man
14:14 tiredchiku[d]: nope
14:14 clangcat[d]: <a:aqua_Cry_Sad:956763266355441664>
14:14 rayquaza: here is the actual disabled GSP: https://pastebin.com/rqjC43sS
14:14 karolherbst[d]: rayquaza: so, disabling GSP makes it work? cursed
14:15 tiredchiku[d]: yeah, GA107 GSP is troublesome on nouveau
14:15 clangcat[d]: karolherbst[d]: Well not really it goes down a different code path :p
14:15 tiredchiku[d]: and I believe 535 is broken on current kernels
14:15 tiredchiku[d]: maybe on 6.6 LTS...
14:15 tiredchiku[d]: tiredchiku[d]: openrm, that is
14:15 karolherbst[d]: yeah.. I wouldn't be surprised if we really have to update GSP
14:15 clangcat[d]: But yea uhh GSP is problematic at times.
14:15 clangcat[d]: cool
14:15 tiredchiku[d]: I shall investigate and report my findings posthaste
14:16 tiredchiku[d]: out of
14:16 clangcat[d]: Especially on 3050's
14:16 tiredchiku[d]: both boredom and love xD
14:16 clangcat[d]: it seems like
14:16 rayquaza: wait isn't there like a way to extract the GSP from the graphics driver, would that be any different?
14:16 karolherbst[d]: rayquaza: no, but nouveau would have to support the version
14:16 rayquaza: ah I see
14:18 rayquaza: karolherbst[d] yeah trying mangohud vkcube now defaults to my nvidia gpu instead of intel but got some errors
14:19 rayquaza: dunno if this is useful or not:
14:19 rayquaza: Selected GPU 1: NVIDIA GeForce RTX 3050 Ti Laptop GPU (NVK GA107), type: DiscreteGpu
14:19 rayquaza: [2024-07-09 16:18:35.929] [MANGOHUD] [error] [loader_nvml.cpp:42] Failed to open 64bit libnvidia-ml.so.1: libnvidia-ml.so.1: cannot open shared object file: No such file or directory
14:19 rayquaza: [2024-07-09 16:18:35.929] [MANGOHUD] [error] [nvml.cpp:46] Failed to load NVML
14:19 rayquaza: Authorization required, but no authorization protocol specified
14:19 rayquaza: [2024-07-09 16:18:35.934] [MANGOHUD] [error] [nvctrl.cpp:56] XNVCtrl didn't find the correct display
14:19 tiredchiku[d]: no, that's just normal mangohud logging
14:19 rayquaza: ah I see
14:19 clangcat[d]: rayquaza: One more question who makes your laptop?
14:19 karolherbst[d]: with GSP disabled performance will be poor anyway, so not quite sure you'll be having fun playing games like that
14:19 rayquaza: back to square one I guess
14:20 clangcat[d]: Just wondering if there is a pattern
14:20 tiredchiku[d]: I doubt there's a pattern
14:20 rayquaza: clangcat[d] IdeaPad Gaming 3 15IAH7
14:20 tiredchiku[d]: since GSP is die-dependent
14:20 clangcat[d]: Yea no but neat.
14:20 clangcat[d]: tiredchiku[d]: Yea was unlikely but was curious if it was another Dell.
14:20 tiredchiku[d]: well, somewhat die-dependent
14:20 karolherbst[d]: yeah.. you can't really compare nvidia cards by model name
14:20 karolherbst[d]: they could have the same name even and just behave differently
14:21 tiredchiku[d]: either way
14:21 tiredchiku[d]: will look at it
14:21 tiredchiku[d]: c:
14:21 clangcat[d]: karolherbst[d]: Yea but it's also why I was curious if it was another Dell one. Mainly just cause yea would be interesting to know.
14:22 clangcat[d]: tiredchiku[d]: Does mangohud just try and open the prop drivers libraries if they exist?
14:22 clangcat[d]: cause I know EGL does that for me. Even though the card is running on Nouvea
14:22 karolherbst[d]: yeah
14:22 tiredchiku[d]: correct
14:22 tiredchiku[d]: mangohud isn't wired up for nouveau very well yet
14:25 clangcat[d]: karolherbst[d]: It's great cause the `libnvidia_EGL` reports a memory error in my checking tools but it's only happening because Nvidia's driver isn't present.
14:26 clangcat[d]: And I need to always remember "ahhh yea that one isn't fixable by me"
14:26 karolherbst[d]: it's even worse. some nvidia libs call into `nvidia-modeprobe` which is a setuid binary trying to load the nvidia kernel module and spams `dmesg`
14:26 clangcat[d]: Probably not even by Mesa/EGL as a whole. Seeing as it happens inside the libnvidia files.
14:27 clangcat[d]: karolherbst[d]: I've not had that yet but yikes
14:27 clangcat[d]: I just have both prop and FOSS so I can test soilleir on both
14:28 tiredchiku[d]: actually
14:28 tiredchiku[d]: I won't make a live ISO
14:28 tiredchiku[d]: I'll just make a proper installation on a USB
14:29 tiredchiku[d]: :wolfFIRE:
14:31 rayquaza: is there is discord server for this channel?
14:32 tiredchiku[d]: https://discord.com/invite/QvFhUPPq
14:32 rayquaza: this me thanks you
15:47 notthatclippy[d]: tiredchiku[d]: Some community maintained patches for basically any driver version and any kernel version at <https://github.com/Frogging-Family/nvidia-all>. YMMV on actual runtime, but these should make it build.
15:51 redsheep[d]: That's useful, maybe I can actually get somewhere with seeing if the DP audio issue is just a gsp bug then
15:53 notthatclippy[d]: You can actually apply these to the proprietary closed source driver as well, and then test the no-GSP NV variant of the same version.
16:18 tiredchiku[d]: notthatclippy[d]: am familiar with that, yeah
21:12 skeggsb9778[d]: airlied[d]: i pushed fixes for the dma mask issue, and missing module device table yesterday btw
21:15 skeggsb9778[d]: the bl fix is still outstanding, as somehow they break my laptop panel harder than it already is, and i'd like to understand why more before i do a fix for that
21:15 airlied[d]: cool I'll try and page back in where I was and test it, been off for a week and forgotten everything I was doing 🙂
21:16 skeggsb9778[d]: hehe, that can happen 😛
21:17 skeggsb9778[d]: i was able to reprod the dma mask issue by disabling iommu in sbios