00:33 imirkin: hm. i guess it's time to nuke OP_SUB in nv50 ir and do an actual good job with ADD + modifier. should yield better results anyways...
01:29 pmoreau: A bit late to the party, but Happy Nouveau Year!
01:30 nyef: Three and a half hours go to here.
01:31 nyef: ... I don't think I'm going to get this suspend thing figured out this year.
01:31 mwk: /* Drunk. Fix later. */
01:33 nyef: /* Not drunk enough. Fix later. */
01:33 imirkin: /* Drunk just right. Fixing now! */
01:43 nyef: Heh. "On a given board each GPIO is used for one specific purpose..." Clearly, whoever wrote the kernel documentation here hasn't run into some of the craziness that can be found with overloaded I/O pins.
01:54 nyef: ... Hunh. It's generating an unplug on the eDP port?
02:01 nyef: And what's this PPCI+0x704 that it keeps zeroing?
02:09 nyef: ... A lot of monkeying about with interrupt controls, what looks to be GPIO 3, and that odd PPCI+0x704 location, then setting up something with PDISPLAY.SOR[0x2], more interrupt messing about, and suddenly there's a plug event.
02:09 nyef: ... And this is while starting X.
02:36 nyef: Ah, that 0x704 thing is to reset MSI interrupts.
03:16 nyef: ... So, what if what's going on is the blob is sending a RESET signal to the panel, and nouveau isn't? Asserting RESET puts the panel to D0. De-asserting RESET puts the panel to either D1 (which is where we want to be) or to D0', where it waits to detect the source.
03:18 nyef: I'm not too clear on how source detect works, but it could plausibly require setting up some sort of signal on the main lines to bring the panel out of D0' and into D1.
03:20 nyef: Which means that my next step is to go through the mmiotrace again with this model in mind, and what I've managed to put together about IRQ handling.
03:50 nyef: Right, *two* possibilities there. One is the RESET signal, and the other is the source detect.
13:09 karolherbst: did anthing special happen the last one or two weeks? :D
13:12 Yoshimo: 33c3 happened
13:15 karolherbst: yeah, I know :D
13:15 karolherbst: and I was there
13:15 karolherbst: yesterday was fun :O
13:16 karolherbst: Yoshimo: I guess you didn't see me there?
13:23 Yoshimo: no
13:23 karolherbst: mhh, and I even had a big badge....
13:55 karolherbst: :(
13:55 karolherbst: Yoshimo: also having PCD?
13:56 Yoshimo: i am busy watching congress videos
13:56 karolherbst: mhhh
13:56 karolherbst: good idea
13:56 karolherbst: I maybe watched like 6 talks in total there :D
13:56 Yoshimo: ps4 linux is a great one
13:57 karolherbst: the one space one is good
13:58 karolherbst: Yoshimo: https://media.ccc.de/v/33c3-8406-the_moon_and_european_space_exploration
14:01 Yoshimo: imho that space track is a waste of slots. Now to my next one. Would have been really nice to experience the atmosphere of the snowden appearance in person ;)
14:02 karolherbst: mhh
14:02 karolherbst: watch that one talk
14:02 karolherbst: it was the best of the space ones
16:53 nyef: Well, I figured out how to turn the panel back on post-suspend.
16:53 nyef: I don't know *why* it works, I don't know if there's *any* indication in the MXM or DCB that it should, but...
16:55 nyef: (setf (sb-sys:sap-ref-32 *mmio-sap* #xe104) (logior #x7000 (logandc1 #xf000 (sb-sys:sap-ref-32 *mmio-sap* #xe104)))) does the trick. That's changing the state of GPIO 3, in PNVIO.GPIO_0, for the record.
16:57 nyef: Oh, and that's for my test machine, which is running a GF114. My main machine is running a GK107, and I have no idea if it uses the same GPIO for this.
16:57 karolherbst: check the vbios
16:58 nyef: What am I looking for?
16:58 karolherbst: the GPIO table
16:58 nyef: I guess the first thing I'm looking for is GPIO 3 in the table, yeah.
17:03 nyef: Found the table for the GK107, at least.
17:03 nyef: #x20 entries, 5 bytes per entry.
17:05 nyef: External GPIO Assignment Master Table is at #x73005898 ?
17:06 karolherbst: huh
17:06 karolherbst: are you using nvbios?
17:06 karolherbst: and how did you extract your vbios
17:06 nyef: Ah, no, misread the spec, it's at #x5898, and the 00 73 is part of the first GPIO entry.
17:07 karolherbst: well
17:07 nyef: Enabled the ROM PCI resource via sysfs and copied it out.
17:07 karolherbst: it would be easier to just read it out with nvbios
17:07 nyef: I learn more this way.
17:07 karolherbst: I mean to parse it
17:08 karolherbst: well and you get only a fraction of the information as well
17:08 karolherbst: I wouldn't even rely on the nvidia specs for most things because they are incomplete
17:09 nyef: So noted. Clearly, I'll need to do things BOTH ways, then.
17:09 karolherbst: well
17:09 karolherbst: in nvbios are most of the things also used by nouveau and a little more
17:09 karolherbst: but if something is missing in nvbios, it most likely also is missing from nouveau
17:10 karolherbst: but I kind of thought there were some backlight related patches in the last weeks/months
17:11 karolherbst: ohh wait
17:11 nyef: So, 03 01 81 00 4f. Pin 3, GPIO, initialize to "off". Panel power for LCD0.
17:12 karolherbst: mhhh
17:12 karolherbst: makes sense then
17:12 nyef: I have the sudden urge to shake someone warmly by the throat.
17:12 karolherbst: so we have to enable that pin on suspend
17:12 karolherbst: I mean resume
17:13 nyef: Ah! Okay, this actually lines up.
17:14 nyef: Connector 8 with this VBIOS is the eDP port, DPAux/I2C-B, LCDID 0.
17:14 nyef: So... why does the LVDS panel work?
17:14 karolherbst: check the code
17:15 karolherbst: maybe the GPIO defaults to on there or something like that
17:15 karolherbst: or nouveau only enables it for LVDS
17:15 karolherbst: or something else silly like that
17:15 karolherbst: I have nearly no knowledge about the display code, so I can't say a lot about it
17:16 nyef: ... Or connector 0 is the LVDS connector, and it's ALSO on LCDID 0.
17:18 nyef: Now I have something to dig for in the kernel source. Thank you! (-:
17:29 nyef: There's... basically nothing in here dealing with the lcdid on the connector table?
17:45 nyef: ... And the GPIO is deliberately frobbed from nouveau_connector_ddc_detect(), in nouveau_connector.c, but it does so for the LCD0 panel control ONLY, without regard for the LCDID bits defined by the DCB.
17:45 nyef: Does mention that LVDS power is handled by another mechanism, though.
17:47 karolherbst: maybe mupuf_ knows about this?
17:47 karolherbst: or pmoreau?
17:49 pmoreau: I have no knowledge of what is happening in nouveau_connector.c, sorry. Or connectors in general in Nouveau.
17:51 karolherbst: pmoreau: I thought you wrote some backlight code?
17:51 karolherbst: or was that somebody else?
17:51 pmoreau: Well… I did, but it was only to avoid Nouveau reusing the same interface name for all of them. :-D So no need to know how it works, just incr/decr a counter whenever a new interface is created/deleted.
17:52 karolherbst: ohh I see
17:58 nyef: So, I know why the process works for the LVDS panel, why it doesn't work for the eDP panel, and what step is missing. I know how to work around the issue from userland. I suspect a few things about what the hardware and the nvidia driver is doing that I might be able to confirm with an mmiotrace of suspend/resume with the LVS panel. I haven't a clue as to how to fix things, though.
17:58 nyef: Especially, I haven't a clue as to how to fix things "properly".
18:01 karolherbst: nyef: well, you know the answer already. you just need to enable that GPIO if there is a display connection for which this GPIO is important
18:02 karolherbst: and this has to be done on resume as well
18:03 nyef: Yes, that much.
18:24 karolherbst: mupuf_: it would be nice to have a maxwell2 gpu in reator as much as possible. I have a few things to do on such a gpu
20:24 nyef: My new year's resolution: 1920x1080.
20:25 xen: Screen 0: minimum 320 x 200, current 7680 x 2520,
20:25 xen: thanks to imirkin
20:25 nyef: Wow.