00:00 Lyude: wooo
00:01 Lyude: basic outp inheritance through nvif working :)
00:01 Lyude: for tmds at least, the rest is super easy to do though now that i know everything that nees to happen
00:01 Lyude: ^ skeggsb :)
00:02 Lyude: what I did was just introduce an INHERIT command, which is basically "acquire this outp for the user, but only if it's already hooked up and active"
00:02 Lyude: also definitely have a much better idea of how all nvif/nvkm hooks up display wise I think
03:06 fdobridge: <g​fxstrand> Oh, there's a reproducer now. Should be easy enough to sort out.
03:06 fdobridge: <g​fxstrand> I should probably do that before it bites rbmckeever.
12:11 fdobridge: <k​arolherbst🐧🦀> okay, seems like at least the way of binding that buffer doesn't change..
13:01 fdobridge: <k​arolherbst🐧🦀> https://github.com/NVIDIA/open-gpu-doc/blob/master/manuals/volta/gv100/dev_ctxsw.ref.txt#L105 mhhh
13:02 fdobridge: <k​arolherbst🐧🦀> `#define NV_CTXSW_MAIN_IMAGE_PRIV_ACCESS_MAP_CONFIG_MODE_ALLOW_ALL 0x00000000` mhhhh
13:02 fdobridge: <k​arolherbst🐧🦀> _maybe_ I can prototype the MME stuff with that
13:02 fdobridge: <k​arolherbst🐧🦀> if that flag actually allows full access
13:03 fdobridge: <k​arolherbst🐧🦀> `#define NV_CTXSW_MAIN_IMAGE_PRIV_ACCESS_MAP_CONFIG_MODE_USE_MAP 0x00000002` probably means to use the buffer
13:03 fdobridge: <k​arolherbst🐧🦀> yeah, that would make things easy to implement
13:07 fdobridge: <k​arolherbst🐧🦀> but at least this part is stable across generations, so that's really good
13:18 fdobridge: <k​arolherbst🐧🦀> for future reference, `gf100_grctx_generate` is the function to create a context (and where we could also enable helper invoc for all gens)
13:18 fdobridge: <k​arolherbst🐧🦀> didn't try it yet, but I'm highly confident we could just do it there
13:19 fdobridge: <k​arolherbst🐧🦀> not sure if that would work with gsp though
13:23 fdobridge: <m​arysaka> Would be nice to give all those magical values in ctxgv100 and co some names now I suppose :aki_thonk:
13:24 fdobridge: <m​arysaka> (I got lost in dev_graphics.ref.txt a bit ^^')
13:34 fdobridge: <k​arolherbst🐧🦀> yeah...
13:36 fdobridge: <k​arolherbst🐧🦀> though we can't use that file as is, because it's not a valid C header file 🥲
13:38 fdobridge: <m​arysaka> yeah and the ranges definition are annoying...
13:41 fdobridge: <k​arolherbst🐧🦀> we do have evil macro magic for this tho
13:43 fdobridge: <m​arysaka> wait a sec
13:43 fdobridge: <m​arysaka> https://github.com/LineageOS/android_kernel_nvidia_nvgpu/blob/52003423a8ecf0b4f6252e0d92b75c50104356ac/drivers/gpu/nvgpu/hal/gr/init/gr_init_gv11b.c#L59
13:43 fdobridge: <m​arysaka> they give names here :Thinkeyes:
13:43 fdobridge: <m​arysaka> and those matches a lot of what I dumped
13:45 fdobridge: <k​arolherbst🐧🦀> yeah
13:45 fdobridge: <k​arolherbst🐧🦀> it's all known what those fields are (more or less)
13:46 fdobridge: <k​arolherbst🐧🦀> `0x419ea8, /* gr_pri_gpcs_tpcs_sms_hww_warp_esr_report_mask */` heh
13:46 fdobridge: <m​arysaka> ah I see I wasn't aware of that ^^'
13:46 fdobridge: <k​arolherbst🐧🦀> yeah.. it's just.. hidden
13:46 fdobridge: <m​arysaka> they also have stuffs for ampere in here it seems
13:46 fdobridge: <k​arolherbst🐧🦀> e.g. grep for `gr_gpcs_tpcs_sms_hww_warp_esr_report_mask_r`
13:46 fdobridge: <m​arysaka> I haven't looked "recent" nvgpu stuffs for years so yeah
13:47 fdobridge: <k​arolherbst🐧🦀> or maybe it's different in your version there
13:47 fdobridge: <🌺​ ¿butterflies? 🌸> look at the linux-nvgpu.git upstream tegra repo
13:47 fdobridge: <k​arolherbst🐧🦀> `drivers/gpu/nvgpu/include/nvgpu/hw/gv11b/hw_gr_gv11b.h`
13:47 fdobridge: <k​arolherbst🐧🦀> anyway
13:47 fdobridge: <🌺​ ¿butterflies? 🌸> has ga102 support
13:47 fdobridge: <k​arolherbst🐧🦀> `gr_pri_gpcs_tpcs_sms_hww_warp_esr_report_mask` is needed to enable the shader trap handler
13:47 fdobridge: <k​arolherbst🐧🦀> `gr_pri_gpcs_tpcs_sms_dbgr_control0` might also be relevant
13:48 fdobridge: <k​arolherbst🐧🦀> no wonder I never seen nvidia enabling it via mmiotraces
13:48 fdobridge: <k​arolherbst🐧🦀> they do that in firmware via the priv_access_map stuff
13:48 fdobridge: <🌺​ ¿butterflies? 🌸> https://nv-tegra.nvidia.com/r/plugins/gitiles/linux-nvgpu
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> ```gpu: nvgpu: move gv11b code under config flag
13:49 fdobridge: <🌺​ ¿butterflies? 🌸>
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> Move gv11b specific code under CONFIG_NVGPU_GV11B_SUPPORT so that gv11b
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> support can be removed for qnx later as it is no longer POR for qnx on
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> dev-main.
13:49 fdobridge: <🌺​ ¿butterflies? 🌸>
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> Jira NVGPU-8189
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> Bug 3642168
13:49 fdobridge: <🌺​ ¿butterflies? 🌸> ``` RIP old soldier
13:49 fdobridge: <k​arolherbst🐧🦀> heh
13:51 fdobridge: <🌺​ ¿butterflies? 🌸> the very neat thing with nvgpu is having mostly complete commit history
13:51 fdobridge: <m​arysaka> I guess I will have to dig nvgpu repo later... could be worth scrapping all those values once and for all?
14:41 fdobridge: <k​arolherbst🐧🦀> maybe, maybe not. Kind of depends if there is anything in there we don't know yet. If so, we also should just ask nvidia to release docs on it
14:41 fdobridge: <k​arolherbst🐧🦀> releasing docs is way easier if the information is already out in the public
14:42 fdobridge: <m​arysaka> right, that is probably a better strategy
14:56 fdobridge: <k​arolherbst🐧🦀> @gfxstrand @airlied https://gitlab.freedesktop.org/drm/nouveau/-/commit/99401da29004b777d6999bf78206f989423e3985
14:56 fdobridge: <k​arolherbst🐧🦀> not sw subchan witchery needed anymore
14:57 fdobridge: <k​arolherbst🐧🦀> I didn't check out how GSP changes things there and I don't know if we can still poke those registers from the host side (and if we do this thing at all)
14:57 fdobridge: <k​arolherbst🐧🦀> if all of this will change I can dig into the MME part so we do it properly
14:57 fdobridge: <k​arolherbst🐧🦀> but for testing this is good enough
14:57 fdobridge: <k​arolherbst🐧🦀> and also has the benefit of fixing userspace without having to patch mesa
14:58 fdobridge: <k​arolherbst🐧🦀> if this approach works also with GSP I'm inclined to clean it up and send it out. If it doesn't work with GSP, then we have to go the MME path
15:03 fdobridge: <m​arysaka> nice! kind of related, last night I rewrote the MME macro for FALCON04 to do some testing so if you want I can send you mine ^^
15:04 fdobridge: <m​arysaka> Also I don't know if it's known buut if you cause an infinite loop in some MME macro, it doesn't recover :nya_panic:
15:04 fdobridge: <m​arysaka> (had to force reboot)
15:35 fdobridge: <k​arolherbst🐧🦀> uhh
15:35 fdobridge: <k​arolherbst🐧🦀> normally the context gets nuked by the kernel, no?
15:35 fdobridge: <k​arolherbst🐧🦀> but userspace might behave weirdly
15:57 fdobridge: <g​fxstrand> Woo! I like 4-line patches. 😄
15:57 fdobridge: <g​fxstrand> Yeah, I've seen some nasty hangs from MME.
16:05 fdobridge: <k​arolherbst🐧🦀> if MME is able to hang we should figure out if our recovery code is broken and fix that
16:07 fdobridge: <g​fxstrand> Yeah, we should
18:44 fdobridge: <k​arolherbst🐧🦀> sadly, if cleaned up it will turn into a ... 20 line patch 🥲
18:45 fdobridge: <k​arolherbst🐧🦀> but let's see what @airlied is saying, because I didn't look into how GSP is wired up at all and if we can still do any of this
19:29 fdobridge: <a​irlied> yeah I don't think that will fly with gsprm unfortunately
19:30 fdobridge: <a​irlied> I can poke around a bit today to see there is any point we can see those regs, but I suspect not
19:30 fdobridge: <k​arolherbst🐧🦀> yeah.. that would be helpful
19:31 fdobridge: <k​arolherbst🐧🦀> I'm not really looking forward in implementing the same logic for archs older than 2nd gen maxwell
19:31 fdobridge: <k​arolherbst🐧🦀> but there we could just do it in the kernel
19:31 fdobridge: <k​arolherbst🐧🦀> at least we only need this for kepler+ afaik
20:21 fdobridge: <J​., Echo (she) 🇱🇹> 1-line patches are even better 😈
20:24 fdobridge: <k​arolherbst🐧🦀> -1000 line patches are even better
21:50 fdobridge: <g​fxstrand> https://gitlab.freedesktop.org/nouveau/mesa/-/merge_requests/191
22:20 fdobridge: <k​arolherbst🐧🦀> seems like my fancy patch doesn't work with GSP indeed 🙃
22:21 fdobridge: <k​arolherbst🐧🦀> hopefully I'll figure it out all by next week then
22:21 fdobridge: <k​arolherbst🐧🦀> but so far I think I'd advise to rely on the new patch and remove the sw subchan stuff from nvk
22:21 fdobridge: <k​arolherbst🐧🦀> because that's going to go away one way or the ohter
22:22 fdobridge: <k​arolherbst🐧🦀> Ben acked the approach of doing it for non nvidia fw devices, so the only case where Userspace will have to do something would be 2nd gen Maxwell+ or GSP driven GPUs
23:09 fdobridge: <a​irlied> @phomes probably for you to validate the turing while fix
23:23 fdobridge: <p​homes> It fixes the problem I had 🙂
23:56 fdobridge: <g​fxstrand> Yeah, I tested it with @phomes' patch.