00:37mhenning[d]: marysaka[d]: SET_CONSTANT_BUFFER_SELECTOR doesn't seem any more likely to stall than LOAD_CONSTANT_BUFFER in my rough tests
00:38mhenning[d]: via https://gitlab.freedesktop.org/mhenning/mesa/-/commit/11e56df84920a9417036e2fbf8fa0e5c9f68ad0b + https://gitlab.freedesktop.org/mhenning/re/-/tree/main/vk_test_overlap_exec?ref_type=heads
00:38karolherbst[d]: there is a thing that matters
00:38karolherbst[d]: or rather, might matter
00:39karolherbst[d]: mhenning[d]: https://patents.google.com/patent/US7877565B1/en
00:40karolherbst[d]: figure 4c e.g.
00:40karolherbst[d]:but
00:40karolherbst[d]: I haven't figured out how that's programmed and if it's automatically programmed
00:41karolherbst[d]: tldr: versioning is how the hardware can save "versions" of UBOs contents and run shaders back to back without stalling
00:41karolherbst[d]: even if they need updated UBOs
00:42karolherbst[d]: but maybe it doesn't matter which way the UBO gets updated
00:42karolherbst[d]: but it's also a mystery if we have the versioning at all or not
00:42karolherbst[d]: enabled I mean
00:43mhenning[d]: yeah, I'm executing ubo updates without stalls for both LOAD_CONSTANT_BUFFER and SET_CONSTANT_BUFFER_SELECTOR
00:43karolherbst[d]: ahh
00:43karolherbst[d]: so I guess versioning works then
00:44karolherbst[d]: there is the "page pool" buffer bound to the context via GSP and at least that's all set up
00:44karolherbst[d]:but
00:44karolherbst[d]: it also looks like pre GSP this buffer is super small
00:44karolherbst[d]: because there the size is decided upon by nouveau and GSP uses like 25x the amount
00:45mhenning[d]: maybe we should increase the size nouveau allocates then
00:45karolherbst[d]: yeah... I was considering it.. we had a massive perf boost with GSP.. a bit too massive to be only explained by clocks if you ask me
00:46karolherbst[d]: so I am curious if that's related
00:46karolherbst[d]: the page pool is used for UBO versioning
00:46karolherbst[d]: anyway, the patent kinda explains pretty well how that works 🙂
00:47karolherbst[d]: there are also the root constants we'll need to figure out
00:48karolherbst[d]: `ROOT_TABLE` in the class
00:48mhenning[d]: I'm in the middle of figuring out ROOT_TABLE
00:48karolherbst[d]: nice
10:16marysaka[d]: mhenning[d]: Hmm interesting... thanks for testing this
10:45x512[m]: Anybody knows how GPU and HDA are related? Do HDA driver need to know anything about GPU?
10:46x512[m]: HDA (High Definition Audio)
11:25karolherbst[d]: x512[m]: yes
11:25karolherbst[d]: it's the same physical device
11:25karolherbst[d]: so for runtime power management it matters a lot
11:25karolherbst[d]: especially on laptops, can only power down the GPU, if also the HDA device is "idle"
11:26karolherbst[d]: it often also involves ACPI, so on linux both drivers put the devices into runtime suspend state and then the host bridge can be powered down
11:26karolherbst[d]: via ACPI methods
11:26x512[m]: I am currently thinking about PCIe slot GPUs, not laptops.
11:26karolherbst[d]: there is also some display hotplugging stuff where it amtters
11:27karolherbst[d]: like usually you have multiple sinks on the HDA one
11:27karolherbst[d]: and userspace kinda needs to know which are active based on connected displays
11:27karolherbst[d]: and I don't think the HDA device itself knows
11:27karolherbst[d]: there are a few calls in nouveau to connect with the audio device
11:28karolherbst[d]: x512[m]: yeah but you really want to take runtime power management into account, because you really really want to get that one right anyway
11:28x512[m]: Are there reverse calls (HDA driver to GPU driver)?
11:28karolherbst[d]: no idea
11:29karolherbst[d]: `drm/drm_eld.h` is the core drm stuff implementing some of it
11:30karolherbst[d]: and there is a `drm_audio_component` struct
11:30karolherbst[d]: anyway, it's not trivial
11:36x512[m]: I wonder how official Nvidia kernel driver works with HDA and does it need some kind of interaction with HDA driver.
11:37x512[m]: It look like no interaction.
11:42karolherbst[d]: yeah not sure how that works out with the out of tree driver tbh
12:51x512[m]: I am interested how hardware works, not Linux driver implementation details.
12:52x512[m]: HDA is enumerated as separate PCI function and handled by separate driver.
13:10karolherbst[d]: that's correct, but it's a bit wonky, because it also kinda depends on the GPU side of things. I think there are GPUs out there where the HDA part won't report any audio devices unless a display is plugged in
13:10karolherbst[d]: I think on a handful of cards the GPU driver also needs to enable the audio subfunction first
13:11karolherbst[d]: never really looked that deeply into it, but there are some weird interactions
21:10CompanionCube: (Oh btw, i ended up switching to the modesetting DDX, because of two opengl-related things that happened under the nouveau ddx when i ran a comositor after fixing opengl; after dpms turned the screen off, after it turned back on it was frozen except for the mouse cursor(?), also on a whim i tried running an oldass game in wine, not only was it a slideshow, it made anything else using
21:10CompanionCube: opengl a slideshow until xorg was restarted. I think this even happened if both programs never ran at the same time. Neither happened under the modesetting DDX)
21:10CompanionCube: dunno if it being a 'bad' kernel is related to the issues.
22:10mhenning[d]: Oh, yeah the nouveau ddx has some issues. We mostly suggest that people use modesetting for recent cards
22:40trask: i still havent found a much better chip than my 1070 gtx, think nouveau driver is gonna do another decade just fine?
22:46karolherbst[d]: mhenning[d]: I think even for older cards it's fine now.. there was this "OOM" situation, but it was just some weirdo race condition somewhere causing spurious allocation failures... I've tried it on my nv4x cards once and it was fine.. But not sure how well it works on nv3x (are some of them still working these days 🙃 )
22:47karolherbst[d]: don't have anything older than nv4x, so I'm kinda hesitant to just deprecate it completely.. but maybe failing to load on nv4x+ would be a good step?
22:48karolherbst[d]: or we just do whatever that fedora patch is doing
22:49karolherbst[d]: ehh it's a xorg-server patch: https://src.fedoraproject.org/rpms/xorg-x11-server/blob/rawhide/f/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch
23:10CompanionCube: I do wonder exactly how it managed the second thing though, given its persistence....
23:53airlied[d]: x512[m]: The main thing is passing the ELD and maybe controlling routing of audio device to HDMI/DP encoder