00:11 jkucia: imirkin_, skeggsb_: It works in 11.2.0-devel (git-63b49e1). Thanks!
00:53 mlankhorst: tagr: ok thanks :)
00:58 mlankhorst: tagr: whats AVP btw?
00:58 tagr: that's the Audio Video Processor, an ARM7 coprocessor used for, well, audio/video processing
00:59 mlankhorst: ah
03:27 karolherbst: RSpliet: :D
04:31 karolherbst: mhh those nvd7 vbios files are looking really like kepler ones for whatever reason
04:31 karolherbst: just with some stuff missing
05:39 imirkin: jkucia: if you do a (reverse) bisect, i can try to get the relevant change backported for 11.0
05:43 RSpliet: karolherbst: that's well possible. iirc nvd7 has more similarities with kepler
05:44 RSpliet: (was that not the first with the new display engine?)
05:44 RSpliet: (oh, that might have been nvd9 instead... :-P)
05:44 karolherbst: no
05:45 karolherbst: nvd9 looks much less like kepler
05:45 karolherbst: I just noticed that the (currently) unk38 offset isn't read out for whatever reason
05:45 karolherbst: but later it is
05:45 RSpliet: nvd9's display block is very keplery, we didn't quite figure out how to get PMU to sync to vblank for those cards yet I think
05:45 karolherbst: envy_bios_parse_power_unk38 doesn't ahve the offset, but envy_bios_print_power_unk38 has
05:47 RSpliet: but yes, there is no guarantee that a given VBIOS version matches a specific generation of cards.
05:47 RSpliet: (which, at the moment is not very well represented in the memory reclocking script)
05:58 karolherbst: meh, I always thought by now devs stopped doing work in display threads, but oh well :/
06:07 karolherbst: anybody against making those structs static? https://github.com/karolherbst/envytools/blob/master/nvbios/power.c#L58
06:07 karolherbst: they get allocated everytime the function got hit ;)
06:09 imirkin: sgtm
06:10 karolherbst: and now I found the error
06:10 karolherbst: envy_bios_parse_power_cstep overwrites the offset of unk38?
06:10 karolherbst: meh
06:11 karolherbst: what a pain in the ass issue
06:11 pq: karolherbst, but if they are static, they only get initialized the first call but not following? is that an issue?
06:11 karolherbst: pq function static?
06:11 karolherbst: they are initiliazed for every function call then
06:11 karolherbst: just like global statics
06:12 karolherbst: only inside function scope
06:14 karolherbst: out of bound access :/
06:14 karolherbst: meh
06:15 pq: global statics get initialized just once, did you just contradict yourself? ;-)
06:16 karolherbst: no
06:16 karolherbst: function statics are the same
06:16 karolherbst: just scoped inside that function where they are declared
06:17 pq: yes, I was asking, isn't that a problem as you initialize with a function argument?
06:17 karolherbst: mhhh right, would need a bit of refactoring, but the thing is always the same
06:17 imirkin: karolherbst: static const.
06:19 karolherbst: pq: you can have something static inside the function depending on the function parameters
06:19 karolherbst: but then only the first call ever counts
06:19 pq: karolherbst, yes exactly, I was asking if that is a problem :-P
06:19 karolherbst: I doubt that
06:20 karolherbst: but to be clean it should be refactor, right
06:20 karolherbst: *Refactored
06:20 pq: it's certainly very suprising for anyone going to call that function
06:20 karolherbst: now I am too lazy for that :D
06:21 karolherbst: https://github.com/karolherbst/envytools/blob/master/nvbios/power.c#L427
06:21 karolherbst: this loop causes big troubles
06:21 karolherbst: cstep->entriesnum is 8
06:21 karolherbst: but cstep->ent1 is envy_bios_power_cstep_entry1[4]
06:22 karolherbst: and that totally ofervlows into the unk38 struct
06:25 karlmag: karolherbst: envytools/info.c line 254; "bios->chipset = 0x117;" isn't chipset an int? (Sorry if I'm wrong, but I just found that a bit suspicious)
06:25 karolherbst: ?
06:25 karolherbst: what is wrong there?
06:25 karolherbst: can't 0x117 be an integer?
06:26 karlmag: if chipset is an int, then 0x117 > 0xff ?
06:26 karolherbst: ohhh
06:26 karolherbst: int is platform dependent
06:26 karlmag: ah, right.. of course it is..
06:26 karlmag: :-P
06:26 karolherbst: it is at least a WORD I think, not sure though
06:26 karolherbst: but any OS can do as they like usually
06:26 karlmag: I just noticed that in bios.h it was defined as int, so I figured it was better to point it out than leave it in case it was wrong.
06:27 karolherbst: int is 32bit on 32bit linux and 64bit on 64bit linux, not _quite_ sure though. Could be 32bit on both
06:27 karlmag: I'm a real n00b when it comes to programming (C in particular)
06:27 karolherbst: ohh no
06:27 karolherbst: that was with long
06:27 karolherbst: int is 32bit on linux
06:27 karlmag: ok then, sorry for the interruption. Carry on. :-)
06:28 karolherbst: karlmag: for example long is 32bit on 32bit linux and windows, and 64bit on 64bit linux
06:28 karolherbst: so long is also 32bit on 64bit windows ;)
06:28 karlmag: yeah, isn't it fun? :-P
06:29 karlmag: In my world an int probably will (more or less) stay 8bit..
06:29 karlmag: *shrugs*
06:30 karolherbst: imirkin, RSpliet: is this okay for you? https://github.com/karolherbst/envytools/commit/34999c5d36f6ad843582e358bf4870f8cd5e8904
06:31 imirkin: karlmag: outside of programs compiled for 16-bit real mode, int is always 32-bit on x86. in those (very old) programs, it's 16-bit.
06:31 imirkin: karolherbst: sgtm
06:32 imirkin: karolherbst: are there other asserts btw? if not, i'd prefer some sort of nicer way of handling this
06:32 imirkin: but ultimately i don't reallyc are
06:32 karolherbst: I bet they are
06:32 karolherbst: maybe not
06:33 karlmag: imirkin: last time I did programming was around 15 years ago I think. Except a bit on arduino (which is 8bit) in later years. I guess I'm not quite up to speed to say the least :-P
06:34 imirkin: karlmag: 15y ago was 2000. already well into the 32-bit heyday
06:34 karolherbst: mhh before that I never used assert, but now I felt why someone should use them :D
06:35 imirkin: karlmag: if you don't know about far pointers, _farmalloc, etc -- it was all before your time :)
06:37 karlmag: imirkin: Not really sure I programmed in any language really requiring knowing that much about variable sizes.
06:38 karlmag: Maybe I'll be able to sit down and learn enough to be useful at least to myself, hopefully to others too.. At some point
06:38 karlmag: <- too many projects.. always.. I need to live till I become 350 or so I think.
06:38 imirkin: nah, just get more hours in the day
06:38 imirkin: that's what i do!
06:39 karolherbst: who needs sleep anyway :p
06:40 karolherbst: karlmag: may I intruduce you to the 6 day week?
06:40 karolherbst: aka 28 hour day
06:40 karlmag: imirkin: it's still limited to 24, and I've found that some are required for sleep (at least some of the days) and I need paying work, because otherwise I can't eat or buy cool stuff :-P
06:40 karlmag: karolherbst: hehe
06:40 karolherbst: https://imgs.xkcd.com/comics/28_hour_day.png
06:40 karlmag: karolherbst: I've heard about it before. Unfortunately it doesn't play well with "normal" work..
06:41 karlmag: and other "fixed" activities
06:41 karolherbst: yeah well
06:41 karolherbst: there is always a sacrifice to everything
06:44 imirkin: karlmag: can't have it all
06:45 karlmag: imirkin: oh, I do want... but yeah, I know that. Older and wiser (?) and all that :-P
06:57 mwk: karlmag: int is guaranteed to always be at least 16-bit by C standard, and is 32-bit on any modern platform
06:58 imirkin: was it 18- or 36-bit on those funky pdp's?
06:59 karlmag: imirkin: might have ben even weirder values than that.
06:59 karlmag: mwk: thinking about it, I might have mixed it up with "char" or whatever.
06:59 imirkin: char is, amusingly, an unsigned short on java
07:00 imirkin: the only unsigned type available
07:00 karlmag: 36 is (8+1)*4 btw.. ECC ? :)
07:01 imirkin: no, just 36-bit
07:01 karlmag: I know
07:01 imirkin: no fundamental reason for words to be a power-of-two bits
07:02 karlmag: I seem to remember 41 bit words for some really weird type of machine too, but can't for my life remember which.
07:03 karolherbst: mwk: no, there is none
07:03 karolherbst: mwk: only int >= short
07:04 karolherbst: ohh wait
07:04 karolherbst: at least in C99 int has to be at least 16 bit
07:06 karolherbst: imirkin: well char in C is neither signed nor unsigned, so this is also kind of weird ;)
07:09 imirkin: i guess
07:16 karlmag: a bit like quantum mechanics then. (Though you might not be sure even if you observe the char)
07:34 RSpliet: karolherbst: good catch... valgrind or good old facedesk?
07:35 RSpliet: I think it's acceptable, but check with mwk whether he minds assertions in nvbios (otherwise just do a conditional printf + return with an error code)
07:35 karolherbst: RSpliet: mhh qtcreator debugger :D
07:35 karolherbst: so facedesk
07:39 karolherbst: RSpliet: I think the guess was right that the first byte is the pstate: -- entry 10, pstate = f, clock = 324 MHz, unk = 0 -- entry 11, pstate = 7, clock = 324 MHz, unk = 0
07:39 karolherbst: and it makes somehow always sense
07:40 karolherbst: RSpliet: my patch does something like that now https://gist.github.com/karolherbst/28fcfc36013873249077 (this is from a nvd7)
07:40 karolherbst: any suggestions for the layout?
07:46 karolherbst: RSpliet: I think this table isn't as kepler specific as I thought, I also found a nvc1 with it
07:49 mwk: karolherbst: assertions in nvbios is a rather bad idea
07:49 mwk: since we don't really know the bios format are are just guessing at many things, we'd want nvbios to print as much as it can
07:49 karolherbst: yeah I can change it to an error print, I don't mind that big
07:49 Tom^: karolherbst: sure im all free for testing various things on the weekend.
07:49 mwk: if something fails, just error a single table and print the others
07:50 mwk: assert is kind of at odds with that
07:50 mwk: also, do not *ever* use assert for input validation
07:50 karolherbst: so if and ENVY_BIOS_ERR?
07:50 mwk: it has an annoying habit of being compiled out of non-debug builds
07:51 karolherbst: yeah I know
07:51 mwk: it's only ever ok to use to verify you did not mess something up in your own calculations
07:51 RSpliet: karolherbst: that's a good start... but would you mind making that hierarchical? (eg print the clocks in a for (i = 0; i < secount; i++) loop)
07:52 RSpliet: we haven't seen it yet, but the way it's written down obscures the fact that this hierarchy exists
07:56 karolherbst: mwk: better? https://github.com/karolherbst/envytools/commit/3f240d2026711dadaff2c9815420f04227216876
07:56 karolherbst: RSpliet: k
07:56 RSpliet: good stuff!
07:59 RSpliet: when you go and push upstream, make sure to squash the "remove asserts" patch into "don't go out of bounds" btw
08:00 karolherbst: RSpliet: I already did pushed the one commit :/ sorry
08:00 RSpliet: hmm okay, too late I guess
08:00 RSpliet: well, don't worry about it then
08:01 RSpliet: we'll just call it a "learning moment" then ;-)
08:02 karolherbst: :D
08:12 karolherbst: RSpliet: better? https://github.com/karolherbst/envytools/commit/1d15f0cd227e95dbe47398e987ea2e3f5898e471
08:13 karolherbst: it will look like this now: -- entry 0, pstate = f, unk = 11781d4b, clock0 = 1725 MHZ
08:20 karolherbst1: meh
08:20 karolherbst1: and this time it wasn't nouveaus fault that my kernel crashed
08:20 karolherbst1: D:
08:25 karolherbst: Tom^: I managed to start the application with wine though
08:25 RSpliet: karolherbst: better yes. I'd personally prefer a format like you see with the perflvl table or the training data because I hate arbitrary line wrapping (I often parse VBIOSes while in an 80x24 terminal :-P), but it's hard to understand what the data will be like once NVIDIA starts using the subentries (if...)
08:26 RSpliet: so for all I know this might just be sufficient
08:26 karolherbst: RSpliet: yeah, I just thought inserting a new line just in case there _might_ be more makes things somehow ugly for the general case :/
08:27 karolherbst: did anybody of you get something like that: https://bugzilla.kernel.org/show_bug.cgi?id=104071 =
08:27 karolherbst: maybe nouveau meses up something in the runpm parts
08:27 RSpliet: with three clocks this line will wrap... we can always change that later I guess :-)
08:29 karolherbst: yeah
08:29 RSpliet: graduately when we figure out what the two unknown 16-bit ints are for, formatting will change anyway
08:29 karolherbst: I just ran evry vbios through this
08:29 RSpliet: nitpick, it's MHz, not MHZ :-)
08:29 karolherbst: :D
08:29 karolherbst: ohh wait I have to run everything through that again
08:32 karolherbst: RSpliet: maybe the subentries are used for dual core gpus?
08:32 nchauvet_: hi, is it possible that running bbswitch kernel module would "lock" or permanently disable the nvidia gpu accross reboot in an optimus configuration ?
08:33 nchauvet_: I'm reading this , but not sure if there is the info :http://nouveau.freedesktop.org/wiki/Optimus/
08:33 karolherbst: nchauvet_: yes
08:33 karolherbst: nchauvet_: the gpu has to be turn on _before_ the machine unloads the kernel
08:33 karolherbst: same deal with kexec
08:34 nchauvet_: okay, so that might explain why xrandr doesn't output the same as before
08:34 karolherbst: depends
08:34 karolherbst: usually bumblebee takes care of that
08:35 RSpliet: apart from the nit: I'm not completely sure whether "base_clock" covers the contents well, but that'll easy end up in bikeshedding so I'm not going to make a suggestion there
08:35 RSpliet: maybe tagr or gnurou want to drop the (semi-)official name if they care about consistency, otherwise I'll leave that to the veterans :-P
08:35 RSpliet: with those minor issues addressed, I'm game for merging
08:35 RSpliet: karolherbst: I... hmm... well, I'd assume each core has it's own VBIOS
08:35 RSpliet: but who knows
08:36 RSpliet: (shameless re-post after that little mass-pingtimeout coming up:
08:36 RSpliet: apart from the nit: I'm not completely sure whether "base_clock" covers the contents well, but that'll easy end up in bikeshedding so I'm not going to make a suggestion there
08:36 RSpliet: maybe tagr or gnurou want to drop the (semi-)official name if they care about consistency, otherwise I'll leave that to the veterans :-P
08:36 RSpliet: )
08:40 nchauvet_: I don't understand what should handle the needed issue in upstream kernel with this oot module
08:40 nchauvet_: (oot module is bbswitch here)
08:49 Tom^: karolherbst: oh ok
08:52 karolherbst: nchauvet_: bbswitch.unload_state=1
08:53 nchauvet_: karolherbst, yep, but either why this bbswitch is not upstream or any other upstream module can take over this capability ?
08:54 karolherbst: nchauvet_: no, except nouveau
08:54 karolherbst: well acpi_call can also do it
08:54 nchauvet_: or maybe there is plan to handle things differently with prime ? (never deal with software/mux) but disabling the dGPU with nouveau or else ?
08:54 karolherbst: but then you need to do an acpi call
08:54 karolherbst: :D
08:54 nchauvet_: karolherbst, acpi_call isn't another oot module ?
08:54 imirkin: nchauvet_: the upstream way is to use nouveau.
08:55 karolherbst: nchauvet_: if you build your kernel yourself: you _need_ to enable vgaswitcheroo ;)
08:55 imirkin: nchauvet_: acpi_call is provided by the kernel (potentially under acpi debug features)
08:55 imirkin: nchauvet_: however if you use it, you're on your own
08:56 imirkin: nchauvet_: nouveau will power your gpu on/off as needed
08:56 imirkin: if you fight with it, your hw is likely to lose :)
08:56 nchauvet_: okay, so bbswitch is nvidia only ?
08:56 karolherbst: nchauvet_: bbswitch is neither
08:56 imirkin: bbswitch can be used with whatever, you just have to be super-careful.
08:56 karolherbst: bbswitch just does a acpi call
08:57 karolherbst: nchauvet_: I have all of that stuff here in parallel for example
08:57 imirkin: however i advise strongly against using bbswitch with nouveau
08:58 imirkin: just coz karolherbst does it doesn't mean everyone should :) he does it because he (a) has a solid understanding of the underlying issues and (b) constantly switches between nvidia and nouveau
09:04 karolherbst: not so much anymore though
09:04 karolherbst: I mean switch between nvidia and nouveau
09:04 karolherbst: just nouveaus runpm is a bit bricked
09:04 karolherbst: worst case scenario: gpu hangs, clients are destroyed and nouveau just turns the gpu off while some nvioread operations are going on
09:04 karolherbst: have to figure them out sometime
09:07 karolherbst: mwk: so is this fixup fine? https://github.com/karolherbst/envytools/commit/3f240d2026711dadaff2c9815420f04227216876
09:07 karolherbst: I don't think I got any answer from you :p
09:37 nchauvet_: well, I need a distro package maintainer level of understanding, so basically for my own usage I would stick to nouveau for desktop, but I sometime needs nvidia binary for toying with cuda. But as an unfortunate distro package maintainer (of nvidia binary for fedora from rpmfusion.org) I need to handle all cases
09:37 nchauvet_: sorry was away on dayjob tasks btw...
09:38 nchauvet_: so as I understand bbswitch should only be usefull for nvidia binary driver, as there is no way to handle switching the dGPU from nvidia binary driver ?
09:41 imirkin: nchauvet_: for the vast majority of users, yes
09:45 karolherbst: nchauvet_: use bbswitch only with bumblebee for the general case
09:46 karolherbst: the use should _never_ have to mess with bbswitch directly itself
09:46 nchauvet_: karolherbst, yeah, but bumbleble is hacking our packaging of the driver in our back, so I might try to figure out what need to be changed
09:53 karolherbst: nchauvet_: well, without bumblebee you can't use the nvidia gpu with the nvidia driver
09:53 karolherbst: on laptops
09:53 karolherbst: or when intel is the main gpu
09:54 karolherbst: nchauvet_: and what do you mean by "hacking"? usually nvidia packages replace the mesa libgl, which is _not_ what the user want with a dual gpu setup where the main gpu is driven by mesa
09:54 karolherbst: I already had the situation where I had to repair stuff on ubuntu machines because of that
09:55 nchauvet_: karolherbst, right, but I can use cuda, using nvidia for OpenGL seems rather high level for me still( despite I try to toy with libglvnd)
09:55 karolherbst: nchauvet_: you can of course
09:55 karolherbst: cuda doesn't depend on X running on the nvidia ddx
09:55 karolherbst: just the kernel module afaik
09:56 karolherbst: but then you don't have the automatic power management anymore
09:56 karolherbst: if you don't use bumblebee
09:56 karolherbst: you want to use bumblebee if you want to stay user friendly, trust me
09:56 nchauvet_: karolherbst, yep, but there are cuda apps using opengl, theses will fails apparently (don't know why)
09:57 karolherbst: nchauvet_: yeah, but then you need to run them through optirun/primusrun
09:58 karolherbst: I bet they use some nvidia extensions to share stuff between gl and cuda
10:10 imirkin: nchauvet_: basically there are a few mutually-exclusive user scenarios. you need to allow switching between them.
10:10 imirkin: nchauvet_: look at how gentoo does it... afaik that's the only distro that does it sanely
10:10 nchauvet_: imirkin, thx, will have a look
10:10 nchauvet_:going away for tonight
23:46 gnurou: re : GM20X texture issue, we have confimed that this has nothing to do with shader operand scheduling (the conservative values used by Mesa are fine). Seems to have to do with texture setup instead?
23:47 gnurou: I went as far as replacing the Mesa fragment shader with one generated by our driver, and behavior was identical
23:48 gnurou: also attributes interpolation is correct, for some reason the TEX instruction just returns black...