03:44 karolherbst: pecisk: hi, mupuf needs your card :p
03:44 pecisk: karolherbst: to do nasty things with it? :)
03:44 karolherbst: of course
03:45 karolherbst: your power sensor configuration is a bit odd on your card
03:45 karolherbst: which completly messed up mupufs first design :p
03:51 RSpliet: karolherbst: interesting... what kind of a file system is MupuFS? :-P
03:51 karolherbst: :D
03:51 karolherbst: multi push fs
03:51 karolherbst: it is for SIMD fs operations
03:52 karolherbst: or was it rather MISD?
03:52 karolherbst: don't know
03:54 mupuf: pecisk: yeah, your card is funky
03:55 mupuf: but right now, I need to be able to read the power consumption from the blob
03:55 pecisk: mupuf: I will have access in 7 hours time
03:55 pecisk: at work atm
03:56 mupuf: i won't be ready by then
03:56 mupuf: maybe during the week end
03:56 pecisk: sure
03:56 mupuf: and if necessary, I will have to be nasty and ... fake having a INA3221 by decoding transactions on the bus and then fake being the device but from the host
03:57 mupuf: it is going to be fun and very cpu-intensive
04:00 karolherbst: mupuf: any idea how to map the right hwmon interface to nouveau?
04:01 mupuf: yes, do the opposite
04:01 mupuf: go to /sys/class/drm/card0/hwmon
04:01 karolherbst: :D
04:01 karolherbst: well
04:01 karolherbst: there is no hwmon
04:02 mupuf: ?
04:02 karolherbst: device/hwmon
04:02 mupuf: ah, here you go
04:02 karolherbst: okay
04:02 karolherbst: this seems easy enough
04:02 mupuf:has no nvidia gpu plugged on his work and home machines
04:02 karolherbst: so in ezbench, do you already know which card is used?
04:02 karolherbst: mupuf: the same with the intel gpu :p
04:03 karolherbst: ohh wait
04:03 mupuf: that is part of the environment
04:03 karolherbst: the intel gpu doesn't have hwmon
04:03 mupuf: yes, I don;t remember intel putting anything there
04:03 mupuf: but I don't work in the kernel for intel
04:04 mupuf: as for ezbench, right now, it will only check if the deployed version is the one you want to test
04:04 mupuf: that is it
04:04 karolherbst: k
04:04 mupuf: the environment is for next week
04:04 karolherbst: I was thinking that I hack power consumption monitroing in ezbench
04:04 mupuf: after the auto bisection
04:04 karolherbst: but for this, I need to know whcih gpu is used
04:04 mupuf: yes, we have a tool for that for intel, hence why I have not worked on it yet for other drivers
04:04 karolherbst: okay
04:05 karolherbst: and there is no plan to support it through hwmon?
04:05 mupuf: ?
04:05 mupuf: support what?
04:05 karolherbst: powr consumption for the intel gpu
04:05 mupuf: no, I doubt it will happen
04:05 karolherbst: mhhh :/
04:05 mupuf: you need to use RAPL for that
04:05 karolherbst: what a nice interface
04:06 mupuf: but even then, RAPL exposes power domains but even us do not know what they actually represent on the chip
04:06 mupuf: so, annoying it is!
04:06 mupuf: nouveau is the odd guy when it comes to hwmon
04:06 mupuf: radeon is a middleground
04:06 mupuf: but /me wanted to expose everything through hwmon
04:07 mupuf: and I see you agree
04:07 karolherbst: I think pushing stuff through hwmon is generally a good idea, seems like I am only of the few that things that way :D
04:07 mupuf: right
04:07 karolherbst: I always remeber these days on my mac, where temperaturemonitor just exposed like 16 sensors :D
04:07 mupuf: so, back to the problem at hand
04:08 mupuf: how can we link a gl context to a gpu
04:08 mupuf: well, well
04:08 karolherbst: :/
04:08 karolherbst: I bet there is a fancy mesa GL ext for this :p
04:08 mupuf: the best way would be to check with /dev/dri/cardX is being open
04:09 mupuf: or renderDXXX
04:09 karolherbst: mhhh
04:09 karolherbst: yeah render
04:09 karolherbst: but this is a bit vague though
04:09 karolherbst: allthough
04:09 karolherbst: mhhh
04:09 karolherbst: may work
04:09 mupuf: and then map it to access through sysfs
04:09 karolherbst: but I don't like this approach :D
04:09 mupuf: I guess you need to strace glxinfo to get this info "s
04:10 karolherbst: ezbench just calls any application or is it GL specific?
04:10 karolherbst: I mean for what should it be used in the end
04:10 mupuf: ezbench does not care that much about the app
04:10 mupuf: the app can do whatever it wants with the environment too :s
04:10 mupuf: or force-load a driver
04:11 mupuf: hence why I leave the environment for the end
04:11 karolherbst: I would rather just preload a hook for specific glx/gl functions
04:11 mupuf: it is a HARD problem
04:11 mupuf: how would that help you?
04:11 karolherbst: mhh right
04:11 mupuf: and how would it work on other drivers than mesa?
04:11 karolherbst: ohh wait
04:11 karolherbst: maybe we could hook up inside the context creation, catch the context and push out which card is used through some nasty gl(x) calls
04:12 mupuf: sure! Let's patch mesa!
04:12 mupuf: hurray!
04:12 mupuf: and gl definitely needs to expose which dri node it is using
04:13 karolherbst: :D
04:13 mupuf: sorry, sarcasm overload :D
04:13 karolherbst: we need to get the pci bus somehow
04:13 mupuf: why do you need the pcibus?
04:13 mupuf: you just need to find the right cardX to go to get to hwmon
04:13 karolherbst: I don't really like the approach what the running application opens inside /dev
04:14 karolherbst: maybe there is a better one
04:14 mupuf:is still thinking about this
04:14 mupuf: and I would definitely value feedback
04:15 karolherbst: maybe preload and hook into open() (or whatever is used for /dev/dri/...) calls :p
04:15 mupuf: but the surest way is strace
04:15 mupuf: how is that better than strace?
04:16 mupuf: strace -e open glxinfo > /dev/null
04:17 karolherbst: how can I pipe the error channel? :D
04:17 mupuf: 2>&1
04:17 karolherbst: yeah well
04:18 karolherbst: that goes into /dev/null already
04:18 mupuf: hehe
04:18 karolherbst: I already tried that
04:18 mupuf: don't redirect to dev null then
04:18 karolherbst: but with a nasty grep it shall be fine
04:18 RSpliet: 2> /tmp/error_trace.txt
04:18 RSpliet: &1 is only a pointer to "whatever your output channel is"
04:19 karolherbst: mhhh
04:19 karolherbst: that is somehow useless
04:19 karolherbst: glxifo doesn't open /dev/dri
04:19 karolherbst: DRI_PRIME=1 glxinfo opens /dev/dri/renderD129 though
04:20 karolherbst: intel opens /sys/devices/pci0000:00/0000:00:02.0/drm/card0/ stuff
04:21 karolherbst: and /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/renderD129/uevent
04:21 karolherbst: mhhh
04:21 mupuf: yeah, I only see the uevents on intel
04:21 mupuf: on dri3
04:21 karolherbst: glxinfo is really nasty
04:21 karolherbst: grep dev: https://gist.github.com/karolherbst/54e286cca698afc71624
04:22 karolherbst: and I am not using my nvidia card
04:23 karolherbst: this is for nouveau: https://gist.github.com/karolherbst/3a9dfd47cea7a662e2d3
04:24 mupuf: open("/dev/dri/renderD129", O_RDWR|O_CLOEXEC) = 5 --> thius is what I expected to see for both
04:24 mupuf: mapping from the render node to the normal node is already a bit annoying but doable
04:24 karolherbst: intel mesa seems to use sysfs
04:24 karolherbst: and not devtmpfs
04:25 karolherbst: mupuf: does ezbench wants to support the blob, too?
04:25 mupuf: the udevice opends are likely from the libudev
04:25 mupuf: yes
04:25 karolherbst: :D
04:25 karolherbst: okay wait :D
04:26 mupuf: I do not want to add unecessary restrictions
04:26 mupuf: and when we want to compare the performance of nouveau with the blob, we will need to be able to do it
04:26 karolherbst: this is with primusrun: https://gist.github.com/karolherbst/dda0e2353244d58710cc
04:26 karolherbst: optirun: https://gist.github.com/karolherbst/0c002523f0a33dd516e1
04:26 mupuf: open("/dev/nvidia0", O_RDWR) = 10 --> as expected
04:27 karolherbst: okay, so the nvidia part seems to be the easiest one
04:28 karolherbst: the question is, how doe we map to the i2c device then?
04:28 mupuf: being able to detect what is the current driver running is a useful feature!
04:28 karolherbst: yes
04:29 mupuf: glxinfo can already tell you the name
04:29 karolherbst: mhhhh :D
04:29 mupuf: gl exposes it
04:29 mupuf: but we need the node
04:29 karolherbst: stupid nvidia, adding nvidia-modeset really messed up bumblebee for good :/
04:30 karolherbst: oh well
04:42 mupuf: karolherbst: what pci id do you get when you do: LIBGL_DEBUG=verbose glxgears?
04:42 mupuf: because for intel, I get funky stuff :D
04:42 mupuf: libGL: pci id for fd 4: 8086:0412, driver i965
04:43 mupuf: but I guess it is not a real problem for intel since there can be only one gpu ... per cpu
04:43 mupuf: darn it :D
04:45 mupuf: libGL: pci id for fd 4: 10de:11c0, driver nouveau
04:45 mupuf: that will work!
04:46 mupuf: hakzsam: are you using reator?
04:46 hakzsam: yes
04:46 mupuf: sorry if I messed up your setup then
04:46 hakzsam: everything is okay
04:51 karolherbst: I really like how nvidia crashes my system somtimes
04:51 karolherbst: mupuf: libGL: pci id for fd 4: 8086:0416, driver i965
04:52 mupuf: well, if we can map this to a pci address like ../../../0000:05:00.0, we have a win
04:52 karolherbst: lspci there ya go
04:52 karolherbst: lspci -nn
04:53 mupuf: lspci -n
04:53 mupuf: very nice
04:56 mupuf: cat /sys/bus/pci/devices/*00:01:00.0/hwmon/hwmon*/temp1_input
04:56 karolherbst: lspci -nn | grep $(LIBGL_DEBUG=verbose glxinfo 2>&1 | grep "pci id" | cut -d\ -f7 | cut -d, -f1) | cut -d\ -f1
04:56 mupuf: so, you just need to rename 00:01:00.0 with what you found in the pciid
04:57 karolherbst: /sys/bus/pci/devices/*$(lspci -nn | grep $(LIBGL_DEBUG=verbose glxinfo 2>&1 | grep "pci id" | cut -d\ -f7 | cut -d, -f1) | cut -d\ -f1)/
04:58 karolherbst: this seems to work for me
04:58 mupuf: not here
04:58 mupuf: but it seems like your line got cut or something
04:59 mupuf: lspci -nn | grep $(LIBGL_DEBUG=verbose glxinfo 2>&1 | grep "pci id" | cut -d\ -f7 | cut -d, -f1) | cut -d\ -f1 --> this one already fails
04:59 mupuf: anyway, are you satisfied with the solution?
04:59 mupuf: it is ugly in bash though
05:00 karolherbst: wait... something is odd here
05:00 karolherbst: and I mean the ugly kind of odd
05:00 karolherbst: wow
05:00 karolherbst: that's a thing
05:00 karolherbst: LIBGL_DEBUG=verbose glxinfo
05:00 karolherbst: this powers on my nvidia card
05:00 mupuf: yes
05:00 karolherbst: even glxinfo does
05:01 karolherbst: but why?
05:01 mupuf: creating an opengl context is enough
05:01 mupuf: because it opens the nouveau device node
05:01 mupuf: and that wakes up the gpu for 5s
05:01 karolherbst: no that's not what I mean
05:01 karolherbst: I run glxinfo for the intel gpu
05:02 karolherbst: OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
05:02 mupuf: well, something is opening the node of nouveau
05:02 mupuf: use strace
05:02 karolherbst: it powers on after Accelerated: yes
05:02 mupuf: how can you trace that so precisely?
05:02 karolherbst: open("/sys/bus/pci/devices/0000:01:00.0/config", O_RDONLY|O_CLOEXEC) = 5
05:02 karolherbst: mupuf: nouveau timeouts
05:02 karolherbst: :D
05:03 karolherbst: I have those stupid init hack of bens
05:03 karolherbst: and this currently has several timeouts
05:03 karolherbst: so
05:03 mupuf: init hacks?
05:03 karolherbst: the card needs some time until it is ready
05:03 mupuf:is not aware of them
05:03 karolherbst: stupid bug
05:03 mupuf: oh
05:03 karolherbst: you will see
05:04 mupuf: well, that's a nouveau bug
05:04 mupuf: so, not on my intel time
05:04 mupuf: ezbench is fine on my intel time
05:04 karolherbst: https://github.com/karolherbst/nouveau/commit/63095dadff5b8ec6787eb42fa741e2d1dec30332
05:05 karolherbst: anyway
05:05 karolherbst: it powers on the gpu :D
05:06 karolherbst: cat /sys/bus/pci/devices/0000:01:00.0/config also powers on the gpu
05:06 karolherbst: mupuf: I don't think its a nouveau bug, because I soly use the intel gl part ;)
05:07 karolherbst: maybe mesa core?
05:07 karolherbst: or something libdrm related?
05:07 karolherbst: or shall nouveau cache those config file somehow
05:09 mupuf: yeah, I meant mesa core
05:09 mupuf: libdrm could make a cache for the values, if necessary, yes
05:10 mupuf: but how?
05:10 karolherbst: why does it read this anyway?
05:10 karolherbst: how is the config of the nvidia card realted to the glxinfo output of the intel one
05:10 mupuf: this is a prime bug
05:11 mupuf: mesa must try to open both devices to figure out what PRIME=1 means
05:11 mupuf: or something akin
05:11 karolherbst: mhh
05:11 karolherbst: I don't even set DIR_PRIME :/
05:11 mupuf: fair point
05:12 mupuf: well, happy debugging!
05:12 karolherbst: :D
05:12 mupuf: not my problem right now :D
05:12 mupuf: as I said, intel time
05:12 karolherbst: I will open a bug and assign to intel drm :p
05:12 mupuf: and I will say "prove it" :D
05:13 karolherbst: meh, then I have to ask nicely in #intel-gfx :p
05:13 mupuf: ;)
05:13 karolherbst: ohh maybe dri-devel is a better place for this
05:13 mupuf: dri-devel would be better suite
05:16 karolherbst: maybe reading out the video memory does something stupid :D
05:16 karolherbst: because it happens exactly before this
05:19 karolherbst: pmoreau: can you do "glxinfo ; cat /sys/kernel/debug/vgaswitcheroo/switch" as root?
05:20 karolherbst: and tell me if your second gpu is turned on?
06:19 karolherbst: hehe
06:19 karolherbst: airlied: I figured out the runpm issue
06:20 karolherbst: lspci powers on the gpu
06:20 karolherbst: like always
06:27 karolherbst: mupuf: it is caused by pci_system_init called inside drm_intel_probe_agp_aperture_size
06:27 karolherbst: :o
06:27 karolherbst: :p
06:42 karolherbst: mupuf: you are lucky it is a libpciaccess bug then :p
07:01 mupuf: karolherbst: ahaha
07:02 karolherbst: pci_system_init just iterates over all config files
07:02 karolherbst: :/
07:03 mupuf: not really a bug then
07:03 mupuf: just an annoyance
07:03 karolherbst: well
07:03 karolherbst: it iterates over the config files to get the vendor and device id
07:03 mupuf: I do remember airlied talking about caching the informations for lspci
07:03 karolherbst: it could just read vendor and device
07:03 karolherbst: :D
07:04 mupuf: maybe it is the only portable way
07:04 karolherbst: mhhh
07:04 karolherbst: it is in a liux specific sysfs implementation
07:04 mupuf: ack
07:05 mupuf: then you also need to check if you are not going to break older platforms
07:05 mupuf: check that at least the 2.6.20+ got support for it
07:06 mupuf: or the bare minimum would be 3.0 probably
07:42 ratherDIfficult: hello kids, does anyone know how to terminate threads in the warp?
07:44 ratherDIfficult: should be something like rtt
07:47 ratherDIfficult: terminate fallthrough preempted in tabrtt inside gk110.c
07:56 ratherDIfficult: hmm, the docs say, it is actually exit
07:56 ratherDIfficult: https://media.readthedocs.org/pdf/envytools/latest/envytools.pdf 233
08:02 mupuf: this is not super nice to call us kids, as it implies we are kidding around .... which is not entirely untrue for some of us :D But seems like you got your answer :p
08:11 ratherDIfficult: mupuf: allright ill call you grownups than, however i gotta update my kernel, anyone knows if gt730 is supported by nouveau?
08:12 karolherbst: ratherDIfficult: everything below gm20x should work fine if you care about hardware acceleration
08:12 kubast2: gm20x is maxwell?
08:13 kubast2: *secound gen maxwell
08:13 ratherDIfficult: karolherbst: i used some kind of mint 17.1 with ancient kernel, and nouveau did not work out, i'll try something newer
08:13 karolherbst: kubast2: yes
08:14 kubast2: ratherDIfficult did you tried to use 3.19 on lm
08:14 kubast2: the newest that is in official repos
08:15 ratherDIfficult: kubast2: hmm, not yet probably, i can tell what kernel version i was on though
08:15 ratherDIfficult: Linux mlinux 3.13.0-24-generic
08:15 kubast2: 3.19.0-28-generic
08:16 kubast2: it works fine with newest nvidia drivers and lm nouveau
08:16 ratherDIfficult: kubast2: you have that same card working with that kernel?
08:16 ratherDIfficult: what is lm nouveau?
08:16 kubast2: gtx 650
08:16 kubast2: linux mint's
08:16 kubast2: *it's older
08:16 kubast2: than the newest one
08:17 ratherDIfficult: anyways sounds like the card has worked for someone based off web information, but there are two versions of that card
08:17 kubast2: maybe drm version is new+hw video acceleration fixes nothing beside that.
08:17 ratherDIfficult: 64bit and 128bit
08:17 karolherbst: ratherDIfficult: actually there are three
08:18 karolherbst: one fermi and two kepler
08:18 karolherbst: ohh gtx 650
08:18 kubast2: https://en.wikipedia.org/wiki/GeForce_700_series
08:18 karolherbst: for the gtx 730 there are thrww
08:18 kubast2: 128 bit ddr3 is fermin I think
08:18 kubast2: GF108
08:18 karolherbst: yes ane one DDR3 and one GDDR5 kepler
08:19 kubast2: GK208-301-A1[gddr 64] GK208-400-A1[gddr5]
08:19 ratherDIfficult: i have ddr3 version
08:19 karolherbst: fermi or kepler?
08:19 ratherDIfficult: but i dunno yet if 64 or 128bit version
08:19 ratherDIfficult: dunno actually, i thought they were all keplers
08:19 kubast2: https://en.wikipedia.org/wiki/GeForce_700_series
08:20 shakesoda: the 750 is the only kepler in the 700 series isn't it?
08:20 kubast2: gf 108
08:20 kubast2: is fermi
08:20 shakesoda: er, no, the 750 is the maxwell
08:20 ratherDIfficult: i switched to hsw which i will be working first, but i have some questions about a trap/interrupts, i wanna inject them to rasterizer threads
08:20 shakesoda: don't mind me.
08:20 kubast2: used in mobile gt 5xx series
08:21 ratherDIfficult: so any documentation, can the trap execute some custom routine before any other instruction continues, or just popping the stack in the end of rasterizer stream will do it without the trap
08:22 ratherDIfficult: i am wondering i do not see anything obvious how the rasterizer threads get killed among the sent stream, for intel it's easy as there is EOT in the end
08:23 ratherDIfficult: theretically it does not have to exit the threads, cause fragment shader may continue with the same set
08:26 ratherDIfficult: karolherbst: are you up to running a little test for me on your card?
08:27 karolherbst: ratherDIfficult: it really depends on what it is
08:27 ratherDIfficult: https://github.com/freedreno/mesa/blob/master/src/gallium/drivers/nouveau/nv50/nv50_state.c append something to pop the stack to the memory and try reading it back
08:29 karolherbst: ratherDIfficult: no idea how to do that, sorry
08:30 ratherDIfficult: wait a bit, i give the exact instructions, at the moment i only see mmio functions to pop the stack, it needs to be poped into memory and some piglit tests on lines for instance should be run
08:33 ratherDIfficult: http://envytools.readthedocs.org/en/latest/hw/falcon/data.html#pop-from-stack-pop
08:34 karolherbst: ratherDIfficult: that's the falcon, it has nothing to do with the stuff where the usualy binaries are running at
08:36 ratherDIfficult: its a method to pop from the top of the thread stack, but i dunno what the increment by 4 does
08:37 ratherDIfficult: wait, i think the code segment is held inside some reg, but to read that, vertex arrays are needed to be done in piglit test then
08:44 ratherDIfficult: well that is bit silly to get from top of the stack and increment by four, mwk: maybe you meant pop from the bottom of the stack and increment by four?
08:47 karolherbst: ohh what is ASIC quality and how do I get that value? :D
08:48 RSpliet: approx $9000 per square millimeter I believe, when produced in small quantity
08:48 RSpliet: well, that's the ASIC value
08:48 RSpliet: ASIC quality is obviously 42
08:49 karolherbst: :D
10:50 imirkin: hakzsam: i guess you finally completed your GSoC :)
10:51 mupuf: even without the additional two year, he would have been late :D
10:52 mupuf:is such a bad mentor for even proposing the project!
10:54 karolherbst: :D
10:55 karolherbst: mupuf: you have splitted it in like 3 projects ;)
10:55 karolherbst: and let him do all three
10:55 mupuf: 3?
10:55 karolherbst: I don't know
10:55 karolherbst: how long is a GSoC project, 3 months? :D
10:55 karolherbst: mhhh
10:56 karolherbst: I see
10:56 karolherbst: :D
10:56 mupuf: don't forget this year's project, adding support for apitracre
10:56 karolherbst: :O
10:56 mupuf: I mean, adding support for performance counters to apitrace
10:57 mupuf: ah! Here we go. finally! I fixed the shit that was my state handling and locking and I finally got ezbench to do the right thing when needing to compile a new kernel and reboot to test something :)
10:58 mupuf: and I now have ezbenchd, run by systemd
10:58 imirkin: wow you really don't want me to use your thing, huh :p
10:58 mupuf: you can run it with whatever you feel like, ilia :D
10:59 imirkin: ah, so just a regular daemon
10:59 mupuf: openrc, if that is what you use
10:59 imirkin: not some sort of crazy systemd plugin
10:59 mupuf: nope, nothing systemd-related here
10:59 mupuf: except that I do not daemonize the code myself, if you need to, you will need to use the daemonize tool for that
11:00 imirkin: excellent
11:01 mupuf: time to clean up a bit and start releasing some profiles :)
11:01 mupuf: imirkin: do you use grub?
11:01 hakzsam: imirkin, ahah, not exactly, still need to complete those PCOUNTER ones :)
11:01 imirkin: hakzsam: getting there :)
11:01 mupuf: I use grub-reboot to select which kernel to boot on
11:01 mupuf: and if it fails, the next reboot will be on a stable kernel
11:02 imirkin: heh. you make a lot of assumptions about this stuff
11:02 hakzsam: mupuf, imirkin but well, this was not a three months project, just impossible to do ;)
11:02 mupuf: not that I handle the case just yet
11:02 mupuf: hakzsam: stop making excuses!
11:02 imirkin: like that people use grub2
11:02 hakzsam: mupuf, :p
11:03 mupuf: you just needed to be 100 times faster, you damn-lazy southener!
11:03 karolherbst: what is grub :p I heard it slows down boots
11:03 mupuf: imirkin: yes, grub2 works too
11:03 hakzsam: mupuf, your first idea was to understand GL pipeline using perf counters in 3 months, isn't? :p
11:03 mupuf: ah ah, well, in this case, it helps
11:03 imirkin: mupuf: you assume that they do. but e.g. i don't
11:03 mupuf: imirkin: what are you talking about?
11:04 imirkin: mupuf: grub-reboot
11:04 mupuf: hakzsam: that project was completely feasible :D
11:04 hakzsam: lol
11:04 mupuf: more seriously, we will still need to do it at some point :p
11:05 mupuf: but we can thank nvidia that we do not have to do it right now
11:05 hakzsam: mupuf, please, send a proposal for the next gsoc :p
11:06 mupuf: hakzsam: ah ah
11:06 mupuf: the next proposal will be to complete the gui of qapitrace I guess
11:07 mupuf: by then, I should write the tests for apitrace in order to get the code accepted upstream
11:07 mupuf: one thing at a time though!
11:07 hakzsam: that seems to be feasibile in three months this time :D
11:08 hakzsam: mupuf, the backend is almost ready to be upstream I guess
11:08 mupuf: the code is ok, says the maintainer
11:08 hakzsam: nice
11:08 mupuf: but he wants us to add tests to get the code upstream
11:08 mupuf: which is fine
11:09 hakzsam: sure
11:09 mupuf: and it makes sense
11:09 mupuf: well, time will tell :D
11:09 mupuf: After 3 years, maybe we will finally have a usable solutions to profile applications :D
11:09 hakzsam: and then we could add perfkit support too
11:09 mupuf: yop
11:10 mupuf: We have come a long way!
11:10 mupuf: But hey, we may still beat Intel on this
11:10 hakzsam: hehe
11:10 mupuf: have you seen the mail about not using perf anymore?
11:11 hakzsam: no, link?
11:11 mupuf: lengthiest cover letter I have seen in a while
11:12 mupuf: wait a sec
11:12 mupuf: https://lwn.net/Articles/658715/
11:13 hakzsam: oh this one
11:13 hakzsam: I saw it but I didn't read
11:13 hakzsam: I'll do
11:13 hakzsam: mupuf, so basically, i965 won't use perf for their perf counters?
11:14 mupuf: yes, but this is about linux here, so it is i915. </pedantic>
11:14 hakzsam: okay
11:18 karolherbst: this libpciaccess issue is just stupid :/ oh well
11:19 karolherbst: mupuf: if I have problems with my intel hardware, can I poke you about them :p or could you ask somebody else too look at them? I have some serious intel_pstate issues I don't get any usefull response yet
11:19 mupuf: ah, what issues?
11:19 mupuf: want to talk about it on #intel-gfx?
11:19 karolherbst: cpu related
11:20 karolherbst: first: turbo disabled after suspend, second: some cores don't want to go into deeper C states and stay at C1
11:20 mupuf: well, pstate was already a dead give away :D
11:20 mupuf: well, for that, I have no answer, sorry :s
11:20 mupuf: tried contacting the maintainer?
11:21 karolherbst: https://bugzilla.kernel.org/show_bug.cgi?id=101671
11:21 karolherbst: I could send a mail though :/
11:21 karolherbst: but the turbo issue is not the annoying one
11:21 karolherbst: the C state thingy is :/
11:21 karolherbst: maybe I should open a bug for that
11:22 karolherbst: hey, way, I have acpi-cpufreq compiled now, testing this forst
11:22 karolherbst: *first
11:37 karolherbst: mupuf: cpu seems to be cooler now with acpi driver :/
11:37 karolherbst: weird
11:38 karolherbst: mupuf: what would you say should nvkm_volt_get return when the gpu is off?
11:43 mupuf: 0V
11:44 karolherbst: okay, because it returns 0.6V
11:45 mupuf: well, if reading the voltage wakes up the gpu, then we should return the real voltage
11:45 mupuf: if it does not, then 0V is a good idea
11:45 karolherbst: it doesn't wake up the gpu
11:45 karolherbst: and shouldn't
11:46 karolherbst: otherwise sensord would be kind of bad :D
11:48 karolherbst: mupuf: I bet the pwm method of yours returns an error
11:48 karolherbst: and then the code jumps into this gpio thingy
11:50 karolherbst: mupuf: what does nvkm_rd32 return when the gpu is off? :D
11:51 mupuf: usually 0xffffffff
11:51 karolherbst: any idea what bios->base + bios->pwm_range * 0xffffffff / 0xffffffff is? :p
11:51 karolherbst: :D
11:52 karolherbst: so your code returns bios->base when the nvkm_rd32 calls are both returning -1
11:52 karolherbst: seems right I think
11:54 karolherbst: yeah
11:54 karolherbst: sending out a patch if you don't mind
11:57 karolherbst: mupuf: looks good? https://github.com/karolherbst/nouveau/commit/d13beaccbfa1e4c9d64d8251a6cf456722e61509
11:57 karolherbst: maybe you want to take care of that in your iccsense code too? it returns 0 currently, but maybe an error would make more sense too, maybe not
11:59 karolherbst: ohh wait
11:59 karolherbst: this breaks voltage for gpio based ones :/
11:59 karolherbst: messy
11:59 mupuf: karolherbst: nope, this not acceptable as the chipset may decide to return whatever it wants
11:59 karolherbst: ohhh :/
11:59 karolherbst: any idea how to deal with it then?
12:00 mupuf: hmm, I guess checking what is the current runpm state?
12:00 karolherbst: mhh
12:01 mupuf: but where should it be done?
12:01 karolherbst: everywhere ;)
12:01 mupuf: and it should be done in a ton of places, so it is not really acceptable
12:01 mupuf: well, that is not true
12:01 mupuf: it is only for a handful of sysfs files
12:02 mupuf: temperature, voltage and power should be it
12:02 karolherbst: what about the fan?
12:02 mupuf: and fan
12:02 karolherbst: do we want to handle that in the sysfs implementations or rather in the nvkm_ functions?
12:03 mupuf: hard to tell, nvkm is going to be hard because it cannot know the runpm state
12:03 karolherbst: right
12:03 mupuf: but when we start virtualizing, it is going to be fun too
12:03 karolherbst: mhh
12:13 imirkin_: skeggsb_: FTR, repro'd your issue on my GK208. weird that it doesn't show up on GF108.
12:13 imirkin_: (the glamor issue)
12:26 imirkin_: karolherbst: what does this mean? Das Argument ist ungültig
12:26 karolherbst: argument is invalid
12:26 imirkin_: k, that's what i assumed. thanks
12:26 karolherbst: ü: ü
12:29 karolherbst: mupuf: or we just remove hwmon interface when the gpu is off
12:30 karolherbst: though I don't know what implications that has for sensord
12:30 mupuf: hmm
12:31 mupuf: well, that has merits
12:31 karolherbst: I suspect there a lot of userspace application which just check once which interfaces are there
12:31 karolherbst: and then don't search for new ones
12:31 karolherbst: the question is: how much do we care
12:32 karolherbst: mhh
12:32 karolherbst: maybe there is something in the hwmon docs
12:33 imirkin_: whoa. blob drivers emit KHR_debug messages now
12:33 imirkin_: 4192: message: api issue 131185: Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) has been mapped WRITE_ONLY in SYSTEM HEAP memory (fast).
12:33 imirkin_: 4354: message: api performance issue 131218: Program/shader state performance warning: Fragment shader in program 25 is being recompiled based on GL state.
12:33 imirkin_: fancy
12:33 karolherbst: very
12:33 karolherbst: ohh right, the blob recompiles stuff sometimes
12:34 imirkin_: which is weird coz we never do ;)
12:34 karolherbst: right
12:34 imirkin_: but we should. but only in VERY rare circumstances
12:34 karolherbst: why?
12:34 karolherbst: I mean why only rare?
12:34 karolherbst: sometimes some inputs are always the same
12:35 karolherbst: then this could be simply eliminated
12:35 imirkin_: ?
12:35 karolherbst: I have noe clue about opengl, but I could imagine that sometimes a shader always get's the same input
12:35 imirkin_: you recompile when your shader would emit the wrong thing
12:35 karolherbst: or part of the input is always the same
12:35 imirkin_: basically there are some bits of GL state that affect how a shader works
12:36 imirkin_: in those cases you have to recompile
12:36 imirkin_: like glShadeModel(GL_FLAT) and a few others
12:36 karolherbst: ohhh okay
12:36 imirkin_: right now our shaders just don't work --problem solved
12:36 imirkin_: they kinda-sorta work enough, but not fully compliant
12:36 karolherbst: I thought like recompiles are also done, if you find some potential optimizations
12:37 imirkin_: yeah, you could do that
12:37 imirkin_: like inlining constbuf values
12:37 karolherbst: I think I really saw the blob doing it, at least that's what I thought
12:39 imirkin_: skeggsb_: anything odd about suspend/resume wrt application? i guess if it has *any* implicit buffer references that happened to work by luck, that will work no more?
12:59 hakzsam: imirkin_, pushed with all of your comments
13:01 karolherbst: I don't like my todo list, anything else I could do? :D
13:02 karolherbst: though clock gates for fermi+ are nice
13:02 karolherbst: yes, I will take care of that
13:02 karolherbst: mupuf: any idea about the subdev? or shall I just create a new one called "pwrgate" or something
13:03 karolherbst: or clkgate
13:03 mupuf: I think we need to study it more
13:03 mupuf: but a good way could be to try
13:03 karolherbst: yes, but setting those regs is a good first step already
13:03 mupuf: yes
13:04 karolherbst: it's around10% for me
13:04 karolherbst: this is a lot already
13:04 mupuf: but you know, when you reset the engine, you should un-do clock gating
13:04 mupuf: disable*
13:04 karolherbst: even when it is on auto?
13:04 mupuf: yes
13:04 mupuf: so I would suggest you study a mmiotrace and see when nvidia touches it
13:04 karolherbst: reset you mean like in _fini
13:04 mupuf: nope, not only
13:04 karolherbst: ohh
13:05 mupuf: it will also be needed when we hang the gpu :D
13:06 mupuf: so, maybe adding hooks in engines would be better
13:06 mupuf: engines, but no only :D
13:07 mupuf: but we can at least add them in engines
13:07 mupuf: you should also map the clock domains to the mmio address space
13:11 hakzsam: imirkin_, http://hastebin.com/ifagovafun --> when compiling in release mode only, r-b?
13:11 karolherbst: mupuf: you mean by mapping I should figure out which reg is used for which engine?
13:11 karolherbst: I mean, domain
13:11 mupuf: yes
13:11 karolherbst: fun :/
13:11 karolherbst: any good ideas how to do that?
13:11 mupuf: put on domain to off
13:11 karolherbst: ohhh
13:11 karolherbst: makes sense
13:11 mupuf: and then try to find what changed in the mmio space
13:11 mupuf: make sure to avoid peeking values from pgraph
13:12 mupuf: it will blow in your face :D
13:12 karolherbst: even when I don't do anything?
13:12 mupuf: yes, reading is enough
13:12 imirkin_: hakzsam: certainly not
13:12 karolherbst: mhhh k
13:12 mupuf: not all the regs in pgraph are dangerous, but a few are
13:12 mupuf: mwk could tell you more
13:12 karolherbst: mupuf: ok poweroff/on the regs are reseted :/
13:13 karolherbst: dasdasmd
13:13 mupuf: ?
13:13 hakzsam: imirkin_, why?
13:13 mupuf: clock gating does not trash the state
13:13 imirkin_: hakzsam: i'm guessing it either needs to be respected, or there should be a assert(offset == 0) in there
13:13 karolherbst: mupuf: after the gpu was powered off, the 0x20200 0x60 range went back to boot values
13:14 mupuf: oh, sure
13:14 mupuf: power gating does not retain the content
13:15 hakzsam: imirkin_, but this variable is unused, so what do you need it?
13:15 karolherbst: mhhh
13:15 karolherbst: is there something like a range based nvawatch?
13:15 mupuf: you would know that if you had read the chapter of my thesis I told you to read :D
13:15 imirkin_: hakzsam: it's a nice reminder that "oops, forgot to deal with offset"
13:15 mupuf: karolherbst: nope
13:16 hakzsam: imirkin_, oh okay, makes sense
13:16 karolherbst: mupuf: is pgragh the only range dangerous to read?
13:17 karolherbst: I have a very stupid idea now
13:17 karolherbst: :D
13:17 mupuf: yes
13:17 mupuf: dump the entire space but pgraph and diff the before and after
13:17 mupuf: keep a few regs from pgraph though
13:17 karolherbst: what is the biggest reg address?
13:18 karolherbst: mupuf: well pgrah will be the reg with no changes then if I leave it out :p
13:18 karolherbst: mhh
13:18 mupuf: 0xffffff IIRC
13:18 mupuf: you can read most of pgraph
13:18 karolherbst: can something bad happen when I peek pgraph with no driver loaded?
13:18 mupuf: just not a few regs in it
13:19 mupuf: hmm, that may work if you have no driver
13:19 karolherbst: k
13:19 mupuf: you will have to reboot when you are done though
13:19 karolherbst: ohh seems to work?
13:20 karolherbst: mupuf: or power off the card?
13:20 karolherbst: or won't it work anymore
13:20 mupuf: yeah, that may work
13:20 karolherbst: I always have bbswitch loaded for that :)
13:20 karolherbst: mhhhh
13:21 karolherbst: mupuf: did two 0x0 0xffffff pokes
13:21 karolherbst: diffed the output
13:21 karolherbst: 132443 line patch
13:21 karolherbst: :D
13:22 karolherbst: mupuf: is there anything beyond 0x1fffff ?
13:22 mupuf: what the fuck are you talking about? :D
13:22 karolherbst: I was doing nvapeek 0x0 0xffffff twice
13:22 karolherbst: and diffed the output
13:22 mupuf: I guess you need to look for registers that say 0xbadf
13:23 karolherbst: there are also a lot of ffffffff and 0000ffff and stuff
13:23 mupuf: look for 0xbadf
13:23 mupuf: in the diff
13:24 mupuf: but I guess the diff is just 16 MB of - and then 16 MB of +
13:24 mupuf: diff is likely very bad at this
13:24 mupuf: how about you just look at an engine
13:24 mupuf: and try to find the domain of it
13:25 karolherbst: nvapeek 0x0 0x1fffff is fine though
13:25 karolherbst: 464 lines of diff
13:25 karolherbst: seems to be random stuff like temperature or something
13:31 karolherbst: okay
13:31 karolherbst: found the first one
13:32 karolherbst: 0x20200: 0013cbe0 to +0013cc50
13:32 karolherbst: seems strange though
13:32 karolherbst: maybe not
13:35 karolherbst: ohh I did it while the blob was still loaded and running a X server
13:35 karolherbst: it was only a little upset though
13:43 mupuf: AHAH
13:44 karolherbst: mhh strange
13:44 karolherbst: I am at the 6th reg and still found nothing
13:44 mupuf: well, if the blob turns it back on, sure :D
13:45 karolherbst: without the blob now :p
13:45 karolherbst: and no, the blob doesn't turn it back on :D
13:46 karolherbst: I just turn off everything
13:46 karolherbst: and check if something changes
13:46 karolherbst: mhhh no
13:47 karolherbst: okay, other plan
13:50 karolherbst: now I run glxgears until it crashes :)
13:50 karolherbst: mhh weird, nouveau doesn't recover when I turn it back on :/
13:53 karolherbst: mupuf: okay, glxgears stoped only when disabling 0x20200
13:54 karolherbst: mhhh
13:54 karolherbst: this is too vague
13:54 karolherbst: :/
13:54 karolherbst: meh
13:59 mupuf: karolherbst: back home
14:00 mupuf: your plan is mostly useless I would say
14:00 karolherbst: I know
14:03 karolherbst: I shall stop crashing my card :D
14:09 karolherbst: mupuf: any other idea I could try?
14:21 karolherbst: best language to learn programming for somebody who really isn't that well with that stuff usually :D
14:23 mupuf: I'm back
14:23 mupuf: it was dinner + southpark time :D
14:23 mupuf: sooo
14:24 karolherbst: :D
14:24 karolherbst: very important
14:24 mupuf: are you telling me that you do not see any difference in which registers are shown or not when you force clock gating on?
14:24 mupuf: that may be true
14:24 karolherbst: mhhh not really
14:25 mupuf: and if so, we will need to think about other means
14:26 hakzsam: imirkin_, my plan is also to make the HUD supports float but it's not trivial :)
14:26 imirkin_: hakzsam: i meant that you cast the int64 to float
14:27 hakzsam: imirkin_, ah okay, I see
14:27 hakzsam: makes sense to use double actually
14:28 imirkin_: if the values can get large, then you can benefit from the extra accurace
14:28 imirkin_: otherwise meh
14:29 hakzsam: yeah
14:29 hakzsam: currently some of these metrics are displayed as 0 by the HUD as it doesn't support float yet
14:30 hakzsam: but this is going to change once I have figured out to add support for floats
14:31 hakzsam: imirkin_, I updated the patch locally, do you want to see the v2?
14:33 mupuf: hakzsam: in the mean time, why not use percents?
14:34 imirkin_: hakzsam: you replaced *all* of the value = stuff with returns right?
14:34 hakzsam: mupuf, because... I'm lazy to do it :) and that's really a minor issue
14:35 hakzsam: only branch_efficiency and issue_slot_utilization use percents
14:35 mupuf: hakzsam: right, better add proper support
14:35 hakzsam: imirkin_, yeah
14:36 karolherbst: hakzsam: could somebody check with your counters if there are waits between instructions?
14:36 hakzsam: karolherbst, what?
14:39 karolherbst: hakzsam: I was thinking about if those counters help with reordering the instructions to get more performance
14:39 hakzsam: karolherbst, they could be used to profile any applications, so yes
14:40 hakzsam: but thoses are only compute-related for now
14:40 hakzsam: graphics ones will be added later :)
14:40 hakzsam: *those
14:40 karolherbst: ohh okay
14:41 hakzsam: karolherbst, when all perf counters will be merged, it will be easy to profile the entire GL pipeline
14:41 karolherbst: nice
14:41 hakzsam: and my plan is to use them to improve perf :)
14:42 mupuf: karolherbst: I guess you are interested in the number of clock cycles spent stalling
14:42 karolherbst: yeah, something like that
14:42 hakzsam: ie. active_cycles
14:42 mupuf: pretty sure the compute counters would expose that
14:42 hakzsam: yes
14:42 hakzsam: for both fermi and kepler
14:42 mupuf: hmm, this is not enough, you need to divide that by time
14:43 mupuf: I guess active_cycles/pgraph_busy would help
14:43 mupuf: but we also need to substract the cycles spent waiting for fb
14:43 hakzsam: mupuf, pgraph_busy (gr_idle) is not exposed yet
14:44 mupuf: which is also known
14:44 mupuf: ack
14:44 hakzsam: mupuf, same for fb counters :)
14:44 mupuf: karolherbst: so, short answer, it is coming
14:44 karolherbst: mupuf: waiting for fb is also a good thing to know
15:58 hakzsam: imirkin_, feel free to have a look at the v2 here http://cgit.freedesktop.org/~hakzsam/mesa/log/?h=nvc0_mp_metrics
15:58 hakzsam: time to sleep, see you
15:59 imirkin_: hakzsam: worksforme
15:59 imirkin_: i.e. feel free to add my r-b
15:59 hakzsam: hakzsam, nice, thanks! I'll push the patch tomorrow because I'm so tired that I don't want to make a mistake :)
16:00 karolherbst: nouveua will be awesome in no time now! :)
16:33 mupuf: RRRRrrrr, I got to try the library to get data out of the blob
16:33 mupuf: and it does not want to spit out the power usage
16:33 mupuf: that was to be expected though
16:33 mupuf: nor did I manage to get the entire list of clocks
16:45 mupuf: well, I guess I will go to sleep and try to find a good solution to figure out how to interpret the iccsense vbios table ... without getting a sensor readout ;s
16:45 mupuf: :s
16:49 imirkin_: skeggsb_: any idea how suspend/resume might impact nvbo->valid_domains?
17:20 imirkin_: skeggsb_: let's say a pushbuf has been submitted and refers to some gem buffer. i then go free that gem buffer and suspend. then i resume, will we move that (free'd) gem buffer back into memory to allow the pushbuf to properly execute? or do we flush everything out before suspending?
17:21 imirkin_: skeggsb_: separately, let's say we forget about the suspend/resume thing -- is it ok to close a gem object while there are submitted but not yet fully executed pushbufs that refer to it?
17:54 imirkin_: skeggsb_: can you remind me what NV10_SUBCHAN_REF_CNT does?
17:54 imirkin_: (that also fixes glamor)