00:58nyef: Acquired USB traces (of unknown utility) for the IR emitter for every refresh rate supported by the eDP panel. The 3D effect worked well in the test application.
00:59nyef: Thus far, using an external display has been spectacularly disappointing in terms of 3D effect. /-:
01:03imirkin: nyef: you can mess with the width between the eyes... i played around with it a lot back when red/blue glasses were all the rage
01:03imirkin: ah... the year 2000 :)
01:05nyef: It's not a depth thing, it's a timing thing.
01:05nyef: It turns out that the driver prefers the external emitter over the built-in if one is available, and the external emitter works fine against the internal display.
01:06nyef: The hardware is basically set up via a bunch of timer parameters: When to turn the left lens transparent, when to turn it opaque, when to turn the right eye transparent, when to turn it opaque.
01:06nyef: All by dead reckoning.
01:06nyef: And it needs to end up synchronized to the display.
01:07nyef: So there's the USB transaction latency to account for, the display latency to account for, and probably the speed of light in a couple of places.
01:08imirkin: light tends to travel pretty quickly
01:09imirkin: and if the emitter is positioned with the display, then the images from the display shoudl reach the viewer with the same latency...
01:09nyef: 1.79 x 10^12 furlongs per fortnight, I know. But if you're dealing with a small enough scale, it turns out to take a while. (-:
01:09nyef: There's the latency from the video card to the display to consider.
01:10imirkin: and electricity moves a lot slower
01:34FrankD: Hi everybody!
01:38FrankD: Is there any way to get involved with helping nouveau progress without writing any/much code?
01:40nyef: Wha...? It's using both emitters at once?
01:42imirkin: FrankD: what did you have in mind?
01:44FrankD: imirkin, anything? :D I've got Fermi/Kepler/Maxwell/Pascal cards if there are tests to run or dumps to be gotten.. got rid of anything Tesla or earlier
01:45imirkin: FrankD: well, occasionally someone might request that tests be done on a particular chipset, but other than that, i can't think of much that needs doing outside of things that require technical work.
01:53FrankD: imirkin, technical as in how?
01:53imirkin: working with code
02:10nyef: So, 3D IR USB traces obtained for all eDP panel refresh rates for both internal and external emitters. External emitter trace also obtained for messing about with the input controls. The external panel does more refresh rates, but the sync is out, so the 3D effect doesn't work, so I didn't obtain traces.
02:10nyef: Is there anything more that I can/should do before swapping my Linux disks back in?
02:18nyef: Yes: I should obtain traces for the external display for refresh rates down to 60Hz. Just because the sync is out doesn't meant that some of the timing parameters won't be useful. And then I should install the utilities that came with the monitor and see if something there clears up the sync issue.
02:52nyef: ... So much for that idea. Decided to start with the driver updates, which included a new nvidia driver, which killed support for the more interesting refresh rates in the stereo controller. /-:
03:03snkcld: sss between optimus and hardware-mux... they both look the same as far as the layout goes PCI wise... right? that is, to the kernel, there look to be 2 gpus?
03:03snkcld: with a hardware mux'd GPU, the data has to be copied over the PCI bus to the the gpu thats drivign the output... and i imagine in optimus it is also true that the data has to be copied to the integrated graphics GPU, too, but they are closer together?
03:06imirkin: i dunno how hw muxed laptops work in such a context
03:06snkcld: as far as optimus goes then
03:06imirkin: if you're using prime, that's not a hw mux
03:06snkcld: lol, i thougth it was
03:07imirkin: i'm guessing the hw mux is in reference to the display connection
03:07snkcld: yea, theres a chip that is programmed to changed between the gpu i guess... not entirely sure how it works
03:07snkcld: but you "outb" some data to it, and it switches some stuff
03:09imirkin: bonbons: would you be so kind as to file a bug for your situation, including bisection results, your .config, and a bootup log?
03:17snkcld: imirkin: is the difference between hardware-mux and optimus the fact that an optimus GPU is simply not directly connected to any ouputs? in all other regards, it is a pci device that is not part of the CPU device itself right?
03:18imirkin: that's right.
03:18imirkin: the cpu integration is purely secondary to the whole concept as well
03:19snkcld: so why do people talk about optimus as if its so drastically different when talking about battery life?
03:19airlied: optimus GPU can be connected to outputs as well, just not usually the internal pane
03:20snkcld: airlied: that makes sense, so e.g. hdmi output etc
03:20imirkin: well, optimus is more a marketing term than anything else.
03:20nyef: That's a bit better. Now I can relax a bit before trying to figure out the USB traces for the IR emitter.
03:21snkcld: airlied: imirkin: i guess what im trying to get at is this: from the perspective of nouveau and vgaswitcheroo, if one is on optimus or hardware mux... it looks the same, right
03:22imirkin: switcheroo is in reference to where the panel and potentially other outputs are hooked up
03:22airlied: with no mux there should be in theory no switcheroo, just power management
03:35snkcld: airlied: ohhhhhh
03:35snkcld: so optimus systems only report _1_ gpu?
03:41snkcld: oh, sorry, that assumption doesnt make sense i guess. i guess im just confused as to how, in theory if you had multiple gpus... how would one select which one to use?
03:42CookieJar: had popped in here to ask for help, but I figured it out
03:43CookieJar: was having trouble setting tv_norm to ntsc-m
03:43airlied: snkcld: DRI_PRIME= env var, but other APIs have different ways,
03:43imirkin: CookieJar: https://nouveau.freedesktop.org/wiki/KernelModuleParameters/
03:43airlied: really to support optimus properly we'd need a lot or changes to X/wayland/GL stack
03:43CookieJar: imirkin, yeah I'm aware of that page, just couldn't figure out how to actually set it
03:43CookieJar: just figured it out now though
03:43CookieJar: and all is good
03:43airlied: in order to get the battery life savings that Windows/OSX do
03:44imirkin: CookieJar: cool
03:44CookieJar: also found that my bench tv/monitor supports pal as well as ntsc through this, so that's nice to know
03:51imirkin: probably not the right way for that stuff to be exposed, but ... oh well
03:51imirkin: should be a connector property...
03:53imirkin: oh. there is a connector property.
03:53imirkin: this just affects which one is set by default.
03:57nyef:notes that -rc5 is out, and that it doesn't have that gt215 audio fix.
03:57nyef: I suppose it might end up in 4.11?
03:58imirkin: nah, skeggsb will send a fixes pull
03:58imirkin: i dunno why he hasn't sent one in yet...
03:58imirkin: maybe coz airlied was at lca? dunno.
03:58imirkin: also he usually doesn't send them publicly, which is a little annoying since you never know what's being sent in.
03:58airlied: skeggsb: ^ :)
03:59imirkin: but i guess they sit 3 feet apart, so sending emails is more annoying than saying "yo dave, pull!"
04:01skeggsb: it's on my list of things to get to
04:02nyef: Okay, that's fair, I guess.
04:02nyef: And it's not like I can't patch my kernel locally.
04:02imirkin: skeggsb: dunno if you've been following my conversation with bonbons, but it looks like c85ee6ca79590cd51356bf24fb8936bc352138cf somehow managed to regress nv1a
04:02imirkin: i've stared at that change inside and out, and it seems fine, which means that i'm either blind, or the issue is due to some surrounding infra that's not part of the change
04:04nyef: Hrm. My new panel has different EDID for DP and HDMI... Which means that I really need to scare up a DVI cable to check the EDID on that interface.
04:05imirkin: nyef: at the very least, the EDID tells you whether it's an HDMI connection or not - so the literal edid bits will be different
04:05imirkin: (some monitors forget to fix the edid checksum to account for that)
04:06nyef: In this case, the DP EDID is a 1.4 with a max dotclock of 330MHz and the HDMI EDID is a 1.3 with a max dotclock of 170MHz.
04:07imirkin: that's ... surprising
04:07nyef: What I'm not seeing is any declared latency information in either, and I've already checked for that three-pin sync connector and it doesn't have one of those.
04:10imirkin: skeggsb: it does change the ordering of that tile init thing wrt the "remainder" of the gr_init function.
04:13skeggsb: imirkin: i can't imagine that'd be the cause, but, it also wouldn't hurt to test it
04:13imirkin: well, that's the only plausible difference i've dug up
04:18snkcld: in order for KMS to work, would i915/nouveau need to be built in? or can they remain modules?
04:19imirkin: snkcld: they can remain as modules
04:19imirkin: the system boots with vgacon or efifb, and then the relevant driver can take over when it is loaded.
05:27nyef: ... I wwonder if part of this IR widget startup sequence is actually calibrating for USB latency?
05:54bonbons: imirkin, skeggsb: filed as FDO bug 99499
05:56nyef: Almost to six digits?
05:56bonbons: I won't be on IRC for the next 36 hour so please add patches for testing or questions to the bug
05:56bonbons: nyef: 500 to few to be last-5-digits
11:30karolherbst: mhh oh right, 4.11 is comming :D
11:31karolherbst: will post updated power budget stuff on the ML today then
15:41Echelon9: Popping in to say hi on #nouveau, as I've created a few code and documentation PRs for envytools
15:44Echelon9: I'm already a contributor to Mesa (vc4 and i965 mostly)
15:45imirkin_: hi Echelon9
15:49Echelon9: I'll start out doing some basic "janitorial"-style work on envytools, as a means of familiarizing myself with the code and tools
15:50Echelon9: It's been helpful so far starting with the limited tests, understanding what they're doing and then improving the documentation of those parts
15:50imirkin_: cool. do you have any specific goals in mind in the future?
15:52Echelon9: I'd in jest say reclocking support -- but will start off with more achievable goals
15:53imirkin_: on what gpu family?
15:53Echelon9: So perhaps taking a look at some failing piglit tests
15:53imirkin_: it's all fairly achievable - just requires a ton of effort
15:54Echelon9: I've had experience looking at Newton-Rapshon to improve trig primitives on vc4 -- and I know that's been used on certain nv gpu series in the past
15:54imirkin_: ok, well, on the practical side of things - what nvidia gpu's do you have access to?
15:54Echelon9: I'm getting a mobile Maxwell
15:55imirkin_: do you know which one?
15:55imirkin_: GM20x or GM10x?
15:55Echelon9: And I want to get the Shield TV (Tegra X1)
15:56Echelon9: GM107 on the mobile side
15:56imirkin_: well there are a few fairly easy things that could be done on GM20x that haven't because ... well, really because i don't have one :)
15:56imirkin_: ok, reclocking should work fine on GM107 with kernel 4.10
15:56Echelon9: which I understand a few here have GM107's
15:57karolherbst: imirkin_: hopefully he has one which doesn't reclock successfully yet
15:57karolherbst: there are some bits inside those memory tables left
16:20karolherbst: Echelon9: did you see the trello board already?
16:58Echelon9: karolherbst: yes, I've seen that trello board and will find some that work for me
19:46karolherbst: mupuf: are you there?
19:47karolherbst: regarding the max power consunption values. I had the one patch where I parse the vbios and store the result into nvkm_iccsense. You noticed, that I should rather parse the stuff inside hwmon and directly output it there.
19:48karolherbst: here are the patches: https://github.com/karolherbst/nouveau/commits/power_budget
19:48karolherbst: I could add a function to the second patch to parse the max values with a TODO mentioning, that it is only trivial in this case and there is a different way to get those values if the one header byte isn't set
19:48karolherbst: would that be okay for you?
19:49karolherbst: (also I don't want to reparse the vbios over and over again inside the hwmon functions)
19:49karolherbst: I am refering to https://lists.freedesktop.org/archives/nouveau/2016-October/026329.html and https://lists.freedesktop.org/archives/nouveau/2016-October/026330.html
19:49mupuf: karolherbst: because of performance reasons? :D
19:50karolherbst: no, because we shouldn't parse the vbios outside nvkm
19:50mupuf: oh, right
19:50karolherbst: well, we do for display stuff anyway
19:50mupuf: that part is definitely true
19:50karolherbst: but still
19:50karolherbst: it doesn't belong inside nouveau_hwmon
19:50mupuf: ok, checking out the patches!
19:50karolherbst: yeah, I rewrote them a little since the first series
19:52karolherbst: and I expect this to change with pascal anyway, so we will most likely end up with chipset specific code paths sooner or later
19:52karolherbst: by the way, I found one semi and one fully interested person for gsoc nouveau stuff, will most likely talk with them tomorrow about it in more depth :)
19:55mupuf: karolherbst: that would be fantastic!
19:55mupuf: we need to recruit more devs!
19:55karolherbst: yeah :)
19:55mupuf: and I need to deliver on my: 2017 will be a geekier year
19:55mupuf: 2016 was overly social :D
19:55imirkin_: can't have any of that :p
19:55karolherbst: but I like it
19:56karolherbst: 2017 will stay social and become a lot geekier :p
19:56karolherbst: at least for me
19:56karolherbst: have to buy my ticket for sha still :D
19:57imirkin_: karolherbst: coz finishing up kepler reclocking wasn't geeky enough?
19:57mupuf: mine will definitely tune down on the social, that is for sure! But that still means going out 3 times a week at least :D
19:57karolherbst: imirkin_: of course not :P
19:57mupuf: imirkin_: it is not done yet ;)
19:57imirkin_: well, it's never done
19:57imirkin_: but it's a lot more done.
19:57karolherbst: especially gm20x isn't done yet :D
19:57imirkin_: gm20x isn't kepler :p
19:57mupuf: yeah, 2016 was awesome for this
19:57karolherbst: reclocking wise it is nearly the same
19:57karolherbst: just with some fancy features we don't need :p
19:58imirkin_: yeah. like correct voltage.
19:58karolherbst: we have correct voltage
19:58imirkin_: oh you mean gm20x
19:58mupuf: imirkin_: what about you?
19:58imirkin_: dunno, we'll see
19:58mupuf: you'll tell us in 2018 ;)
19:58karolherbst: dynamic reclocking this year is on my list
19:58imirkin_: i haven't done much in nouveau-land in the past ... 6 months?
19:59imirkin_: maybe longer
19:59mupuf: well, I assume you have been finding new shiny stuff to do, no point in burning out
19:59mupuf: and Samuel has been a machine
20:00karolherbst: quite sad that samuel isn't there for us anymore :(
20:00imirkin_: nothing serious since ssbo's and the half-impl of images
20:00imirkin_: [for me, that is]
20:00karolherbst: maxwell scheds?
20:01karolherbst: also the counter things will really help us out in the future
20:01mupuf: karolherbst: give him time to adjust, he may surprise us with some work from time to time
20:01karolherbst: mupuf: :D hopefully
20:01mupuf: but I am sad we *still* did not finish writing the support for perf counters :D
20:02mupuf: It is not like I got interested in it in .... 2012?
20:02mupuf: wait, no!
20:02mupuf: 2011 was my first demo with them
20:02mupuf: it crashed the machine
20:02mupuf: wait, no, fosdem 2012 was the one that crashed
20:02mupuf: XDC 2011 worked
20:03karolherbst: if I get really bored I will look into the NVFBC and NVIFR things :D
20:03karolherbst: aka scren/buffer capturing
20:04karolherbst: NVFBC is framerbuffer capturing and NVIFR is inban frame readback
20:04mupuf: karolherbst: really? Before zcull?
20:05karolherbst: okay zcull first
20:05karolherbst: NVFBC and NVIFR are part of NVENC anyway
20:05imirkin_: karolherbst: on top of any RE with that, might want to sync up with the intel & other folk who are looking into adding readback support to linux
20:05karolherbst: nvenc is just a monster
20:06karolherbst: and I am not even sure we can use NVFBC and NVIFR on linux anyway
20:06mupuf: karolherbst: well, given the current situation with vdec, not sure it is worth it, honestly
20:06karolherbst: it's for encoding
20:06karolherbst: not decoding
20:06mupuf: I know
20:07mupuf: but when do you need this?
20:07mupuf: Only when you don't want to hog your CPU
20:07mupuf: when do you not want to hog your CPU?
20:07mupuf: when you are gaming
20:07mupuf: can you game on nouveau?
20:07karolherbst: encoding on the GPU is like 10 times faster
20:07mupuf: well... hmm ... not really?
20:07karolherbst: or even more
20:07mupuf: yep, but the quality is bad, so it is more for streaming in real time
20:07karolherbst: okay, sure
20:07mupuf: where is twitch for linux :D
20:08karolherbst: I will look into perf things first anyway
20:08mupuf: sounds like a better plan ;)
20:08karolherbst: it would be just a huge interesting project
20:08karolherbst: perfect for a gsoc student!!! :D
20:08karolherbst: might be overkill though
20:08mupuf: Dave said at LCA that Ben *really* wants to work on vulkan
20:08karolherbst: I heard the rumors
20:08mupuf: lol, GSoC project out of nvenc
20:09karolherbst: mupuf: enough for 5 years
20:09imirkin_: i dunno - i figure nvenc could be worked out to a reasonable extent in a 3-month period by a sufficiently dedicated individual
20:09imirkin_: (working on it full-time)
20:09karolherbst: might be enough
20:09mupuf: and I thought, in retrospect, that I had been crazy with my idea to implement perf counters
20:09karolherbst: good thing is, that userspace supports it already
20:09imirkin_: not implemented in mesa, but RE'd enough for another gsoc student to implement it in another 3 month
20:10karolherbst: yeah, sounds reasonable
20:10imirkin_: this stuff ain't that complicated
20:10mupuf: imirkin_: not sure how many people could figure this shit out that quickly without extensive knowledge about it
20:10karolherbst: mupuf: I looked with imirkin_ into that already a bit
20:10mupuf: maybe, but you need to teach them about pushbuffers fiest
20:10karolherbst: it looked "reasonable"
20:10mupuf: and PFIFO
20:10imirkin_: i'm trying to remember how long it took me to RE vp2... which i wasn't working on full-time
20:10imirkin_: i think it was a few months
20:10imirkin_: and that was my first (real) contact with nouveau
20:11mupuf: yeah, but you were already a veteran coder ;p
20:11mupuf: not a student
20:11imirkin_: i guess.
20:11mupuf: well, I mean, better under-scope a project than overscope
20:11imirkin_: anyways, that's why i said "sufficiently dedicated" :)
20:11mupuf: I have been coordinating the gsoc effort for the xorg foundation for 3 years now
20:12mupuf: or 4
20:12mupuf: students really get good after the second year
20:12imirkin_: RSpliet and hakzsam have been "sufficiently dedicated". dunno about any others.
20:13imirkin_: but yeah, you really need to have some experience with the project
20:13mupuf: RSpliet was not ordinary GSoC student
20:13mupuf: just like curro
20:13mupuf: both of them were actually EVoC students IIRC
20:14imirkin_: well i'm sure roy would have done fine as a gsoc student as well :p
20:14mupuf: hakzsam was a real gsoc student
20:14karolherbst: looking back I would also wanted to do a gsoc project :D
20:14mupuf: I am sure, but 4 years of experience in nouveau help a lot when starting a GSoC :D
20:14mupuf: karolherbst: better late than never
20:14karolherbst: I am no student currently :p
20:15mupuf: sorry, meant: better get involved late than never
20:15karolherbst: but no degree yet as well :D
20:15mupuf: how german of you
20:15karolherbst: kind of
20:16mupuf: curro did not finish IIRC
20:16mupuf: Calim did not finish either
20:16mupuf: ok, he is austrian
20:16mupuf: but close enough, right? :D
20:16karolherbst: most of the so called hackers don't finish it in germany
20:16hakzsam: and I did not finish as well :)
20:16karolherbst: most even make jokes of you, that you are only a real hacker if you aborted your studies
20:16karolherbst: so I guess it must be true
20:17mupuf: hakzsam: what didn't you finish? Don't you have your masters degree already?
20:17hakzsam: mupuf: ah, I thought it was GSoC related
20:18hakzsam: (didn't read carefully to be honest)
20:18mupuf: yeah, it is getting long
20:18karolherbst: wondering if I ever will get a degree at some point
20:18mupuf: at this point, better get the job you want and make it your CV
20:18mupuf: just don't go close to france
20:19karolherbst: I guess getting reclocking working the way we want it on gm20x would help as well
20:20hakzsam: imirkin_: are you going to be a gsoc mentor this year, btw?
20:21karolherbst: what are the requiernments to become one by the way for any Xorg related projects?
20:21hakzsam: time and patience? :)
20:21karolherbst: because the ones I will talk to I will meet in person, like from eye to eye
20:21imirkin_: hakzsam: if there's a student that's worth it, sure
20:21karolherbst: imirkin_: I found you some if you want
20:22karolherbst: depends on which topic you want to mentor
20:23hakzsam: instructions scheduler would be nice, but it's hard
20:23karolherbst: more or less. I prefer to have a tool which gives us all the information about latencies and what not
20:24karolherbst: in an automatic way
20:29hakzsam: you might want to write a pre-RA pass which reduces GPR pressure (in a first time). And we already know the latencies for Maxwell (eg. maxas and my code)
20:30hakzsam: anyways, I don't have time for gsoc this year :)
20:30karolherbst: mupuf: updated https://github.com/karolherbst/nouveau/commit/0c9ac0adcf500607a6371391562ea9874befbf48
20:30karolherbst: hakzsam: ohh nice, so that at least for maxwell we are good now
20:31karolherbst: hakzsam: but we need this for all previous gens anyway
20:31karolherbst: and also to verify that the maxwell stuff is right and for all future gens as well :D
20:42pmoreau: I was wondering if working on ARB_gl_SPIRV and/or adding support for OpenGL-related stuff to the SPIR-V translation pass could be worth a GSoC. I would need to send an initial serie for the SPIR-V stuff though.
20:43pmoreau: And I should send those quickly, before I disappear again for reason of paper deadline
20:43imirkin_: pmoreau: how is the texture/sampler stuff resolved? vk does it the DX way (where sampler and texture are separate)
20:43pmoreau: IIRC, it is separate
20:44imirkin_: but the surrounding stuff is GL...
20:44pmoreau: It can be separate in OpenGL as well, if you create your own sampler objects, can’t it?
20:44imirkin_: you have to attach samplers to texture units
20:44imirkin_: so they're not really separate
20:45pmoreau: That’s true
20:46mupuf: pmoreau: yeah, would be a good project!
20:46pmoreau: https://www.khronos.org/registry/spir-v/specs/1.1/SPIRV.html#OpSampledImage it seems that you first create a sampled image before sampling it, with the sampler being separate from the image and only associated when creating the sampled image.
20:47imirkin_: pmoreau: i understand how vk works (i think)
20:47imirkin_: pmoreau: the question is how does it integrate into a GL environment
20:47imirkin_: since you're talking about ARB_gl_spirv
20:48mupuf: karolherbst: so, when you said "no vbios parsing in hwmon", you meant "no calling of vbios-parsing functions from hwmon" or "we should not interpret results from the bios in hwmon"?
20:49karolherbst: both actually, but much more the first
20:50nyef: Would that mean something else parses the vbios and configures hwmon, or another approach entirely?
20:52pmoreau: imirkin_: I haven’t looked at the SPIR-V code that glslang would produce for a GLSL 450 shader using texture(). I’ll have a quick look
20:52airlied: optypesampler is illegal ingl
20:53airlied: the extension mentions a bunch of diffs
20:55pmoreau: airlied: In the GLSL450 extension of SPIR-V? I only had a quick look, but it seems to be exclusively math functions that are added by that extension.
20:59pmoreau: It seems to be taking as input an OpTypeSampledImage directly
21:00airlied: pmoreau: in ARB_GL_spirv
21:00airlied: Non-acceptance of SPIR-V features, relative to Vulkan:
21:00pmoreau: Ah, makes sense
21:07mupuf: karolherbst: I have no problem with the first
21:07mupuf: but I do get your point for patch 2
21:07mupuf: you will need it later
21:07mupuf: so, why not put it there
21:10mupuf: ok, I guess the main hold for me is that you did not RE what the other entries mean
21:10mupuf: On my nve4: 0x00007f72: 20 0d 22 09 64 00 01 04 06 07 ff e8 03
21:10karolherbst: yeah I know
21:11mupuf: I guess it is pretty clear that 0, 1, 4, 6, 7 and ff are other entries
21:11karolherbst: they have "odd" effects
21:11karolherbst: but I couldn't get my head around what they do
21:11karolherbst: this one entry was the most obvious one
21:11mupuf: e8 03 --> is it the average period?
21:11mupuf: in ms
21:11mupuf: 0x3e8== 1000
21:12karolherbst: might be, yes
21:12mupuf: I wonder what the 64 means too
21:12mupuf: ok, let's have a plan of attack for this. How would we RE this?
21:13karolherbst: my main goal was to figure out how nvidia decides what the highest possible power consumption is
21:13karolherbst: and point is, the ever header fields didn't help with that
21:13mupuf: karolherbst: well, sure, you likely are in the right place
21:14karolherbst: there is one important byte in the entries
21:14karolherbst: which is byte 0
21:14karolherbst: this is some kind of flag byte
21:14mupuf: now, do we agree that each cap is for certain conditions, right?
21:14karolherbst: giving those entries certein "functions"
21:14karolherbst: or rather meaning
21:14karolherbst: I couldn't agree to this yet
21:14karolherbst: might be, but no
21:14karolherbst: look at those entries
21:14karolherbst: it makes hardly sense
21:15mupuf: well, what does "min" means anyway? :D
21:15karolherbst: no idea
21:15karolherbst: I think it depends on the meaning of the entry
21:16karolherbst: this is my table: https://gist.github.com/karolherbst/fc0142816040ad02a65e5bc723b07ac6
21:16mupuf: by any chance, how likely is it that the same conditions you got for the vptable would apply here?
21:16mupuf: that would greatly help, right?
21:16karolherbst: it would, if it would make sense
21:17mupuf: there may be other factors
21:17karolherbst: but if you look at my table... it makes hardly sense anymore
21:17mupuf: why do you select the entry 7 when "nvidia-smi cap entry: 255"?
21:17karolherbst: especially because our header is nearly the same
21:17mupuf: well, do not expect OEMs to do the right thing
21:17karolherbst: I didn't change that part
21:18mupuf: they botch vbios all the time
21:18karolherbst: I know that the 00 and the 01 byte _change_ things
21:18karolherbst: they don't select entries
21:18karolherbst: if you flip the 01 to 00, there is no power capping anymore
21:19mupuf: what about if you set it to 3?
21:19karolherbst: the painful part is, that nvidias driver is also kind of crappy here
21:19karolherbst: chances are high if I do something wrong, the driver crashes
21:19karolherbst: it's really no fun to RE this table
21:19mupuf: yeah, they got really bad at this
21:19karolherbst: I think I wrote stuff down at some point
21:19karolherbst: let me find it
21:20mupuf: being able to figure out what is co-depend would help
21:20karolherbst: one thing I am sure of is
21:20karolherbst: that byte 0 of the entries is the key to most questions
21:20karolherbst: and it is splited in two parts
21:20karolherbst: 0x02 mask means "affects power cap"
21:21karolherbst: so entry 0 is important for the actual power cap on my gpu
21:21mupuf: so you think that the entry is like ap rogram?
21:21karolherbst: 0xc0 _changes_ the parsing
21:21mupuf: and the byte 0 is a condition on how to apply the other values as a mask?
21:21karolherbst: so if I have only 0x02 a different power cap is there
21:21karolherbst: or a differen behaving one
21:21karolherbst: but then there is entry 3
21:21mupuf: well, I doubt it but this is possible
21:22karolherbst: which makes like no sense
21:22mupuf: it is unused for you, if we are to believe this
21:22karolherbst: I have a long weekend in the first week of februrar
21:22karolherbst: I guess instead of going to fosdem I will re some tables
21:23karolherbst: yeah, with yours it is obvious
21:23karolherbst: the power cap is 228W and 243W criticial
21:23karolherbst: nvidia-smi should tell you the same
21:24karolherbst: maybe the min value in 7 means something like "minimu power consumption on full load"?
21:25mupuf: probably is a bump the clocks one
21:25mupuf: but why not have done it earlier anyway?
21:25karolherbst: highly doubt it
21:25mupuf: exactly, you should be surfing the avg power usage
21:26karolherbst: nvidia doesn't care that much about power consumption though afaik
21:26karolherbst: except you are near the budget
21:26mupuf: yeah, that makes a lot of sense
21:27karolherbst: anyway, I am more interested in the P.50 table
21:27karolherbst: this is more important right now
21:27karolherbst: well somehow
21:27karolherbst: if we know the power cap, this helps as well
21:27karolherbst: because we can at least protect the GPU from drawing to much power
21:28karolherbst: and then, we should figure out how to software throttle the GPU, which we do with P.50
21:28karolherbst: we hardly reach the power cap anyway yet
21:34mupuf: karolherbst: agreed
21:35karolherbst: I mainly wanted to push the cap into hwmon so that user complain if the values make no sense at all, but I am pretty sure that I know what at least this one byte in the header means
21:36mupuf: well... hmm
21:36mupuf: I could not complain about this
21:37mupuf: but at least make it clear that the parsing is very likely wrong
21:37mupuf: and that you are trying to collect data more easily
21:37karolherbst: well, the parsing is very likely right, because I confirmed it with nvidia-smi
21:38karolherbst: there might be rules to overwrite those values
21:38mupuf: ack, please detail your RE in the cover letter for the patches
21:38karolherbst: at least I know that if this byte is set, it has preference over the way my table is parsed
21:38karolherbst: if the header isn't set
21:38karolherbst: nvidia-smi doesn't show any power cap at all
21:38karolherbst: *header byte
21:39karolherbst: so my current theory is: this byte selects a "virtual" or "unconditional" power cap, where a different kind of power capping might occur depending on all the other fields/entries
21:39karolherbst: and situation
21:51karolherbst: mupuf: gpus within reator: https://gist.github.com/karolherbst/024ec932c724e44bd68bf036310c6fb9
21:52karolherbst: power budget entry of the gm206: 6: min = 60000 mW, avg = 130000 mW, peak = 150000 mW (unkn12 = 7650)
21:52karolherbst: power budget entry of the gm107: 2: min = 30000 mW, avg = 38500 mW, peak = 38500 mW (unkn12 = 0)
22:31snkcld: is optimus considered "dedicated graphics"/"discrete graphics"? it is, right?