00:05 RSpliet: Oh I didn't realise the dri-logger bounced along to OFTC. Good stuff! Could someone add the words "Logged" and "https://people.freedesktop.org/~cbrill/dri-log/index.php?channel=nouveau" to the topic? :-D
00:10 imirkin: RSpliet: go for it
15:36 Svanto: Greetings, esteemed graphics wizards!
15:36 Svanto: I was looking through the troubleshooting and FAQ sections but I cannot seem to find what I was looking for.
15:36 Svanto: Is the nvFanless kernel mode parameter still a thing, or had it been removed?
15:36 Svanto: I wanted to test it out with/ sacrifice a Maxwell 2 GPU to science.
15:36 Svanto: I understand the ramifications of the setting and why one would want to omit it from official documentation, but I prepared a watercooled loop with a coolant temp monitor, so I'm as prepared as I think I can be.
15:37 imirkin: still a thing. but it's called NvFanless
15:38 imirkin: although i'm not 100% sure that stuff was merged in the first place. maybe?
15:38 imirkin: karolherbst: --^
15:38 karolherbst: Svanto: it never landed upstream
15:39 imirkin: Svanto: btw, just so there are no false expectations... clock-for-clock, nvidia is still much faster than nouveau
15:41 karolherbst: oh btw, I now have an ampere GPU :3 I hope I will get to enabling acceleration soon enough :D
15:41 imirkin: cool
15:42 karolherbst: the ISA is even the same as with turing
15:42 karolherbst: so hopefully it will be easy to do
15:42 imirkin: cool
15:45 Svanto: karolherbst: Ah, I'm sorry to hear that. Thank you very much for the info. And congratulations on the new hardware!
15:46 imirkin: Svanto: there's a branch somewhere
15:46 karolherbst: yeah.. it took a while, but now I have one :D
15:48 Svanto: imirkin: thank you for the info, yeah, I'm well aware. I was mainly interested in nouveau because it appears to be the only blobless driver for mainstream GPUs.
15:48 Svanto: Plus, I use Sway, so not a whole lot of choice given the state of the GPU market, and given that unlike nouveau, proprietary nvidia does not appear to support GBM, nor will it ever by the looks of it.
15:48 imirkin: karolherbst: do you have a link to your fanless branch?
15:49 imirkin: i couldn't find it quickly
15:50 karolherbst: probably this one: https://github.com/karolherbst/nouveau/commits/clk_to_upstream
15:51 karolherbst: it also shows why that stuff isn't upstreamed yet...
15:51 karolherbst: driver side thermal throttling
15:52 karolherbst: or maybe use this one? https://github.com/karolherbst/nouveau/commits/clk_cleanup_for_real
15:52 karolherbst: I lost overview long time ago :D
15:54 Svanto: Ahh. Well, I can pin my first goal in nouveau tinkering then; find NvFanless branch ;D
15:54 karolherbst: yeah..
15:54 karolherbst: if somebody wants to clean this mess up :D
15:54 karolherbst: that would be appreciated
15:55 karolherbst: that branch contains like 5 new features though
15:55 imirkin: and then you can get another branch, "clk_cleanup_no_really_this_is_the_one"
15:55 karolherbst: and might not even apply on latest code
15:55 karolherbst: imirkin: I used to use versions, but at some point I arrive at likve v9
15:56 karolherbst: anyway
15:56 karolherbst: the minimum I want to see included is thermal throttling before adding a flag like this
15:56 karolherbst: just never found the time to really re this stupid table
15:57 imirkin: karolherbst: did you land the "don't crash when trying to reclock when it's runpm-suspended" work?
15:57 karolherbst: I think so?
15:58 karolherbst: I mean.. I don't really have control over what patches land anyway, so if you track like 10 patches and some never land even I lose interest at some point :/
15:58 karolherbst: probably the reason why most of my time I just spend on mesa stuff :p
16:06 Svanto: karolherbst: >the minimum I want to see included is thermal throttling
16:06 Svanto: Yeah, that is entirely understandable.
16:35 Svanto: karolherbst: so the thermal policies table is the main issue that needs to be dealt with?
16:38 karolherbst: Svanto: more or less
16:39 karolherbst: it's not technically required.. but to protect users from themselves, so even if they turn it on, we make sure the GPU doesn't get too hot
16:39 karolherbst: even if we don't do it, the GPU would at some point downclock and even force shutdown
16:39 karolherbst: but this way you get less perf and more efficient throttling
16:40 karolherbst: ehh.. more perf
16:44 imirkin: Svanto: probably just want to get the existing work rebased on something more recent
16:44 imirkin: that'd be a great first step
16:45 Svanto: >but this way you get less perf and more efficient throttling
16:45 Svanto: Ah, I see! Thanks for explaining.
16:46 imirkin: Svanto: i sort of assume you're a developer? otherwise that task may be out of reach for you
16:48 Svanto: imirkin: Well yes, but my experience with C is limited and my experience with Mesa is nonexistent. I'm interested but it will be a while before I feel qualified enough. But thank you for all your help.
16:48 imirkin: you won't be touching mesa at all
16:48 imirkin: this is going to be kernel work
16:48 imirkin: and everyone starts out with no experience with the kernel, so ... it's been done :)
16:49 imirkin: but if you are comfortable working with code, it shouldn't be too difficult to apply the existing work onto the latest
16:49 imirkin: if you're not sure what to do about something, feel free to ask
16:50 Svanto: I will be sure to! Thank you.
17:22 karolherbst: *sigh* :/
17:23 karolherbst: why does stuff break even though pushbuffer content doesn't change :/
17:24 karolherbst: is there something up with queries I totally miss?
17:26 karolherbst: mhhhh
17:27 karolherbst: imirkin: soo.. normally if we forget to bind a buffer to the pushbuffer and access it, we would assume there is some kind of read/write error in dmesg, no?
17:35 karolherbst: mhhhh
17:35 karolherbst: something is strange
17:37 imirkin: karolherbst: certainly not necessary
17:37 imirkin: you only get a read/write error if it's not in vram
17:37 imirkin: might still be in vram :)
17:37 imirkin: karolherbst: queries stuff is very sensitive
17:38 karolherbst: yeah well..
17:38 imirkin: it #define's the pushbuf-no-touch define
17:38 karolherbst: I even found something simplier I broke
17:38 imirkin: so it doesn't implicitly PUSH_SPACE on every thing
17:38 karolherbst: KHR-GL46.texture_repeat_mode.r8_49x23_0_clamp_to_edge even
17:38 karolherbst: sooo...
17:38 imirkin: heh
17:38 karolherbst: I am sure I got the fencing right, but now I actually want to move to per context pushbuf...
17:38 karolherbst: I even verified what I push out
17:38 karolherbst: same commends
17:38 karolherbst: same order
17:38 karolherbst: fences.. also correct
17:38 karolherbst: test still fails
17:39 karolherbst: well.. I didn't check if all changes inside CB_DATA are "okay" but...
17:39 karolherbst: they look like pointers
17:39 karolherbst: maybe I am missing something...
17:40 imirkin: CB DATA should generally not have pointers
17:40 imirkin: but
17:40 imirkin: we do use P2MF to upload texture descriptors
17:40 imirkin: which *do* have pointers in them
17:41 karolherbst: it happens right before setting SAMPLE_LOCATIONS
17:41 karolherbst: anyway...
17:41 karolherbst: those are definetly pointers
17:41 karolherbst: I think? mhh
17:41 imirkin: or floats :)
17:42 karolherbst: mhh
17:42 karolherbst: why would they be different between runs though?
17:42 imirkin: dunno
17:42 karolherbst: let me take three dumps in total, two from working runs, one from a non working one..
17:42 karolherbst: maybe I missed something
17:43 imirkin: the only time CB DATA would have pointers is for compute
17:43 imirkin: for the UBO bases for UBO's > 7
17:43 imirkin: or 6 or whatever
17:43 karolherbst: mhhhhh
17:43 karolherbst: so CB_DATA differs between all runs
17:44 imirkin: oh, and SSBO bases too i guess?
17:44 karolherbst: probably
17:44 karolherbst: weird thing is..
17:44 karolherbst: some pointers are equal between the both working runs
17:44 karolherbst: but different in the broken one
17:44 imirkin: that said, the memory allocation tends to be fairly static
17:44 imirkin: so it generally doesn't vary between runs of a simple test
17:45 karolherbst: ohhhh wait.....
17:45 karolherbst: shit...
17:45 karolherbst: let me try something
17:45 karolherbst: the heck
17:46 karolherbst: it's not the pushbuf...
17:46 karolherbst: it's the client
17:46 karolherbst: so.. because of internal libdrm details, ben told me to allocate nouveau_clients per context as well, which do... something
17:46 karolherbst: you still use the same channel though
17:47 karolherbst: but if you have bos bound to multiple pushbuffers
17:47 karolherbst: you kick other pushbuffers as long as they are using the same client
17:47 karolherbst: that fpush if inside pushbuf_kref
17:47 karolherbst: mhhh
17:48 karolherbst: but why does using a new client break things?
17:49 karolherbst: yeah... using the same fixes all regressions
17:49 karolherbst: nice...
18:00 karolherbst: mhh
18:00 karolherbst: what is this client thing actually doing..
18:02 imirkin: karolherbst: client per context mens one hw thing per context
18:02 imirkin: which we were trying to avoid
18:02 karolherbst: it does not
18:02 imirkin: ok
18:02 karolherbst: nouveau_client is purely some libdrm thing
18:02 imirkin: then don't listen to me
18:02 imirkin: :)
18:18 karolherbst: ahhh
18:18 karolherbst: in the working case:
18:18 karolherbst: bo 0x7f101c269000 0x6e0000 0x80000
18:18 karolherbst: bo 0x7f10273b4000 0x14000 0x1000
18:18 karolherbst: broken case:
18:18 karolherbst: bo 0x7f3e42782000 0x6e0000 0x80000
18:19 karolherbst: that's the TSC bo
18:19 karolherbst: I think...
18:19 karolherbst: anyway.. it's missing and I guess this is causing issues :)
18:27 karolherbst: imirkin: btw.. you asked for this: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/169
18:27 gitlab-bot: Mesa issue (Merge request) 169 in drm "nouveau: print bo address in the GPU/CPU vm and its size" [Nvidia, Opened]
18:27 karolherbst: once anything like this lands, I'll push out an updated depushbuf version
18:28 karolherbst: ehh wait
18:28 karolherbst: offset is 64 bit...
18:28 imirkin: karolherbst: tsc is kinda important.
18:28 karolherbst: yeah... :D
18:28 karolherbst: I guess something is broken in regards to reference screen data
18:29 karolherbst: *referencing
18:36 Svanto: Is there an efficient way to search through the logs for this channel?
18:37 karolherbst: I doubt it...
18:37 karolherbst: but I guess you could download the logs and grep it
18:39 imirkin: Svanto: google
18:40 imirkin: with site:people.freedesktop.org
18:40 Svanto: imirkin: I did try that, but it's difficult to bring up results for nouveau speficially that way.
18:41 imirkin: is there something concrete you're looking for?
18:49 Svanto: imirkin: There are some things that I was curious about and didn't want to waste people's time with
18:49 Svanto: But namely it was:
18:49 Svanto: - I know that Nouveau is held back by nvidia's refusal to provide the PMU firmware, and I know this is why we cannot control the onboard fan speeds. Are there other functions held back by that inaccessible firmware?
18:49 Svanto: - I heard rumors about Vulkan on Nouveau back in 2018. Did it hit a technical roadblock or is it simply an undertaking that there are not yet enough contributors for?
18:49 imirkin: Svanto: doing RE for how to do reclocking
18:49 imirkin: (is held back by lack of ability to fuzz the vbios, due to signature verification)
18:50 Svanto: Ah, thank you very much for the info.
18:50 imirkin: Svanto: the vulkan stuff is missing primarily due to laziness. there's a lot of heavy work that needs to be done in the nouveau kernel driver to enable userspace-side VA management, which is semi-required for vulkan
18:51 imirkin: skeggsb has been working on it for ages, but i get the feeling that it's not a primary focus for him
19:02 Svanto: imirkin: Ohh, I see. Can't call it laziness, a volunteer project is a volunteer project... I'm glad to have this info.
19:02 Svanto: BTW by RE you mean reverse engineering, right? Did the documentation nvidia supposedly provided help anyhow?
19:02 Svanto: referring to this
19:02 Svanto: https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-Open-GPU-Docs
19:03 imirkin: Svanto: yes, RE = reverse engineering
19:04 imirkin: Svanto: the full info is here: https://nvidia.github.io/open-gpu-doc/
19:04 imirkin: we're all well aware of it
19:04 imirkin: in general they release the info after we've figured out how it works.
19:05 imirkin: but they've released zero about reclocking
19:05 imirkin: even the stuff that we know how it works :)
19:05 imirkin: there's one exceptoin to that, which is that aritger (iirc) made excellent docs available on fermi fan stuff, whcih we get wrong
19:05 Svanto: Ah, I almost thought nvidia was being helpful for a second. My naivete.
19:05 imirkin: but no one's had time / motivation to look into it properly
19:06 imirkin: Svanto: they do make display docs available, which have been quite helpful actually
19:06 imirkin: but those are for controlling the display stuff
19:11 Svanto: Ah, that's something then
19:33 karolherbst: Svanto: they are, but that's mainly focused on new gens
19:33 karolherbst: imirkin: and compute classes
19:33 karolherbst: and I think for ampere we have nearly everything
19:34 imirkin: karolherbst: they only give the function names for compute
19:34 imirkin: not the full manual
19:34 imirkin: (and for display too, i guess)
19:34 karolherbst: sure...
19:35 karolherbst: imirkin: we have a lot more
19:35 karolherbst: but yeah.. some interesthing things for userspace are still missing
19:36 karolherbst: imirkin: we even got the nvenc stuff
19:36 Santurysim: Can I help with your effort? I have a GK106 card
19:37 karolherbst: Santurysim: yes, just depends on what you want and can do
19:40 karolherbst: imirkin: https://github.com/NVIDIA/open-gpu-doc/blob/master/classes/video/nvdec_drv.h
19:40 karolherbst: sadly the class docs we have are... volta+?
19:40 imirkin: karolherbst: i saw those.
19:41 karolherbst: ahh no.. turing+
19:41 imirkin: karolherbst: any will to do video stuff has long-ago been sucked out of me though
19:41 karolherbst: yeah...
19:41 karolherbst: and I have more important things to work on :/
19:41 karolherbst: also.. firmware
19:41 imirkin: that's the main thing :)
19:42 imirkin: the video stuff is too finicky
19:42 imirkin: too many pieces have to be perfectly in place for anything at all to work
19:42 imirkin: and then it still weirdly fails
19:42 imirkin: and i'm not enough of a h.264 expert to work out what's up
19:42 karolherbst: and is totally broken in regards to multithreading anyway :)
19:43 karolherbst: well..
19:43 karolherbst: at least after figuring out the nouveau_client issue, I have a branch actually fixing it without deadlocks :D
19:44 imirkin: karolherbst: multithreading only matters if you're not a total screwup in single-threaded ;)
19:45 karolherbst: you mean regressions or generally?
19:47 imirkin: generally
19:48 karolherbst: imirkin: have ever looked at this threaded context stuff?
19:49 karolherbst: *you
19:50 imirkin: no
19:55 Santurysim: karolherbst: I want a nice gpu driver. Also I want to learn how the GPU subsystem works in Linux. I can try to collect data for you
20:27 karolherbst: imirkin: ehh.. I was mistaken.. it wasn't the tls bo.. it was the fence one...
20:27 karolherbst: which is surprising...
20:27 karolherbst: ohhhhh
20:27 karolherbst: ......
20:27 karolherbst: meh...
20:28 karolherbst: *sigh* I see it now
21:35 Svanto: karolherbst: >I think for ampere we have nearly everything
21:35 Svanto: Even PMU firmware and other signed firmware?
21:36 karolherbst: I meant docs
21:36 karolherbst: well
21:36 karolherbst: "docs"
21:36 karolherbst: register names
21:37 Svanto: Ohh I see, thank you
21:41 imirkin: karolherbst: have they released 3d names for anything?
21:41 karolherbst: I don't think so
21:42 karolherbst: it's also the biggest one
21:42 karolherbst: so.. it's taking more time
21:42 karolherbst: I don't even know if they are working on it, but I would guess so
21:42 karolherbst: it's just... huge
21:42 imirkin: pretty sure it's not some dude who's typing it up line by line...
21:42 imirkin: they already have the doc
21:44 RSpliet: It might be hand-vetted by legal line by line
21:44 RSpliet: But this better be part-generated doxygen-style
21:45 imirkin: RSpliet: nah, their standard docs which strip out all the text
21:45 imirkin: and so it's just reg + bitfield names
21:45 karolherbst: RSpliet: yep
21:45 imirkin: which is still better than nothing
21:45 karolherbst: imirkin: nope
21:45 karolherbst: they have legal checking them
21:45 RSpliet: imirkin: fairly sure they also strip out some of the bitfields and regs
21:45 imirkin: RSpliet: harder to tell
21:45 imirkin: much easier to tell that all the descriptive docs are gone :)
21:46 karolherbst: imirkin: that's true, but they have legal checking the docs :D
21:46 karolherbst: I am not kidding
21:46 RSpliet: imirkin: recall coming across regs in envydocs that weren't in the NV-published docs
21:46 RSpliet: envydocs? envytools!
21:47 karolherbst: docs for new gens are easier, because you can check the diff
21:47 imirkin: RSpliet: and probably the nvc0 TFB_UNFUCKUP_OFFSET_QUERY is not the official register name?
21:47 RSpliet: We may never know :-D
21:48 imirkin: it _could_ be the official name...
21:48 imirkin: it's just esp funny that offset queries were fucked up, and i had no idea why
21:48 imirkin: and then i started looking at traces
21:48 imirkin: and there was, annotated in the mmiotrace, a write to that register :)
21:55 Santurysim: Why not to use swear words in classified documentation? :D
21:55 imirkin: [and sure enough, writing a 1 to that reg fixed everything]
21:57 Santurysim: o
22:34 Svanto: imirkin: and probably the nvc0 TFB_UNFUCKUP_OFFSET_QUERY is not the official register name?
22:34 Svanto: Perhaps the reason nvidia won't open source the drivers is to bar us from seeing into the dwindling sanity of their programmers :-)
22:36 RSpliet: that, and patent(troll)s
23:04 karolherbst: imirkin: does it actually make a difference how often and when we push?
23:05 karolherbst: like are there any good reasons when we can't split up a pushbuffer?
23:06 karolherbst: nvm..
23:06 karolherbst: that doesn't seem to be the issue either
23:09 karolherbst: maybe I am just overlooking something somewhere.. mhhh
23:38 imirkin: karolherbst: each push takes up an ib ring slot