00:37 zZap-X: i have a strange problem
00:37 zZap-X: i am running Slackware 14.2 with a 4.4.x kernel
00:38 zZap-X: i am using a old Nvidia FX5200 PCI graphic (for MAME)
00:38 zZap-X: when the box starts booting, half-way through the screen turns black
01:57 imirkin: zZap-X: anything interesting in dmesg?
01:57 imirkin: zZap-X: sounds like this happens when nouveau tries to take over from vgafb
01:58 imirkin: a full dmesg should provide some info.
02:00 imirkin: snkcld: depends i suppose. the providers stuff is necessary for dri2-based offloading. is that what you're trying to do?
03:23 imirkin: wow, int64 was a surprising quantity of typing in from_tgsi code.
03:23 imirkin: hopefully it works.
03:24 imirkin: pmoreau: didn't you have some helpful patches for some stuff? or only cvt's?
03:34 imirkin: oh hrm. at least comparisons need fixing.
03:47 imirkin: gr. ILLEGAL_INSTR_ENCODING
03:47 imirkin: pmoreau: does I2I.S64.S64 not work? :(
03:48 imirkin: [for abs]
03:50 imirkin: mwk: any clue with IMNMX.LOW/MED/HIGH mean? the former 2 consume a CC
06:07 zZap-X: gonna test the fx5200 again in a bit
06:07 zZap-X: also does the nouveau support xorg custom modelines?
06:08 zZap-X: i will be generating lots of arcade low-res modelines listed here: http://www.geocities.ws/podernixie/htpc/modes-en.html#avga
06:08 zZap-X: for MAME
06:27 zZap-X: found these errors in dmesg: http://sprunge.us/
06:28 zZap-X: http://sprunge.us/FEAi
06:28 zZap-X: must be conflicting with the internal onboard graphic card? i915?
06:37 mwk: imirkin: I don't know *how* they work
06:37 mwk: but they are used for multi-precision min/max
06:38 mwk: you start with the high parts, and do IMNMX.HIGH
06:38 mwk: and it computes high part of the result, storing some intermediate state to CC
06:39 mwk: then you do IMNMX.MED as many times as you want for the middle parts, this eats CC and produces CC
06:39 mwk: and finish with a LOW
09:30 zZap-X: right managed to get nouveau working in xorg
09:30 zZap-X: how can one get nouveau to ignore EDID?
11:48 glennk: zZap-X, https://wiki.archlinux.org/index.php/kernel_mode_setting#Forcing_modes_and_EDID
11:49 zZap-X: thanks will read
11:49 zZap-X: glennk: i dont want nouveau to respond to edid as i will be using custom modelines
11:49 zZap-X: for mame 15khz
11:53 glennk: the idea is you supply a custom edid with the modelines you want in it, and tell the kernel to use it instead of the detected ones
12:00 zZap-X: glennk: cant i just put in custom modelines in xorg.conf
12:06 glennk: the kernel is in charge of programming the display timings, not xorg
12:06 zZap-X: glennk: when i use the nvidia driver i can turn off edid detection in xorg.conf
12:08 glennk: the blob driver does its own thing
12:10 zZap-X: aye ok
13:24 mlankhorst: imirkin_: you mean vram or gart?
13:48 mlankhorst: imirkin_: vram is managed through TTM, iirc bar has its own vm so the active pages have a mapping to it
15:25 imirkin: mlankhorst: i mean vram... i think there's some core misunderstanding on my end about how all this works, perhaps you can un-confuse me
15:26 imirkin: so you have a CPU, and it has instructions like read/write from memory. some of those memory addresses are claimed by the PCI bus, and reads/writes to those addresses end up there.
15:26 imirkin: but my understanding is that that's a fixed window
15:27 imirkin: so... no amount of a VM on the GPU will change that
15:28 imirkin: unrelated to all that, my understanding is that it's possible to map an arbitrary quantity of vram on g80+. how can that be?
15:30 imirkin: zZap-X: nouveau (and every other KMS driver) will try to set a mode on load, to be used for backing fbcon/fbdev. in order to do that, it will use the monitor's EDID. you can later set any other mode you like by properly configuring xorg. but the mode that fbcon runs on is going to be the preferred mode in the edid, or failing that, some fallback mode.
15:30 imirkin: zZap-X: you can specify a custom edid which has the mode you want to convince nouveau to set that mode for fbcon
15:31 imirkin: there are a few cooked ones for common resolutions, or you can supply your own.
15:32 imirkin: mwk: this might be a silly question... wtf is multi-precision min/max?
15:33 imirkin: mwk: oh, for like > 32-bit ints? so for 64-bit you'd only use high and low, but for 128-bit you'd use high/med/med/low?
15:33 mwk: yes
15:34 imirkin: eeeeexcellent
15:35 imirkin: i'm doing 64-bit ints in nouveau
15:35 imirkin: it looks like 64-bit int support in the ISA is extremely half-hearted
15:35 imirkin: among other things, there doesn't appear to be an abs :(
15:35 imirkin: it's not like i can't implement these things, but ... ugh.
15:37 imirkin: or neg. URGH.
15:38 imirkin:is annoyed.
15:38 imirkin: [there is an I2I.S64.S64, but it doesn't appear to work]
15:41 imirkin: pmoreau: have you tackled any of this stuff? if so, i'd like to avoid duplicating work...
15:43 karolherbst: imirkin: you mean the modifiers or the abs/neg instructions?
15:43 imirkin: karolherbst: in the ISA there are no explicit abs/neg instructions
15:43 imirkin: only I2I/F2F/etc
15:46 karolherbst: uhm, so convert with mod?
15:46 imirkin: well, normally that's I2I
15:47 imirkin: (int to int)
15:47 karolherbst: I see
15:58 mwk: did you check what cuda does when you neg/abs i64 things?
15:58 imirkin: karolherbst: if you feel like doing some tracing on blob, you could confirm it for me...
15:59 imirkin: mwk: no.
16:01 imirkin: and stuff like < and >= are annoying =/
16:01 imirkin: waaaa!
16:04 karolherbst: imirkin: i am a bit busy the next days and today, but if you send me stuff I will usually do those until the next day
16:04 imirkin: karolherbst: nah, don't worry about it
16:13 imirkin: grrrr. ILLEGAL_SPH_INSTR_COMBO for I2F.F32.S64 R0, R0; :(
16:17 imirkin: aha. that just needs the fp64 flag set.
16:56 mlankhorst: imirkin: just a sec let me find the right bits again
16:56 mlankhorst: imirkin: page fault handler goes into ttm, goes into nouveau for mapping
16:58 imirkin: ok, so is the deal that we map arbitrary amounts, and then have a page fault handler which ACTUALLY maps those pages in, and unmaps "old" ones?
16:59 mlankhorst: https://cgit.freedesktop.org/drm/drm-tip/tree/drivers/gpu/drm/ttm/ttm_bo_vm.c#n92
16:59 mlankhorst: yes
17:00 mlankhorst: VM_FAULT_NOPAGE means retrying
17:00 imirkin: ah, that makes a lot more sense. and is much less magical.
17:07 mlankhorst: I only knew because I was working on locking
17:34 imirkin: mwk: can you think of a clever way of doing < and >= with 64-bit ints?
17:38 imirkin: the dumb way would be to do eq(high) ? cmp(low) : cmp(high)
17:38 imirkin: of course there's various subtlety involved with signedness =/
17:39 imirkin: like flipping the low bits if high is negative
17:44 imirkin: oh i guess i can use the cuda compiler thingie to see what it does... hrm.
17:44 imirkin: need to figure out how to make it go again
17:47 imirkin: mwk: ok, it does ABS by negating (by subtracting from 0), and then SLCT by looking at the high word
17:49 imirkin: and the compares are done by doing a ADD.CC + ISET.X. clever. now i know what those things do ;)
18:02 mwk: ah yes, the iset.x thing...
18:37 imirkin: mmkay. this is starting to come together.
18:43 imirkin: just need to shr/shl and i think i'm done
20:10 mlankhorst: /7
20:10 mlankhorst: oops
20:49 snkcld: i asked this yesterday but missed my answer... so i apologize for repeating. but i recently got an xps 15 with nvidia graphics... and i see the nvidia card in lspci as a "3D controller". however, when i run glxinfo it shows "OpenGL renderer string: Mesa DRI Intel(R) Kabylake GT2"., even when i add DRI_PRIME=1
20:50 snkcld: why is DRI_PRIME=1 not setting it to use nouveau?
20:51 imirkin: probably because you don't have DRI3 enabled, and haven't set up DRI2 offloading.
20:53 snkcld: imirkin: ah, thank you! ok, i will attempt to determine if dri3 is enabled
20:53 snkcld: how can i figure that out?
20:53 imirkin: https://nouveau.freedesktop.org/wiki/Optimus/
21:20 snkcld: ah, i just noticed this
21:20 snkcld: nouveau 0000:01:00.0: unknown chipset (137000a1
21:20 snkcld: that could be why its not working lol
21:21 imirkin: could be, yes.
21:21 imirkin: you won't get any accel with it anyways
21:21 snkcld: doy ou know if 137000a1 is currently in the kernel master branch?
21:21 imirkin: no, but it should be easy to get modesetting going on it
21:21 imirkin: but accel won't happen.
21:22 snkcld: it wont? hmm... maybe im naive but whats the use of a gpu that isnt accelerating ?
21:22 snkcld: and how would i get modesetting to work on it if the nouveau driver isnt recognizing it?
21:23 imirkin: i dunno - you're the one who bought it...
21:23 snkcld: haha
21:23 snkcld: touche
21:23 imirkin: you can get GP107 going by looking at the commit that added GP106 and doing something extremely similar. should be pretty self-evident.
21:23 imirkin: [which, again, will just get you modesetting, not accel]
21:24 snkcld: that is awesome! ok, this is great because ive been wnating to actually contribute to the kernel
21:27 snkcld: imirkin: something like this? https://github.com/torvalds/linux/commit/1fe487d7d2858265e23f10fa6b4565112f9a17fe
21:28 imirkin: yes, a lot like that.
21:28 snkcld: i have no idea what those fields are in the nv136_chipset structure though
21:28 imirkin: https://lists.freedesktop.org/archives/nouveau/2017-January/027159.html
21:29 snkcld: imirkin: ^ is that someone that has already submitted the patch you are proposing would work?
21:29 snkcld: looks like it is
21:29 imirkin: [and make sure to read the reply too]
21:30 snkcld: i dont see a replay :(
21:30 snkcld: *reply
21:30 imirkin: "next message"
21:30 snkcld: ha, ok, sorry
21:31 snkcld: ah, i see. looks like he wants a "mmiotrace" , and the guy hadnt responded?
21:31 imirkin: correct.
21:31 snkcld: so if i do this "mmiotrace" thing and respond to the thread, perhaps it might move the patch along?
21:31 imirkin: yep.
21:32 snkcld: i would be very happy to do this
21:32 snkcld: provided the documentation is enough taht i can figure out how to do it
21:33 snkcld: "...nothing subtle has changed that needs to be handled?" what exactly is he looking for? like, does he want to compare the mmiotrace of the previous chip generation to this one, to make sure the mmiotraces are the same, thus allowing the same struct to be used?
21:33 imirkin: yes.
21:34 snkcld: ah ok, im learning alot here lol
21:34 snkcld: ok, im going to do this whole mmiotrace thing
21:34 snkcld: looks pretty simple
21:35 snkcld: the nvidia driver that i choose to use... should i use the newest version to trace?
21:35 snkcld: i might as well, right? the newest version in the ubuntu graphics ppa
21:37 imirkin: doesn't matter
21:38 snkcld: ok cool
21:38 snkcld: the idea of looking at an mmiotrace is see how a proprietary driver is working is awesome
21:38 snkcld: i had always wondered how one would reverse engineer closed source drivers
21:39 snkcld: "It works by intercepting all the reads and writes by a driver to memory"
21:39 snkcld: does that mean that it does not take into account any communication done via IO ports?
21:40 snkcld: are IO ports simply not relevant?
21:46 nyef: Modern hardware typically uses memory-mapped I/O exclusively.