01:17 mupuf: fun! As I was tuning my model for the fan issue, it worked beautifully until ... 1024
01:17 mupuf: that's oldly specific, isn't it? :D
01:18 mupuf: I guess I should stop using floats and just use some bit manipulation
01:40 mupuf: Yeah, seems like I got the idea right. I just need to come up with the exact same way of computing the parameters as nvidia
01:47 imirkin: mupuf: provide raw data if you need help :)
01:55 mupuf: imirkin: I will collect a little more data and then open everything
01:55 mupuf: that will wait for the week end though, it is a bit late now
01:56 mupuf: thanks for proposing your help though
09:00 karolherbst: mupuf: need help? I think I already did something like that :p
09:01 mupuf: karolherbst: yeah, I can share my program and data already. But I need more traces, I only have 3 now and it is not sufficient for fixing one parameter
09:01 mupuf: However, fixing the period would be beneficial and can be done now
09:02 karolherbst: I see
09:03 karolherbst: but why do you use traces for that?
09:04 mupuf: karolherbst: http://fs.mupuf.org/mupuf/nvidia/6b13.tar.gz
09:05 mupuf: remember the nature of the parameter, it is used to compute the duty for 0% fan speed
09:05 mupuf: so, each data point required faking the bios
09:05 mupuf: the 3 traces that I have are for different frequencies of PWM
09:05 mupuf: because it influences both the period and amplitude of the change
09:06 mupuf: so, to make one trace, it is something like 6h of work for the machine
09:06 mupuf: and I need to make a few full ones more
09:07 mupuf: and then I will make short ones just to test my code that computes the offset
09:07 mupuf: to find where the value changes
09:07 mupuf: that's it
09:08 mupuf: https://hastebin.com/ucogedazej.py <-- the model I came up with which is almost perfect for 16384Hz
09:08 mupuf: it starts screwing up at 6b13=1024
09:12 mupuf: karolherbst: welcome to the fun club :D
09:16 karolherbst: mhh why can't you just peek the values?
09:16 karolherbst: ohh wait, gpio stuff?
09:16 mupuf: because I am not yet at the stage where I want to test that for every fan speed I compute the speed properly
09:17 mupuf: I am first computing the first step: 0%
09:17 mupuf: then 100%
09:17 mupuf: and then any value in between
09:17 karolherbst: sure, but why does it have to be a trace?
09:17 mupuf: it is so much faster, re-read what I wrote ;)
09:18 mupuf: too many dimensions, too long to test
09:18 karolherbst: ohh I see
09:18 mupuf: it takes 6h to create one trace
09:18 karolherbst: so doing peeks is actually slower than creating one trace
09:18 mupuf: I checked, it is repeatable
09:18 mupuf: it is just as fast ... except I only have to do it once ;)
09:31 karolherbst: I don't get it. you could just read out the values from a script or something, I don't see what benefits a mmiotrace gives you here
09:32 karolherbst: of course you can have one trace with different vbios, but that doesn't matter if you have a smart script
09:47 vita_cell: karolherbs need a recommendation, buy new PSU for gtx770 4gb, or buy RX 460-470 4gb, always using open-sourced drivers
09:48 karolherbst: your choice
09:48 vita_cell: performance?
09:50 karolherbst: well, the amd mesa part is superior
09:50 vita_cell: performance with steam games, like
09:50 vita_cell: CS:GO, left4dead
09:51 vita_cell: gtx770 worked great, but sometimes FPS drops are huge, in situations when much people shooting, or explosions
09:52 vita_cell: even with lower resolutions
09:52 karolherbst: tried the 64bit binaries?
09:54 vita_cell: I can not remember it, and now I can not to test it
10:02 karolherbst: I think Tom^ tested it once and said that performance was better with 64 bit, but we didn't check why that is
10:23 mupuf: karolherbst: I am not making an mmiotrace, sorry for the confusing terms
10:23 karolherbst: ohhh I see
10:23 mupuf: by trace, I meant peeking the values at the right time and storing them in a file
10:23 karolherbst: so you mean trace as in dumping values
10:23 karolherbst: k
10:23 mupuf: yeah
10:24 karolherbst: yeah, that makes sense then :D
10:24 mupuf: goodie
10:24 mupuf: sorry
10:24 karolherbst: I thought you did 6h a complete mmiotrace and parse the stuff out of it :D
10:24 mupuf: this is just a giant for loop
10:24 mupuf: ah ah, no
10:24 mupuf: that would be weird and would not work because I am changing the bios for every data point
10:24 karolherbst: well it would work
10:24 karolherbst: you can remove nvidia while you trace
10:25 mupuf: ah ah
10:25 karolherbst: but storage is a problem
10:25 mupuf: I "flashed" the bios about 20k times to get all the datapoints
10:25 mupuf: and I am far from what's needed
10:25 mupuf: this is ridiculous, isn't it?
10:26 karolherbst: :D
10:26 karolherbst: I think for my stuff I did it with like 100 values in total?
10:27 karolherbst: but I also did this by hand, soo :/
10:38 mupuf: yeah, but you got the formulas from tegra too, that helps :p
10:38 mupuf: and if you screw up a little bit, it is OK because your functions are continous
10:39 mupuf: unlike mine :s
10:39 mupuf: makes sense?
10:40 mupuf: an off by one can lead to a difference of pwm_div / 2.5
10:40 mupuf: AKA, a lot!
10:40 mupuf: difference between a fan running silently and one at full speed when you have fucked up fans like my nvc1
10:52 karolherbst: uhhh well
10:52 karolherbst: the tegra ones were only a bit usefull
10:53 karolherbst: basically I had to figure out the conbinations myself
10:53 karolherbst: :D
10:53 karolherbst: right
10:59 mupuf: well, we just have different types of fun :D
10:59 mupuf: for this particular case, because it is strongly discontinuous
11:00 mupuf: because of ... reasons?
11:00 mupuf: seriously, why couldn't they have a bijective function?
11:00 mupuf: too simple?
11:01 mupuf: and just imagine if I had to do this on maxwell 2
11:01 mupuf: :D
11:02 mupuf:would have to hardcode the cases because I could not make sense of the values without thousands of samples
11:03 mupuf: which, honestly, I may do anyway in the end if I get stuck
11:03 mupuf: and fallback to my model otherwise
11:04 mupuf: how much stupider could this fan situation gets
11:04 mupuf:really thinks that the engineers working on this are making it way more complex than necessary
11:04 mupuf: 5 different PWM controlers, GPIO routing, insane clock tree until recently, and now insanity in the vbios
11:05 mupuf:would not be surprised if they had a team of "expert" to deal with this, and they were just trying to keep their job
11:05 mupuf: oh, I forgot about the trip points too :D
11:06 mupuf: where you wait for certain temperatures before increasing the fan speed
11:54 karolherbst: mupuf: fun :D
11:54 karolherbst: :D
11:54 karolherbst: well
11:54 karolherbst: I thought the one fan manamgent table makes sense
11:54 karolherbst: three points
11:55 karolherbst: some way to calculate in between
11:55 karolherbst: sane
11:55 mupuf: yeah, it is overkill, but whatever.
11:55 mupuf: trip points made no sense
11:55 mupuf: having different points for linear interpolation, makes more sense
11:56 mupuf: this way, you can keep it quiet under 60, and ramp up more quickly afterwards
19:31 karolherbst: imirkin: is there anything holding the postraload propagation stuff?
19:32 imirkin_: lack of review?
19:32 karolherbst: I see
19:32 imirkin_: i dunno, i kinda lost track of it tbh
19:32 imirkin_: ping me again tomorrow
19:32 karolherbst: well I did a piglit run on my nve6 and no regression
19:32 imirkin_: i don't have time to look this second
19:33 karolherbst: by the way, to which time zone related are your "tomorrows" in general?
19:33 imirkin_: America/New_York
19:33 karolherbst: k
19:34 karolherbst: so no big difference (-6)
19:34 imirkin_: search for "time in nyc" on google to find out what time it is for me :)
19:34 karolherbst: already did
19:34 karolherbst: searched for new york before asking actually
19:34 karolherbst: I just didn't know where you live
19:35 imirkin_: well, the whole state is on the same timezone :)
19:35 karolherbst: sure, but I didn't even now which state
19:35 imirkin_: ahh heh ok
19:35 karolherbst: you could have lived in alaske for all I know
19:35 karolherbst: *alaska
19:35 imirkin_: or hawaii
19:35 imirkin_: although my IP address would probably indicate otherwise
19:35 karolherbst: well, no dev lives in hawaii
19:35 karolherbst: too hot
19:36 imirkin_: i've never been, but from what i hear, it's actually quite nice there
19:36 Yoshimo: an ip adress is not much of an indicator of where you really are
19:36 karolherbst: sure, still hotter than where I live
19:36 imirkin_: Yoshimo: it doesn't have to be, esp if you're hiding
19:36 imirkin_: but i'm not [hiding]
19:36 Yoshimo: the geolocation for my ip is way off on official maps, even without vpn or tor ;)
19:37 Yoshimo: anyway, i guess karol you didn't have any fresh ideas for pmu and maxwell lately?
19:37 karolherbst: imirkin_: hawaii is like 18°F hotter than here
19:38 karolherbst: in summer
19:38 karolherbst: 40°F in winter :D
19:46 mupuf: karolherbst: imirkin is a civilized person, he uses celcius like the rest of the world ;)
19:47 karolherbst: well the main reason was, the wiki page had only °F values for hawai
19:47 mupuf:remembers talking about it with him when I visited NY
19:47 mupuf: ACK
19:47 karolherbst: soooo, I can't handle °F
19:47 karolherbst: but the hamburg page actually had both
19:49 karolherbst: mhh, it would be so nice to base nvbios on top of the vbios subdev :/
19:53 mupuf: karolherbst: you are not the first one to think about this
19:53 karolherbst: I know
19:54 karolherbst: and skeggsb even said he wanted to work on that
19:54 mupuf: and actually, the current design of nouveau would make it work
19:54 mupuf: yeop
19:54 karolherbst: yeah
19:54 karolherbst: maybe we should just do it
19:54 imirkin_: well really you'd just write a new nvbios :)
19:54 karolherbst: and just add nvbios to the nouveau repository
19:54 karolherbst: imirkin_: and use nouveau code
19:54 imirkin_: right
19:54 karolherbst: which would be the point
19:54 imirkin_: i thought he had that somewhere
19:54 karolherbst: to have the tables already in the module
19:55 mupuf: so, how about I start bisecting the best factor to lower the error for the fan?
19:55 mupuf: why do this thing manually when I can use a machine to do the work for me :D
19:55 karolherbst: :D
20:12 karolherbst: mupuf: and actually, with a userspace nvbios built upon nouveau, it would actually make sense to run a fuzzer on top of that
20:13 imirkin_: to stop it from crashing from bad vbiosen? :)
20:13 karolherbst: exactly!
20:13 imirkin_: we crash with good vbiosen
20:13 imirkin_: ;)
20:13 mupuf: hehe
20:13 karolherbst: that we would catch as well
20:13 mupuf: just like the canonical implementation :D
20:13 karolherbst: :D
20:13 imirkin_: [not in the vbios parser, just in general]
20:14 karolherbst: sure
20:14 karolherbst: wow
20:14 imirkin_: while i have no objections to hardening nouveau
20:14 karolherbst: first crash with glsl_compiler after 5 minutes with afl
20:14 karolherbst: that's good
20:14 imirkin_: i think it's harder to find a way to use nouveau without crashing, than to find a way to crash nouveau...
20:14 karolherbst: I guess that's the other issue I already reported.. sight
20:15 karolherbst: yep, it is
20:15 karolherbst: "ive^4(-5, -2, -1, 0)" -> crash
20:15 imirkin_: ah yeah. a function with an integer name
20:15 karolherbst: that's not that ppoint though
20:16 karolherbst: a+a() would crash as well
20:16 karolherbst: ohh actually not
20:16 karolherbst: mhhh I thoguht it would
20:17 karolherbst: seems like it actually has to be a number
20:17 imirkin_: right, like 1()
20:17 karolherbst: that doesn't crash though
20:17 imirkin_: what about -1()
20:17 karolherbst: uhhh odd
20:17 karolherbst: I was like super sure I tested that
20:17 imirkin_: maybe it gained a crash in the meanwhile
20:18 karolherbst: that's enough already: https://gist.github.com/karolherbst/08d2cc71faf814db34fe38f7acf0aed5
20:18 imirkin_: probably can just make it a void bug()
20:19 karolherbst: yeah
20:41 mupuf: 2.4915625 is the best one I got so far
20:41 mupuf: waiting for more data to be collected
20:42 mupuf: offset = div / 2.4915625
20:42 mupuf: I guess I could do this with only bit shifting
20:42 mupuf: will be waiting for more data!
21:36 karolherbst: uhhhh
21:36 karolherbst: nvidia crashed my entire system
21:38 karolherbst: "NVRM: Xid (PCI:0000:01:00): 79, GPU has fallen off the bus."
21:38 karolherbst: I guess I changed something really important in the vbios
21:40 imirkin_: that must have hurt... can't imagine falling off a bus is a pleasant experience
21:41 karolherbst: ...
21:41 imirkin_: [lame attempt at joke]
21:41 karolherbst: nono, it was a !!_very_!! good one
21:43 mupuf: hehe
21:53 karolherbst: okay, let's keep crashing the kernel
21:54 karolherbst:
22:12 karolherbst: silly nvidia :(