07:13 UrbanMusic: any info on getting the displayport working with nouveau driver on an MSi GTX660 Ti 10de:1183.
07:16 UrbanMusic: I have use info on freedesktop including boot option drm.edid_firmware=DP-1:edid/myedid.bin
07:17 UrbanMusic: I have tried with nouveau and i2c modules in initrd and loaded in normal way
07:18 airlied: Lyude: did you land those two patches I reviewed into fixes?
07:18 airlied: UrbanMusic: it sounds like you have a regression, you might need to workout what kernel broke it
07:20 UrbanMusic: it all works perfectly on kernel-6.6.26 with no drivers in initrd or drm edid boot option
07:21 UrbanMusic: here is pastebin of 6.6.26 graphics and i2c sections https://pastebin.com/0SPHZNTi
07:21 airlied: uggh so 6.7 was where there was some refactoring
07:22 airlied: might be worth starting with filing an issue https://gitlab.freedesktop.org/drm/nouveau
07:22 airlied: Lyude: ^ also what combo of debug flags is good here?
07:22 UrbanMusic: and 2nd pastebin for same sections using both kernel-6.8.2-rt and kernel-6.9-rc2
07:23 UrbanMusic: https://pastebin.com/QqPFhNpn
07:23 airlied: I don't think it's config related
07:24 airlied: it might be worth getting dmesg from 6.6.26 and 6.7 with drm.debug=0x116
07:24 airlied: and trying to compare where it goes wrong
07:27 UrbanMusic: thanks airlied ill do that. do you know or could point me were to look, for what modules/helpers nouveau uses for displayport in post 6.7 kernels so I can im including
07:28 UrbanMusic: okay I can do set drm.debug=0x116 with 6.6.26 and ive got a 6.7, 6.8 and 6.9 kernels
07:30 UrbanMusic: I have also got "options nouveau mst=0" which came from a forum post were they got it working
07:31 UrbanMusic: ill disable it while debuging
07:40 airlied: UrbanMusic: they should all just be there, we don't mess with configs
07:47 UrbanMusic: my distro generic-config only had modules auto selected by drivers, so a few additional drivers were missing i2c, gpio and drm_bridge module were missing
07:48 UrbanMusic: right set that boot option for the 2 kernels back in a few mins ill get dmesg from them then log bk into channel
08:01 airlied: for nvidia it should select everything it needs itself
08:01 airlied: gpio and bridge aren't needed
08:01 airlied: i2c core should be all that is required
11:18 fdobridge: <m​ohamexiety> ...I have a bit of a rust<->C skill issue here. I want to use a function in Rust that's from a C header, so I added that entrypoint in the already existing `meson.build` file, under the list of allowed functions like this:
11:18 fdobridge: <m​ohamexiety> `'--allowlist-function', 'util_format_is_depth_or_stencil',`
11:18 fdobridge: <m​ohamexiety> but when I try to compile (after regenerating the entire build directory) I get hit by the same "function not found in this scope" error
11:19 fdobridge: <m​ohamexiety> when opening `nil_bindings.rs` which is autogenerated by rustbindgen, I find all the other entrypoints in the allowlist _except_ the one I added. so there's something I missed, but what?
13:22 fdobridge: <g​fxstrand> Yeah, that's because bindgen doesn't handle inline functions well. 😞
13:23 fdobridge: <g​fxstrand> Likely, the implementation of that function is trivial and you can just reimplement it in format.rs similar to `is_srgb()`
13:23 ad__: hi, so posted a v2 of the backlight-issue on ADA LOVELACE (AD107 MaxQ/Mobile chipset)
13:23 ad__: https://lists.freedesktop.org/archives/nouveau/2024-April/044390.html
13:24 ad__: My laptop now works great with nouveau, this eas my target, so no hurry at all in comments, but would be nice to get any feedback.
13:31 fdobridge: <g​fxstrand> `46/60 sessions passed, conformance test FAILED`
13:41 fdobridge: <g​fxstrand> I'm just gonna run with out fp16
13:53 fdobridge: <m​arysaka> oh fp16 is failing?
13:53 fdobridge: <g​fxstrand> It's not your fault
13:53 fdobridge: <g​fxstrand> It's test bugs
13:53 fdobridge: <g​fxstrand> The desktop GL tests are not designed for working `mediump`.
13:53 fdobridge: <z​mike.> were there any other issues besides the ones you have tickets for
13:54 fdobridge: <g​fxstrand> The sin/cos tests, apparently.
13:54 fdobridge: <g​fxstrand> I think all the trig ones should get the highp treatment across the board
13:54 fdobridge: <g​fxstrand> hrm...
13:55 fdobridge: <g​fxstrand> I wonder if we have an fp16 swizzle bug.
13:55 fdobridge: <z​mike.> sounds right
13:55 fdobridge: <g​fxstrand> that's possible, I suppose
13:58 fdobridge: <m​arysaka> It's quite possible we have another one of those yeah...
14:10 fdobridge: <z​mike.> @gfxstrand what is your exact command line for a failing run of https://gitlab.freedesktop.org/mesa/mesa/-/issues/10993
14:18 fdobridge: <g​fxstrand> Pretty sure it was just `./glcts -n TEST_NAME`
14:19 fdobridge: <g​fxstrand> You have to be in a Wayland build, though.
14:25 fdobridge: <z​mike.> I'm in a wayland build and it passes for me on every driver combo I've tested thus far except for radeonsi
14:25 fdobridge: <z​mike.> this is on my amd test machine
14:25 fdobridge: <z​mike.> it passes on zink too
14:26 fdobridge: <z​mike.> the difference I'm seeing is that radeonsi gets a swapchain format of `PIPE_FORMAT_B10G10R10A2_UNORM` while (zink/llvmpipe) use `PIPE_FORMAT_B8G8R8A8_UNORM`
14:26 fdobridge: <z​mike.> very strange
14:29 fdobridge: <g​fxstrand> That sound plausible. It fails on iris for me
14:29 fdobridge: <g​fxstrand> As well as every Zink I tried.
14:30 fdobridge: <z​mike.> weird that zink fails for you and not me
14:32 fdobridge: <m​ohamexiety> it's afraid of the chair
14:33 fdobridge: <z​mike.> makes sense to me
14:40 fdobridge: <g​fxstrand> I suspect it's because my Zink is running on a Wayland compositor running on Intel or something like that.
14:42 fdobridge: <z​mike.> oh
14:42 fdobridge: <z​mike.> that's illegal
14:43 fdobridge: <z​mike.> https://cdn.discordapp.com/attachments/1034184951790305330/1229441974268989540/9d9deb4712cc0eef6fe752decd8c9360.png?ex=662fb210&is=661d3d10&hm=233ad95e70a122babe5ba822c39e9cb2728fe27f56c58173c4877a34b61536a4&
14:46 fdobridge: <g​fxstrand> Wait, wut?
14:56 fdobridge: <z​mike.> you can't mix and match compositor/client between zink and not-zink
14:56 fdobridge: <z​mike.> otherwise you aren't guaranteed to get matching modifiers
14:56 fdobridge: <g​fxstrand> That's not how modifiers work.
14:56 fdobridge: <g​fxstrand> Modifiers exist precisely to let you mix and match
14:57 fdobridge: <g​fxstrand> If you can't mix and match, then someone's not implementing modifiers properly.
14:57 fdobridge: <z​mike.> well this is for the implicit modifiers case
14:57 fdobridge: <z​mike.> actually that probably doesn't affect anything here
14:57 fdobridge: <z​mike.> so nevermind
14:57 fdobridge: <g​fxstrand> Well yes, implicit is all kinds of problematic.
14:58 fdobridge: <g​fxstrand> For this case, 1010102 sounds like a very plausible culprit. What I saw looked very much like a rounding error. It could just be that the CTS shouldn't be run on anything but 8888 and 565
14:58 fdobridge: <g​fxstrand> (and 565 is questionable)
15:09 fdobridge: <s​amantas5855> 24 is the name of the vendor
15:09 fdobridge: <s​amantas5855> for some reason
15:10 fdobridge: <s​amantas5855> it should be NVK not the mesa version
15:47 fdobridge: <g​fxstrand> I can't wait until I get a successful 4.6 run...
15:47 fdobridge: <g​fxstrand> Mostly so I can have my test rig back. 😅
16:07 fdobridge: <g​fxstrand> @airlied If you wanted to look more at the fence signaling paths and figure out why I'm getting spurious timeouts, that'd be cool. They're making getting GL 4.6 results really frustrating. About one in 3 runs actually completes.
16:07 fdobridge: <g​fxstrand> Unfortunately, I don't have a reproducer besides "If you run the GL 4.6 CTS, it'll probably timeout after like 8 hours"
16:49 Lyude: airlied: the two you reviewed? I did push them, I don't remember which bra ch it was
16:49 Lyude: airlied: also for debugging that: 0x116
16:51 Lyude: btw airlied regarding the low memory issue from the other day w/r/t nouveau failing to do a level 7 allocation during runtime suspend: I tried running my patch for a while but once kvzalloc needed to actually allocate a noncontiguous page dma_map_single() refused to mmap it. So, I assume there's some specific way I should be mapping memory allocations to the GPU through the radix3
16:51 Lyude: page table we have access to?
17:01 Lyude: (maybe you'd also know dakr ? I'm basically just trying to switch nvkm_gsp_mem_ctor() from https://cgit.freedesktop.org/drm-misc/tree/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c over from using dma_alloc_coherent() to something else that will fallback to allowing for fragmented memor allocations since
17:01 Lyude: https://cgit.freedesktop.org/drm-misc/tree/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c#n2017 the allocation that we do in this function has a decent chance of failing on systems with low memory during runtime suspend - which I've seen a few times already)
17:12 ahuillet: Lyude : is that contiguous physical sysmem you're allocating that is giving you trouble?
17:12 ahuillet: you shouldn't need it to be contig?
17:13 Lyude: ahuillet: yeah I shouldn't, that's why I'm trying to figure out how to map noncontig memory here for the suspend/resume process
17:13 Lyude: (I haven't worked on this area of the kernel very often so I'm not super familiar with this)
17:16 Lyude: (also I may have said contiguous when I meant to say coherent)
18:36 airlied: Lyude: I think there are some vmalloc to sgtable helpers around
18:38 Lyude: alright, I think that gives me a decent idea of what to look for
18:38 fdobridge: <a​irlied> @gfxstrand my main fear is that it's an actual timeout, but there could be yet another race somewhere
18:38 Lyude: airlied: was that message aimed at me?
18:38 Lyude: or is that regarding the GL stuff
18:39 airlied: Lyude: nope that is GL stuff
18:39 Lyude: ah gotcha
18:39 airlied: dakr: can you cherry-pick the two nouveau fixes from misc-next into misc-fixes?
18:40 fdobridge: <g​fxstrand> @airlied I fear that, too, but I also don't have any reason why it would time out.
18:41 Lyude: airlied: will make sure to get the right branch next time btw
18:44 airlied: Lyude: you could probably cherry-pick them also actually
18:44 airlied: I think as long as you use -x it should be fine
18:44 Lyude: oh ok - I'll go do that now
18:47 Lyude: airlied: done, should be pushing tip now
18:52 fdobridge: <a​irlied> @gfxstrand my fear is that all the CPU threads end up blocking one thread from making progress, but 10s is a long time
18:52 fdobridge: <a​irlied> are the timing out tests pretty random?
18:53 fdobridge: <a​irlied> or are you doing single thread cts-runner?
18:56 Lyude: ...huh. airlied, maybe I'm misunderstanding something here but I just noticed it looks like that the actual large allocation which would hold all of the migrated vram during suspend/resume https://cgit.freedesktop.org/drm-misc/tree/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c#n2013 should be the one that's not happening through dma_alloc_coherent - and that the allocation which is
18:57 Lyude: failing seems to be a much smaller one where we just write some various GSP arguments for the GPU to enter suspend. I guess I'm confused - would such a small allocation still be likely to fail in a low memor situation>
18:57 Lyude: *?
18:57 Lyude: oh hold on nevermind
18:57 Lyude: i see I misread the backtrace whoops
19:00 airlied: Lyude: code in nvkm_firmware_ctor does vmalloc to sgtable stuff I think
19:01 Lyude: ooo that would definitely clarify things
19:01 Lyude: yep! there it is :)
19:02 fdobridge: <m​henning> @airlied not sure if this is the same bug Faith is seeing, but singe threaded vulkan cts runs typically give me timeouts in dmesg (typically about 3 or 4 timeouts in a 17-hour run). Seems completely random which test triggers it, re-running the test always passes, and it doesn't happen with multithreaded runs
19:19 Lyude: (I also think I get the general idea of how this mapping stuff works now :)
19:23 Lyude: alright - patch v2 done: https://paste.centos.org/view/289c8a00 gonna spin up an RPM build and give it a try
19:39 fdobridge: <a​irlied> okay single threaded dying is very strange alright
20:05 fdobridge: <g​fxstrand> Single-thread cts-runner. The only other thread is GNOME/Weston.
20:06 fdobridge: <k​arolherbst🐧🦀> sounds like the stuff I hit with the gl driver years ago
20:09 fdobridge: <a​huillet> where's the timeout coming from? some pushbuffer not making progress?
20:11 fdobridge: <g​fxstrand> I suspect it's an interrupt not making it through
20:12 fdobridge: <a​irlied> yeah I thought I fixed a race in that area already, but maybe I only started debugging it
20:13 fdobridge: <a​irlied> and it's a race on the intr block/allow stuff
20:13 fdobridge: <k​arolherbst🐧🦀> I think it's some kind of overflow
20:14 fdobridge: <k​arolherbst🐧🦀> it's not randomly happening, but after a while
20:14 fdobridge: <a​irlied> https://paste.centos.org/view/raw/04d2e33b
20:15 fdobridge: <a​irlied> might be worth a try if someone wants
20:15 fdobridge: <a​irlied> just realised I have that in my local kernel
20:20 fdobridge: <S​id> @ahuillet does openrm work without GSP? if yes, what firmware does it use then
20:20 fdobridge: <a​huillet> it does not
20:20 fdobridge: <S​id> what about the proprietary one?
20:20 fdobridge: <S​id> wanna test all scenarios for this bug report I just opened on the forums
20:21 fdobridge: <S​id> logic dictates proprietary *should* work, but I haven't used the proprietary one much since openRM released and am unsure 😅
20:22 fdobridge: <a​huillet> pretty sure it all goes through GSP on recent boards at least
20:23 fdobridge: <S​id> okie thanks
20:24 fdobridge: <S​id> just wondering if I should add anything to this report: https://forums.developer.nvidia.com/t/pci-pm-fails-with-modesetting-enabled-in-multi-gpu-config/289720
20:25 fdobridge: <a​huillet> "PCI power management" being RTD3?
20:25 fdobridge: <S​id> correct
20:27 fdobridge: <a​huillet> I assume nvidia_drm.modeset=1 implies that the GPU is driving the console and therefore can't be put to sleep?
20:27 fdobridge: <S​id> but the GPU is not the primary GPU
20:27 fdobridge: <a​huillet> except because it's not the primary GPU you're saying that's not the case in this instance?
20:27 fdobridge: <S​id> primary is intel iGPU
20:27 fdobridge: <S​id> yeah
20:27 fdobridge: <a​huillet> please update the report with exact laptop model, and dmidecode information
20:28 fdobridge: <S​id> on it
20:28 fdobridge: <a​huillet> I don't know this stuff well enough to answer, but I suspect the "it's not primary therefore it can sleep" assumption may not be as straightforward as that
20:28 fdobridge: <a​huillet> so it might well not be a bug, but it would be good to get this looked at.
20:28 fdobridge: <S​id> I mean, it does sleep correctly in x11
20:29 fdobridge: <S​id> if I follow the instructions in the readme: https://download.nvidia.com/XFree86/Linux-x86_64/550.67/README/dynamicpowermanagement.html
20:29 fdobridge: <a​huillet> that is not obvious from your report?
20:29 fdobridge: <S​id> will add
20:29 fdobridge: <a​huillet> that is not obvious from your report? (or maybe I can't read) (edited)
20:31 fdobridge: <m​tijanic> If you're bored, you could bpftrace the calls into openrm and/or gsp with and without the modeset toggle.
20:31 fdobridge: <m​tijanic> Actually, NVreg_RmMsg=":" will do the job just as well as bpftrace on openrm
20:32 fdobridge: <m​tijanic> Just make sure your kernel log buffer is large enough as it can get _very_ spammy.
20:33 fdobridge: <S​id> added everything to the `More Info` section of the report
20:34 fdobridge: <S​id> will do tomorrow, it is 0204 where I am and I have an 0800 class 😅
20:34 fdobridge: <m​tijanic> At the very high level, the GPU will go to sleep if either kernel or nvidia-powerd (or something) tells it to, _and nothing is calling into it to prevent it_.
20:34 fdobridge: <S​id> mhm
20:35 fdobridge: <S​id> manually `echo`ing `suspend` to `/proc/driver/nvidia/suspend` also did nothing, fwiw
20:35 fdobridge: <S​id> with modeset enabled, that is
20:36 fdobridge: <m​tijanic> Also, do you know if it doesn't go to sleep at all, or it gets woken up immediately?
20:36 fdobridge: <S​id> unsure
20:36 fdobridge: <S​id> I do know nvidia-smi is not the right way to check for sleep, since it wakes up the device, which is why I used `grep . /sys/bus/pci/devices/*/power/runtime_status`
20:39 fdobridge: <m​tijanic> Hrm, I'm not sure if there's a way to poke at the device info without waking it on linux. We have it on Windoze but I think it was just too much hassle to port that particular toggle to linux. But maybe one of those non-rmapi ioctls can give the info..
20:39 fdobridge: <m​tijanic> I'll check in a bit.
20:40 fdobridge: <S​id> I think using the sysfs interface doesn't wake up the device, because if I set that command to `watch -n 0.1` it keeps showing `suspended` on the GPU with modesetting disabled
20:41 fdobridge: <m​tijanic> I'm more thinking about it possibly giving incorrect data..
20:42 fdobridge: <S​id> if my laptop's fans are anything to go by, I'd trust it :myy_TinyGiggle:
20:42 fdobridge: <S​id> but yeah
20:42 fdobridge: <S​id> funky issue
20:42 fdobridge: <m​tijanic> I trust your bug report, it sounds totally plausible.
20:43 fdobridge: <S​id> I imagine it'll also be a problem for enterprise, which run things headless and with GPU arrays
20:43 fdobridge: <m​tijanic> There's just a dozen ways I can see it happening, just off the top of my head.
20:43 fdobridge: <S​id> yeah, also fair
20:46 fdobridge: <m​tijanic> For example, as Mary found out the hard way the other day, any userspace access to mmaped GPU memory will wake it.
20:46 fdobridge: <m​tijanic> So if your toggle ends up invoking anything that occasionally touches VRAM, no sleep for you.
20:46 fdobridge: <m​tijanic> Even if there's no apparent communication with the driver at all.
20:47 fdobridge: <m​tijanic> (this goes through the fault() handler)
20:48 fdobridge: <m​tijanic> Also, 99% of ioctls (by type, not by frequency) will wake it even if all they do is read cpuside state that's not tied to any GPU.
20:49 fdobridge: <k​arolherbst🐧🦀> though a driver can do it more fine grained if it wants to
20:50 fdobridge: <S​id> :notlikethishisui:
20:51 fdobridge: <k​arolherbst🐧🦀> but anyway, all those fancy "stat" apps are responsible for 50% of all battery drain
20:52 fdobridge: <m​tijanic> Oh, _absolutely_. Dynamic power management is very much happy-path optimized and straying from that is a good way to get Dwarf Fortress levels of Fun real quick. But, it's been getting better, bumpy ride that it was with GSP.
20:53 fdobridge: <m​tijanic> Not fun suspending a GPU when most of the state is kept on the GPU/GSP.
20:53 fdobridge: <k​arolherbst🐧🦀> main reason we return EAGAIN or whatever on all hwmon interfaces in nouveau when the gpu sleeps
20:54 fdobridge: <S​id> I should check if the same behavior exists on nouveau with and without GSP
20:54 fdobridge: <S​id> but
20:54 fdobridge: <S​id> that's a job for tomorrow
20:54 fdobridge: <m​tijanic> Recent NV drivers actually have a sysmem page that contains the instrumentation stats that the GPU pushes to. If the GPU is sleepy, it doesn't get updated.
20:54 fdobridge: <k​arolherbst🐧🦀> nice
20:54 fdobridge: <m​tijanic> But moving the libs and tools to use that is a bumpy road.
20:54 fdobridge: <k​arolherbst🐧🦀> we still need to wire up hwmon for gsp though
20:55 fdobridge: <m​tijanic> You're still prototyping on 535?
20:55 fdobridge: <S​id> oh
20:55 fdobridge: <S​id> will /sys/bus/pci/devices/*/power/runtime_status not work?
20:56 fdobridge: <k​arolherbst🐧🦀> it should, why?
20:56 fdobridge: <S​id> then I don't need hwmon to test :3
20:56 fdobridge: <k​arolherbst🐧🦀> true
20:57 fdobridge: <m​tijanic> You can't really ask the GSP if the GPU is suspended or not though.
20:57 fdobridge: <a​irlied> it's quite hard to do fine grained pm wakeups, due to lock ordering
20:57 fdobridge: <a​irlied> if you try and wake up a gpu after you've taken a bunch of locks, it doesn't end well
20:57 fdobridge: <S​id> not aiming for that either, just wanna observe behavior with various scenarios
20:58 fdobridge: <a​irlied> hence why it happens at ioctl time
21:30 fdobridge: <k​arolherbst🐧🦀> the pci_dev already knows
22:21 Lyude: we need more of an ability to back off and suspend userspace requests tbh
22:21 Lyude: it's an issue with DP aux devices as well