01:03 Wolf480pl: good morning!
01:04 Wolf480pl: no karolherbst around? How do I know what addresses to nvapeek to then...
04:11 Eliasvan: pmoreau: hi
04:14 Eliasvan: pmoreau: I did a nvapeek 101000 on the GT620M, and the result is 80858098
04:21 pmoreau: Eliasvan: Hello!
04:22 pmoreau: Thank you for the information! :-)
04:43 karolherbst: Wolf480pl: there?
04:43 Wolf480pl: yeah
04:44 karolherbst: nvapeek 20340 8
04:44 Wolf480pl: is it ok if I do it on 4.2.5 kernel?
04:45 karolherbst: doesn't matter, you should only do that on the nvidia driver unter full load
04:54 Wolf480pl: should I keep launching glxspheres instances until the fps drops, to make sure it's under full load, and then nvapeek ?
04:57 karolherbst: no
04:57 karolherbst: just disable vsync
04:57 karolherbst: with bumblebee you do it soly on the intel side though
04:57 karolherbst: vblank_mode=1 primusrun glxspheres
05:01 Wolf480pl: ok, 1 glxspheres at ~400fps and the result of peek is:
05:01 Wolf480pl: 00020340: 00000060 00000044
05:01 karolherbst: wow
05:01 karolherbst: that's much more
05:03 Wolf480pl: so, what do we do now?
05:03 karolherbst: 1.025V
05:04 karolherbst: well you can poke the values with nouveau
05:04 Wolf480pl: is it safe?
05:04 karolherbst: yeah
05:04 karolherbst: but it gets reset every time you change the cstate/pstate or the card goes off
05:05 karolherbst: nvapoke 20344 44
05:05 karolherbst: after going to 0f
05:05 karolherbst: you should have a look at the temperatur though then
05:05 karolherbst: but as long as it stays under 80°C everything is alright
05:06 Wolf480pl: config=War00C800_0=1 pstate=1 run_pm=0 ?
05:07 karolherbst: runpm
05:07 karolherbst: and then you should be able to run something on 0f pstate without the card crashing
05:07 karolherbst: in theory
05:08 karolherbst: Wolf480pl: I will be away for a bit though, but I think you'll manager
05:08 karolherbst: just verify with sensors
05:12 Wolf480pl: voltage 1.02 V, temp 69 *C
05:14 Wolf480pl: yay, glxgears are running with DRI_PRIME=1, 10k fps, GPU clock 966 MHz core, 5GHz mem, voltage 1.02V, temp 74 *C
05:15 Wolf480pl: but glxspheres crashed it
05:16 Wolf480pl: TRAP ch 4 [... glxspheres]
05:16 Wolf480pl: ROP0 80000000 80000001
05:16 Wolf480pl: ROP1 80000000 80000001
05:16 Wolf480pl: ROP2 80000000 80000001
05:28 Wolf480pl: btw. the cstates file had a voltage: 44 in it, was it the same as that 44 in nvapoke?
05:48 Wolf480pl: karolherbst ?
05:53 Eliasvan: pmoreau: I sent you a mail with the info
06:10 pmoreau: Eliasvan: Yep, I saw it. Thanks!
06:11 Eliasvan: pmoreau: no problem! If you need anything else, just ask!
06:11 pmoreau: :-)
06:13 Eliasvan: At first, it seemed impossible to get the Nvidia card being detected again (despite having set the Switchable option in the bios), but after going in Windows and rebooting+shutting down, it seemed to detect the card again, kind of weird...
06:15 pmoreau: Weird…
06:27 karolherbst: Wolf480pl: no, the voltage values is a reference in the voltage table most likely
06:27 karolherbst: Wolf480pl: strange that glxspheres64 got crashed
06:27 karolherbst: Wolf480pl: please try out 0e pstate and nvapoke 20344 44
06:28 karolherbst: Eliasvan: I noticed, that when the nvidia card was off and I kexec into another kernel, the gpu isn't detected on my system anymore
06:29 karolherbst: so a cold reboot is somehow required when the card went missing
06:29 karolherbst: also never go into suspend or reboot while the card being off, usually the kernel will power on the card before doing so
06:29 Eliasvan: myeah, weird that a reboot from linux did not do the trick though
06:29 karolherbst: a soft reboot won't do it
06:29 Eliasvan: oh, ok
06:30 karolherbst: you need uefi to do it's stuff first
06:30 karolherbst: which usually means a cold reboot
06:30 Eliasvan: yeah, that's likely to be the cause, I only tried soft rebooting in Linux, and a hard reboot in Windows
06:30 karolherbst: yeah
06:30 karolherbst: bumblebee also powers onf the gpu on suspend and shutdown
06:31 karolherbst: because there are issues with that on some laptops
06:32 Eliasvan: oh, what I also sometimes see (but it's unrelated to the GPU), is that a poweroff from Linux initiates a reboot instead!
06:33 Eliasvan: only way around that, is to boot into Windows and do a shutdown from there
06:33 Eliasvan: (or simply pull the powerplug without the battery inserted)
06:33 karolherbst: that's strange
06:34 karolherbst: could be some stupid script on shutdown or something else, you could check dmesg from the previous boot in the logs
06:34 Wolf480pl: btw. does it matter if x86/PAT: nvapoke:5517 conflicting memory types e0000000-f0000000 write-combining<->uncached-minus
06:34 Wolf480pl: x86/PAT: nvapoke:5517 conflicting memory types e0000000-f0000000 write-combining<->uncached-minus
06:34 Wolf480pl: reserve_memtype failed [mem 0xe0000000-0xefffffff], track uncached-minus, req uncached-minus
06:34 Wolf480pl: ?
06:34 Wolf480pl: in dmesg?
06:35 Wolf480pl: (the voltage did go up tho)
06:35 Eliasvan: karolherbst: true; I think it's bios ACPI related
06:40 Wolf480pl: karolherbst, id also froze on 0e
06:43 Wolf480pl: I'm gonna try 0a
06:48 Wolf480pl: it froze
06:48 Wolf480pl: on glxspheres
06:49 Wolf480pl: this time I made sure I can ssh to it
06:49 Wolf480pl: systemd-logind taking 100% CPU
06:49 Wolf480pl: and ofc lots of TRAP ROP SCHED_ERROR
07:23 karolherbst: mhhh
07:23 karolherbst: when it also froze with 0a there is something fishy going on
07:23 karolherbst: how is 07?
07:27 Wolf480pl: 07 is ok
07:27 Wolf480pl: without nvapoke
07:42 Wolf480pl: with nvapoke too
07:43 Wolf480pl: btw. are these sensors here to stay, or are they just a debug feature?
07:43 Wolf480pl: (I mean the voltage and temperature sensors)
07:46 karolherbst: the temperature is there already with stock
07:46 karolherbst: the voltage will come sooner or later too
07:46 karolherbst: it is usefull enough
07:46 Wolf480pl: cool
07:47 Wolf480pl: as I've said, 07 works fine with and without nvapoking that register
07:48 karolherbst: mhhh
07:48 karolherbst: then there is something odd with the core
07:48 karolherbst: okay
07:48 karolherbst: switch to 0f pstate
07:48 karolherbst: and give me the content of cstate
07:49 karolherbst: ohh wait
07:49 karolherbst: I have it already
07:49 Wolf480pl: you do?
07:49 karolherbst: its in the vbios
07:50 karolherbst: okay
07:50 karolherbst: switch to 0f
07:50 karolherbst: echo 01 > cstate
07:50 karolherbst: and then try to run glxspheres
07:50 karolherbst: ohh wait
07:50 karolherbst: maybe cat pstate first and check the clocks
07:50 karolherbst: before running glxspheres
07:51 Wolf480pl: 614 MHz core, 5GHz RAM
07:52 Wolf480pl: spheres run ok
07:52 Wolf480pl: at 1k fps
08:00 Wolf480pl: karolherbst ^
08:00 karolherbst: okay
08:01 karolherbst: then increase the number you write into cstate until it crashes
08:01 karolherbst: while running glxspheres
08:01 Wolf480pl: like, have it running all the time?
08:02 karolherbst: yes
08:10 Wolf480pl: it was on 26 when it froze
08:10 Wolf480pl: but not instatly after setting it to 26
08:15 Wolf480pl: karolherbst ^
08:17 karolherbst: okay
08:18 karolherbst: then try this out: change to 0f pstate, write 26 into cstate, do nvapoke 20344 44
08:18 karolherbst: then try out glxspheres
08:27 Wolf480pl: it froze after a few seconds
08:27 Wolf480pl: but the mouse is still moving
08:34 Wolf480pl: karolherbst ^
08:49 karolherbst: yeah
08:49 karolherbst: the mouse should always still moving
08:49 karolherbst: because the nvidia card does nothing for the cursor
08:50 Wolf480pl: I'm wondering if the whole-screen-freezing is because I use compiz... but compiz doesn't run with DRI_PRIME set...
08:51 karolherbst: mhhhh
08:51 karolherbst: could be because of compiz
08:51 karolherbst: it still needs to read the content of the windows somehow
08:51 karolherbst: and maybe compiz just does a really bad job here
08:51 karolherbst: maybe you are able to switch to tty
08:51 karolherbst: and kill compiz
08:52 Wolf480pl: I'm not able to switch to a tty in reasonable time, but I can ssh
08:52 karolherbst: either way, if nouveau somehow messes up the intel card I would just say it is a bug which should be fixed
08:53 Wolf480pl: should I test something else with the pstates?
08:53 karolherbst: mhhh
08:53 karolherbst: I wonder why it is that unstable for you
08:53 karolherbst: even 0a should be somehow stable
08:53 karolherbst: I don't think it is memory related
08:54 Wolf480pl: 0a 0e and 0f have same core freqs, just different memory freqs, so I guess it's core-related
08:55 Wolf480pl: also, maybe the blob didn't get all the way to cstate 28
08:55 Wolf480pl: only to 25
08:55 Wolf480pl: so we'd need even more voltage
08:59 karolherbst: maybe
08:59 karolherbst: you could check with optirun -b none nvidia-settings -c :8
08:59 karolherbst: there under powermize you should see what clocks the driver is using
09:02 Wolf480pl: should I set it to "prefer max performance" ?
09:04 karolherbst: yeah, but that won't help much on its own
09:04 Wolf480pl: I didn't, just ran `vblank_mode=1 primusrun glxspheres`, and nvitia-settings says 967 MHz core, 5GHz mem, perf.level 3
09:04 karolherbst: maybe it does for you
09:04 karolherbst: but it shouldn go to max
09:04 karolherbst: mhhh
09:04 karolherbst: okay
09:04 Wolf480pl: I'm gonna nvapeek just to make sure it's 44
09:05 Wolf480pl: wtf.. it says '...'
09:05 karolherbst: 20344
09:05 karolherbst: ?
09:06 Wolf480pl: sudo ./nvapeek 20334
09:06 Wolf480pl: ...
09:06 karolherbst: 20344
09:06 Wolf480pl: oh
09:06 Wolf480pl: sorry
09:06 Wolf480pl: yeah, it is 44
09:07 Wolf480pl: gotta go, I'll be back in 2 hours
09:11 pmoreau: imirkin: Do you have any pointers on how to call a function in NV50 IR?
09:13 pmoreau: I wasn't planning to investigating that right now, but… OpenCL uses functions to retrieve local/global ids…
09:15 pmoreau: Oh, I missed it in from_tgsi.cpp
09:15 pmoreau: Having a look…
09:54 pmoreau: imirkin: How do you return a value and how do you retrieve a function's return value?
10:20 pmoreau: imirkin: Oh, I have some more questions for you! :D
10:21 pmoreau: 1) "get_pi:11 (in $r0)" What does "in $r0" mean? And what is the label associated to the function (I put the SPIR-V function id in it)?
10:22 pmoreau: 2) "BB:0 (1 instructions) - df = { }" What is the df attribute?
10:45 Wolf480pl: karolherbst, I'm back, do you want me to do some more tests?
10:46 karolherbst: Wolf480pl: no idea yet
10:49 karolherbst: mupuf_: any idea why some really high clocks aren't stable with nouveau allthough the clock and voltage are the same for nouveau and nvidia?
10:49 karolherbst: usually the two or three highest cstates are failing
10:49 karolherbst: Wolf480pl: at least you know which cstates kind of work for you :D
10:50 Wolf480pl: yeah
10:50 karolherbst: it's not optimal yt
10:50 karolherbst: *yet
10:50 Wolf480pl: it's not like I have a reason to use them any time soon
10:50 karolherbst: but you should easily reach 50% nvidia performance
11:00 pmoreau: imirkin: I think I found how to deal with returning values / accessing the returned value. :-)
11:13 pmoreau: imirkin: Oh, and I also understood what the "in $r0" was :D Should have been obvious… --"
11:37 imirkin: pmoreau: df = dominator frontier. it's determined as part of the to-ssa pass.
11:41 pmoreau: dominator frontier? interesting name! :D
11:41 imirkin: pmoreau: a block dominates another block if all paths to block B have to go through block A
11:42 pmoreau: karolherbst: Solved my problem where Nouveau wouldn't load when the blob was installed: turned out I had forgotten to blacklist the blob on this partition… --"
11:42 imirkin: so for example if you have like... A if { B } else { C } D
11:42 imirkin: then B/C/D are all dominated by A
11:42 pmoreau: Ok
11:42 imirkin: but neither B nor C dominates D
11:42 pmoreau: Understood, thanks for the explanation :-)
11:43 imirkin: it's a real thing in compilers... not something calim made up. you can search around for it.
11:44 glennk: compilers are a general orgy in graph theory
11:45 pmoreau: Cool! Calling functions work!
11:45 pmoreau: I'll have a look around on the internet for it
11:45 imirkin: that's... surprising. that code hasn't been used in ages
11:45 imirkin: if ever
11:45 imirkin: i guess we call fixed functions
11:46 imirkin: which is sorta the same idea
11:46 pmoreau: Here is the code generated: "10008004 10008200 10000809 4400c780 20005003 00000000 10000005 0403c780 d0000405 a0c00781 10108001 040490ff 30000003 00000780"
11:46 pmoreau: No parameters yet
11:47 imirkin: nice
11:57 pmoreau: Let's add one param now…
15:49 pmoreau: \o/ Finally got it working, to call a function with an argument
15:50 pmoreau: Making some many mistakes on writing the SPIR-V binary… hopefully, there will soon be an LLVM IR => SPIR-V translator.
15:51 imirkin: or OpenCL -> SPIR-V
15:52 pmoreau: Right, but some people from the Khronos consortium were working on the former, so it should appear at some point
15:53 pmoreau: But I'll gladly have a look at anything that could write SPIR-V for me :D
15:54 imirkin: "some point"
15:55 pmoreau: ;-)
23:15 karolherbst: mupuf_: there?
23:16 mupuf_: karolherbst: yop
23:16 karolherbst: mupuf_: can you think about a reason a core being unstable not caused by voltage at higher clocks?
23:17 karolherbst: mhh rephrase:
23:17 mupuf_: what kind of instability do you get_
23:17 karolherbst: what can cause an unstable gpu core, when the voltage is the same as with nvidia
23:17 mupuf_: ?
23:17 karolherbst: mupuf_: well running glxspheres locks up the core
23:17 karolherbst: Wolf480pl had problems
23:17 karolherbst: on the two or three highest cstates
23:17 mupuf_: do you run glxsphere long after reclocking?
23:18 karolherbst: mhh, does it matter?
23:18 karolherbst: but it happens when reclocking while running and when running some seconds after reclocking
23:18 karolherbst: he gets TRAP and ROP0 80000000 80000001
23:19 karolherbst: and famous sched errors
23:19 karolherbst: his gpu is pwm based by the way
23:19 karolherbst: and the voltage table looks funny
23:19 karolherbst: like no entry
23:20 karolherbst: I've added the vbios of this card
23:20 mupuf_: ok, I saw you pinged me during the week end
23:20 mupuf_: but I am hosting a friend
23:20 karolherbst: I see
23:20 mupuf_: so, can't do much
23:20 karolherbst: ok
23:21 karolherbst: but you have no idea what can cause this?
23:21 karolherbst: we tried the same pwm value the nvidia driver uses and still he gets gpu crashes
23:21 mupuf_: well, maybe nvidia reaches the same frequency as us but does so differently
23:21 karolherbst: mhhh
23:21 karolherbst: but it seems pretty stable on slightly lower clocks though :/
23:21 mupuf_: and maybe the other clocks are not set in the same way
23:22 karolherbst: ohh
23:22 mupuf_: well, there are funny conditions for stability
23:22 mupuf_: and we do not know about them
23:22 karolherbst: you mean the blob does something after a special threshold nouveau doesn't?
23:22 mupuf_: yes
23:22 karolherbst: okay makes sense
23:22 karolherbst: it's the same with the memory too
23:23 karolherbst: for fun I could get my card into this high clock and see what nouveau does :D
23:23 karolherbst: funny enough
23:23 karolherbst: the highest cstate in the vbios is never used by the blob
23:24 karolherbst: but also not by nouveau
23:24 mupuf_: well, I wonder if we should write a tool that would dump the raw values of all the PLLs
23:24 mupuf_: and divs
23:24 mupuf_: and stuff like that
23:25 karolherbst: yeah
23:25 karolherbst: this helped me a lot while doing this gddr5 fix
23:25 mupuf_: and we could parse that on the developer's machine
23:25 mupuf_: and we could synchronize it with the perf lvl exposed by nvidia and request a reclock
23:26 mupuf_: we used to have a tool like that that would just annotate a mmiotrace
23:26 karolherbst: how do you request a reclock on nvidia?
23:26 mupuf_: via the library used by nvidia-setting
23:26 mupuf_: it is all open source
23:27 karolherbst: welll I don'T think it's that easy on newer cards anymore, but I could be wrong
23:27 karolherbst: because there is no "direct" reclocking anymore
23:28 mupuf_: you can force it to the max speed
23:28 mupuf_: and it will slowly downclock down
23:28 mupuf_: and if you have the coolbits
23:28 mupuf_: you can do a 2-dimensional search
23:28 mupuf_: and find thresholds
23:28 karolherbst: I can'T force it to max speed either
23:28 mupuf_: indeed
23:29 karolherbst: if I set it to "prefer maximum speed" it goes to 705MHz
23:29 karolherbst: allthough 862MHz is max
23:29 mupuf_: right, you need a fake load for that too
23:29 karolherbst: yes
23:29 karolherbst: mess up all the counters :D
23:31 karolherbst: mupuf_: clocks in the nouveau code are usually in kHz?
23:32 mupuf_: yes, they are IIRC
23:35 mupuf_: but the tool to dump the values should not try to parse anything
23:35 mupuf_: since we may find mistakes in the clock tree parsing
23:36 karolherbst: right
23:36 karolherbst: hey, nouveau adjust the highest cstate to the pstate or boost ranges :/ messy
23:36 karolherbst: and I thought I could simply tinker with the cstate parsing :D
23:44 karolherbst: mupuf_: card crashed at 923 MHz
23:44 karolherbst: 911 MHz was fine
23:44 imirkin: airlied: any ideas about https://bugs.freedesktop.org/show_bug.cgi?id=91972 ? very odd stuff. haven't tried to repro tbh...
23:45 karolherbst: same ROP values: ROP0 80000000 80000001
23:51 karolherbst: mupuf_: yep, after a specific frequency, even a higher voltage doesn't help anymore
23:51 karolherbst: nice
23:52 airlied: imirkin: no ideA
23:53 airlied: I wonder what negatvie value is getting multiplied
23:53 imirkin: odd though, right?
23:53 imirkin: well, i grepped around and it seems like it must be sys_pitch
23:53 imirkin: since the other value is unsigned
23:54 imirkin: ... unless i grepped wrong for the types