05:11imirkin: skeggsb: on my powermac7,3, getting a bunch of bios oob errors: https://hastebin.com/bigehufowe.css (with 4.11-rc7)
05:21imirkin: skeggsb: pushed vbios to repo in case you're interested
05:54imirkin: skeggsb: in other news, nouveau on ppc still works. good job not breaking it ;)
06:52imirkin: skeggsb: this might come as some surprise, but it looks like the overlay plane stuff is broken on NV34/PPC. i kinda of assume it's a BE thing.
07:20koz_: I'm trying to write something similar to this: https://bbs.archlinux.org/viewtopic.php?pid=1622623#p1622623 to enable DRI3. What is the Identifier meant to be for my card?
07:20koz_: (alternatively, where do I check what it should be called?)
07:30koz_: Never mind. Figured it out. However, I am now unsure if I have DRI3 enabled.
08:04koz_: OK, seems like I do. However, when I run a game with LIBGL_DEBUG=verbose vblank_mode=0, I get 240fps, but without that, only 60.
08:04koz_: What gives?
08:14koz_: Hiya karol!
08:14koz_: Just the person I wanted to see.
08:14koz_: So, I enabled DRI3, started my card in boost 2, and ran Minetest with all settings up to 11.
08:15koz_: Without 512 textures, I can hit framerates of over 200.
08:15koz_: With 512 textures, I get between 45 and 80, depending on how busy the screen is.
08:16karolherbst: but rendering looks fine, doesn't it?
08:16koz_: karolherbst: Oh, it looks fine, but framerates. :P
08:16karolherbst: how does it go with 256 textures (or smaller numbers)?
08:16koz_: The only thing - on my desktop, I get some artifacting.
08:16koz_: I haven't tried with 256 textures.
08:16karolherbst: is it a linear decrease in perf or a sudden drop?
08:16koz_: Let me try that actually.
08:16karolherbst: and how does it decrease on nvidia
08:17koz_: I'll try 256 and see.
08:17koz_: Also, a question: according to pstate, in 0f and boost 2, I'm hitting ~1GHz, but my card caps out at 1.2.
08:17koz_: Is there any way to drive it any harder?
08:18karolherbst: it's normal
08:18karolherbst: it depends on the quality of the GPU how high the clocks can actually go
08:18karolherbst: and the temperature
08:18karolherbst: currently we just assume 95°C for simplicity
08:19koz_: Is there a way I can check how hot it's running right now?
08:21koz_: What do you mean by 'sensors'? Like, physical ones, or is there something I can check/install/cat?
08:21karolherbst: it is a command
08:22koz_: karolherbst: I tried 256 textures. Rough doubling of performance.
08:22koz_: (so about twice as many frames)
08:22karolherbst: default textures are 32?
08:23koz_: How do I call the sensors command?
08:23karolherbst: from a terminal
08:23karolherbst: might be that you have to isntall lm-sensors
08:24koz_: karolherbst: 60C.
08:25koz_: (I assume that's what determines the clock?)
08:25karolherbst: no, we always assume 95°C for now
08:26karolherbst: because everything else would mean we have to update it
08:26karolherbst: like every second or so
08:26koz_: Also, when I run Minetest with LIBGL_DEBUG=verbose vblank_mode=0, I get much bigger framerats, but without that, only 60 at most. What gives?
08:26koz_: How do I turn it off?
08:26karolherbst: your screen can't do more than 60 anyway
08:26koz_: Oh, fair enough.
08:27koz_: I should stop being greedy.
08:27karolherbst: well, it's a waste of power to do more ;)
08:27karolherbst: and your GPU gets hotter
08:27koz_: Fair enough.
08:27koz_: Point is, I now have happy FPS.
08:27koz_: I shall report more games as I try them.
08:27karolherbst: I try to land those patches to update the clocks on temperature changes asap, I have those ready already
08:28karolherbst: but quite a lot of code has to land before as well
08:29Teklad: If your GPU is capable of keeping the framerate at 60, then you're just wasting CPU cycles doing all that extra rendering anyhow.
08:29koz_: Teklad: I know, I just wanted to see how hard it could go.
08:29karolherbst: I doubt the CPU side matters much
08:29karolherbst: cause the GPU renders
08:30Teklad: Right... typo.
08:30koz_: I didn't even notice that typo.
08:34Teklad: When's nouveau supposed to have better support for the GTX 10xx series anyways?
08:35karolherbst: you mean better as in OpenGL or as in speed?
08:35Teklad: general speed.
08:36karolherbst: will take quite a lot of time. 1. we need nvidias PMU firmware otherwise we can't control the fans 2. we need to reverse engineering reclocking on those again
08:36karolherbst: it's all new, maybe a lot of things stayed the same, dunno
08:37Teklad: I've never gotten into hardware programming, so I'm of very little help, unfortunately.
08:37karolherbst: we need hardware :p
08:37Teklad: I got a GTX 1060.
08:37karolherbst: I doubt you wanna donate it :D
08:37Teklad: If I wasn't poor
08:38Teklad: But I can yank information off of it as needed.
08:38Teklad: Unless you ask me to tear it to pieces
08:38Teklad: Then we'll have words.
08:38karolherbst: no, we need access to real hw for reclocking
08:38karolherbst: maybe I will buy myself a pascal soon (as in 2+ months)
08:39Teklad: How do you check all the reclocking and such anyways?
08:39Teklad:is curious how hardware development works.
08:39koz_: Teklad: Trial and error.
08:39koz_: Mostly error.
08:39karolherbst: we have tools and record what nvidia does with the hardware
08:39karolherbst: and then we try to make any sense out of it
08:40Teklad: I'm mainly curious because I don't mind prodding at my own hardware and writing a bit of code.
08:41karolherbst: mhh, we need to reverse engineer the video bios first as well :(
08:41karolherbst: pascal will be a lot of work
08:41koz_: But yeah, I now have my consistent 60fps on almost-everything-up-to-11 Minetest.
08:41koz_: My life is complete.
08:41karolherbst: if we are dedicated and lucky, I guess ~2 years until we get something working
08:42Teklad: karolherbst: On the bright side the nouveau driver already works with my 1060 up to a point.... so that's a start
08:42karolherbst: Teklad: sure
08:43Teklad: What kind of crazy tools do you people have to reverse engineer the video bios?
08:43karolherbst: a hex editor
08:43karolherbst: and the gpu
08:43Teklad: Oh dear god.
08:43Teklad: That sounds nightmare-ish.
08:43karolherbst: it isn't really
08:44koz_: Teklad: That's reverse engineering for you.
08:44karolherbst: we have a tool to parse it
08:44karolherbst: kind of
08:44karolherbst: and missing bits we reverse engineer like this:
08:44karolherbst: change the bit/byte(s) inside hte vbios, upload it on the GPU, load nvidia and try to figure out what changed
08:45Teklad: Why does that sound time-consuming.
08:45karolherbst: doesn't work starting with the shiny new maxwell series, cause the vbios needs to be signed.....
08:45karolherbst: this includes pascal as well
08:45Teklad: Ew... why would they add such an evil thing?
08:45karolherbst: why would they sign their firmware?
08:46Teklad: GPU viruses?
08:46karolherbst: mupuf_: you think nvidia is nice enough to enable pascal versions of tables on maxwell GPUs?
08:46karolherbst: Teklad: no clue, most likely DRM
08:47Teklad:thinks Nvidia is anti-open source at times.
08:47karolherbst: or to protect the hardware, dunno
08:47karolherbst: well, AMD has no open firmwares to begin with
08:47Teklad: AMD's catalyst driver on Linux is terribad.... at least last I used it.
08:48Teklad: many many years ago
08:48karolherbst: I meant the open source driver
08:49Teklad: I was gonna offer to help by doing some of the poking myself... but if I'm reading you right Maxwell+ has made the usual methods no good.
08:50Teklad: That really sucks.
08:50karolherbst: makes it more challenging
08:51Teklad: It wasn't challenging before? :p
08:51dboyan_: well, things goes from bad to worse :/
08:52Teklad: I have an enormous amount of free time on my hands at the moment.
08:53karolherbst: skeggsb: are you there? Want to ask you about the vbios on pascal again
09:00dboyan_: imirkin, hakzsam: I found an interesting discussion on XMAD: https://devtalk.nvidia.com/default/topic/980740/xmad-meaning/
09:14airlied: karolherbst: today was a holiday here
09:16karolherbst: here as well
09:17koz_: And here.
09:17koz_: Where is 'here' airlied?
09:17karolherbst: koz_: where everything is upside down :p
09:17koz_: karolherbst: I think that's me.
09:17koz_: (since I'm from NZ)
09:19dboyan_: apparently not an holiday at my home...
09:42hakzsam: dboyan_: yeah, I remember that discussion
09:50notneo: howdy. Im using nvidia binary drivers on debian testing. How do I switch to using nouveau? thanks.
11:10karolherbst: mupuf_: on pascal the VID PWM is moved to another PWM....
11:11mupuf_: once again!
11:11karolherbst: now the vbios GPIO table from pmoreau looks nice :)
11:12karolherbst: mupuf_: pretty obvious, isn't it? GPIO 0: line 0 tag 0x81 [VID_PWM] OUT DEF 0 param 1 gpio: normal SPEC_OUT 0x5d [PWM_1]
11:13RSpliet: mupuf_; mind reviewing the v2 hwmon patches that leberus posted this morning? Think you know most about the topic O:-)
11:14karolherbst: ohh, now it looks formally nice :)
11:15mupuf_: RSpliet: sure! I was writing an article this week end. Now that the deadline has passed, I can have a look!
11:16RSpliet: Did you submit before the deadline as well? :-D
11:16karolherbst: now that the deadline is passed, he can spend another month without the situation getting worse :p
11:17karolherbst: mhh any idea what this tag could mean? "GPIO 28: line 28 tag 0xcb [???] IN NEG DEF 0 gpio: normal SPEC_IN 0x15 [THERMAL_ALERT]"
11:18karolherbst: nvidia documented only until 0xb4 :(
11:24karolherbst: uhm... I am silly
11:25karolherbst: I told skeggsb that I see only garbage inside the P tables, guess what
11:28karolherbst: \o/ we can read out the power cap on pascal cards, at least something
11:28karolherbst: 250W max, sounds about right
11:42karolherbst: there are now 4 sub entries in the vpstate table
11:42karolherbst: each of length 0xa
11:42karolherbst: in this case
11:48karolherbst: they swaped the entries num and sub entry length, which makes more sense now
11:50karolherbst: mupuf_: any ideas? https://gist.github.com/karolherbst/2e8f753eda35024d818d4762e024830d
11:51karolherbst: first byte is the pstate obviously
11:51karolherbst: but anything else?
11:52karolherbst: pmoreau: I have an idea what you could do on the pascal GPU
11:53karolherbst: pmoreau: there was this way of getting the decrypted stuff from nvidia-smi, I need that
11:57mupuf_: karolherbst: sorry, I'm hosting a friend and we are about to go visit helsinki a bit. Will check the patches tonight!
11:58karolherbst: there is just boring stuff :p
11:58karolherbst: really just fixing parsing errors
11:59karolherbst: now I got to the PM_Mode table
11:59karolherbst: now it is getting interesting
12:01karolherbst: 9 perf levels, that doesn't sound right
12:03karolherbst: much better
12:07karolherbst: it still makes sense
12:07karolherbst: kind of
12:13karolherbst: nvidia seriously :(
12:16mupuf_: wr are lucky nvidia did not change so much its power managemen
12:17karolherbst: how does this look to you? https://gist.github.com/karolherbst/6b47ee7e53d7a9d6ec3dc265cde937bc
12:17karolherbst: the last engine is always crap, but anything else
12:18karolherbst: mupuf_: the voltage map table is completly different now and has just 8 entries or so
12:18karolherbst: voltage calculation will be a mess to figure out
12:18karolherbst: I assume that the frequency is an input now
12:19karolherbst: I have an idea for pcie, but meh
12:19karolherbst: 1 MHz: 2.5 PCIe, 2 MHz: 5.0 PCIe..... ;)
12:20RSpliet: seems plausible. Often the second halfword is the same as the first halfword with a different value on the top 2 bits
12:21RSpliet: (although for the unk0 and unk1 they aren't)
12:22karolherbst: unk2 is obvioulsy memory
12:22RSpliet: ideas what they might be describing: ranges, intermediate values during reclock, clocks for the other stage of a two-stage PLL config
12:22RSpliet: good luck :-P
12:24karolherbst: some of the clocks make no sense
12:24karolherbst: but well
12:32nyef: ... How large is a signed vbios, and is it possible to "brute-force" the signature in reasonable time by just throwing data at the card with different signatures until it accepts one?
12:32nyef: Or does it silently reject or something?
12:32karolherbst: nyef: you need like ~2 seconds per try
12:32karolherbst: if it accepts, nvidia takes longer to load
12:33nyef: And the signature length?
12:33nyef: Or is that also an unknown?
12:33karolherbst: no idea, didn't look into it
12:33dboyan_: karolherbst: Can I help with my pascal card? It's an mobile one and I never succeeded mmiotracing though.
12:34karolherbst: actually, yes
12:35karolherbst: I totaly forgot who wrote this and if it went upstream or anything
12:40dboyan_: karolherbst: so you need that debug.log?
12:43dboyan_: karolherbst: https://gist.github.com/dboyan/ccb29ec2d1db599896482b6dc9977bae
12:43karolherbst: nice, it still works
12:44karolherbst: ohh, nice, and what I wanted to know is also in there, very good
12:48nyef: So, I decide to see what the blob does when faced with my one panel that doesn't like HDMI audio from my MCP89. And it turns out, it doesn't set an infoframe, doesn't set the ELDs, and doesn't make any noise. /-:
12:50nyef: ... And DPort HPD doesn't work either. No wonder I keep running into problems with nouveau on this hardware: The blob doesn't like it either.
13:02leberus: hi :)
13:04nyef: Ahh... The blob may actually not be loading here? What?
13:04leberus: karolherbst: this morning i've sent the v2 of the patch's series and I've formatted it with git format-patch, so hopefully this time is gonna be fine
13:23karolherbst: dboyan_: I also need your vbios
13:31karolherbst: the heck
13:32karolherbst: table unk90 is already new, but we've got two version of that with pascal
13:36Teklad: karolherbst: You have a breakthrough?
13:40karolherbst: just adapteing knowledge we got from older generations to pascal
13:47dboyan_: karolherbst: https://expirebox.com/download/b7e32869351586165782c627d2d96c1d.html
13:47dboyan_: there are two files, but i can't remember which one is correct
13:47dboyan_: one is retrieved from nouveau, the other is from nvabios iirc
13:48karolherbst: nvapeek 101000
13:50karolherbst: ohh nice, nouveau prints out the fixed vbios
13:50karolherbst: very nice
13:51dboyan_: karolherbst: 00101000: 00400080
13:54karolherbst: dboyan_: thanks
13:55dboyan_: my pleasure :)
14:05karolherbst: okay, this is good enough for noiw
14:12karolherbst: uhm... nvidia, are you serious?
14:12Teklad: Nvidia never jokes.
14:17karolherbst: okay, will finisht hat later
14:45karolherbst: insane, there are 5 clocks per sub entry now
14:45karolherbst: probably for each domain
14:53karolherbst: dboyan_: let me guess: base clock 1354 MHz, boost clock 1492 MHz ?
14:54karolherbst: okay, so at least we can parse that out of the vbios now
14:55Teklad:misses using nouveau.
14:55Teklad: I'll be glad when we get support back for the new stuff.
14:55karolherbst: help out :p
14:55Teklad: I would, but I can't send you my card darn it!
14:55Teklad: I don't have anything else!
14:56karolherbst: dboyan_: does nvidia-smi report any power consumption for you?
14:56karolherbst: Teklad: then reverse engineer on your GPU
14:56Teklad: karolherbst: Where do I even start? xD
14:57dboyan_: karolherbst: you are nearly right about clock rate according to wikipedia
14:57Teklad: If you can give me a general guideline I can probably get some information for you.
14:57karolherbst: dboyan_: yeah well... I am asking about your GPU :p
14:58karolherbst: dboyan_: is 138 MHz your full idle clock?
14:59dboyan_: How can I know that?
15:00karolherbst: under nvidia you could check that with nvidia-settings
15:00karolherbst: if you don't do anything, the clocks will drop at some point
15:01Teklad: dboyan_: You use an nvidia GTX 1060 by chance?
15:01dboyan_: no, 1050
15:01Teklad: Ah... mine runs at 139Mhz for the minimum.
15:03karolherbst: dboyan_: nvidia-settings -c :$DISPLAY, whatever your X with nvidia is running on
15:03dboyan_: Min clock rate in "Graphics Clock" sections reads 139MHz
15:03karolherbst: can you give me a screenshot of it?
15:04karolherbst: of the entire section
15:04karolherbst: or do a full dump of everything?
15:04karolherbst: or just nvidia-smi -q
15:04dboyan_: okay, wait a seond
15:05dboyan_: karolherbst: https://postimg.org/image/vn50kjy7h/
15:08karolherbst: and the nvidia-smi -q output please?
15:08karolherbst: Graphics clock: 7MHz ... :( I fear the worst
15:09karolherbst: dboyan_: can you verify that 0 -> 2.5, 1 -> 5.0 -> 2,3 -> 8.0 PCIe speed?
15:09karolherbst: 0 -> 2.5, 1 -> 5.0, 2,3 -> 8.0
15:10dboyan_: how to verify that?
15:10karolherbst: put some load for a short moment
15:10karolherbst: so that it clocks up to 3
15:10karolherbst: then it drops slowly
15:11dboyan_: karolherbst: you are correct about pcie link speed
15:12karolherbst: we are getting there
15:13karolherbst: engine 0 is the "normal" shader engine
15:15Teklad: http://ix.io/qWK Just for your records.
15:16karolherbst: the heck, dynamically clockable video engines
15:17karolherbst: whatever, I think that's the best I can do for now
15:17Teklad: The wonderful world of pascal.
15:18nyef:has a sudden wave of nostalgia for the days when he used Turbo Pascal as a programming environment.
15:18Teklad:hasn't used pascal in ages
15:19dboyan_:never learned pascal, used some turbo c in childhood
15:20Teklad: I write a lot of C... but nothing as low level as this mess here.
15:20Teklad:hasn't had any hardware that required the need to program for yet.
15:20Teklad: At least until now.
15:23Teklad: Speaking of which, I need to get back to work on my cairo desktop thingamajig.
15:23Teklad: Too tired though.
16:28jamm: imirkin_: nevermind, i think i figured it out from target_gm107.cpp
21:21pmoreau: karolherbst: Looks like you made some good progress on those Pascal VBIOS! Ping me tomorrow with what I should run with the blob on the Pascal card.
21:22karolherbst: pmoreau: yeah, will do :)
22:55mupuf_: Odd, I did not receive the emails from Oscar...
22:55mupuf_: will complicate the review!
22:56mupuf_: karolherbst: if you want to have fun with a pascal in reator, I can arrange that
22:56mupuf_: now that the fw are available
22:57karolherbst: mupuf_: ohh you got a pascal?
22:57mupuf_: karolherbst: I don't, but I can arrange that
22:57mupuf_: by, you know, going to buy one
22:57karolherbst: I see
22:58karolherbst: I assumed you got one through ... ehm.. other means
22:58mupuf_: sometimes, low communication is the way to go ;)
22:59karolherbst: well without being able to fake the vbios, no idea what I can really do
22:59karolherbst: except doing traces
23:04mupuf_: karolherbst: true, but maybe they stopped their insanity?
23:09karolherbst: mupuf_: mhhh, I highly doubt that though