00:13 gnurou: skeggsb: airlied: sent a fix that is not a hack for the dma_to_phys() issue (against the Nouveau tree for now - Dave, let me know if you want it against the kernel as well or if we can survive with your fix for a short time)
00:21 vinceh: Hello nouveau, I'm trying to set the ZBC color from user space. I suppose I can do that through nvif, right?
00:21 vinceh: the precedure looks like nvif_client_new -> nvif_device_new -> nvif_object_init for GR -> nvif_mthd for ZBC mthd
00:24 vinceh: but I failed to init the object. it seems that's because the gr must under a channel object? any ideas?
00:25 vinceh: btw, I'm using the nvif in k3.18.. I know the interface changed recently..
03:15 karolherbst: how can I check if I have hang the pmu?
03:35 karolherbst: ohh crap, got a hang in nvkm_pmu_send :/ I bet I have to do some stuff before we can trigger calls from the pmu itself :/
03:40 karolherbst: RSpliet: when I send something from the pmu to the kernel, and this triggeres a call on the pmu (like memory reclocking stuff for example) can this hang the entire pmu somehow?
03:40 karolherbst: mhh, as it seems the pmu still works
03:41 karolherbst: but nvkm_pmu_send just get into hangs
03:41 RSpliet: not entirely sure tbh... can't recall whether you need to ack a msg receive or not
04:44 karolherbst: RSpliet: I think I have to call wake_up(&pmu->recv.wait); :D
04:50 karolherbst: seems like it wasn't that :/
04:52 karolherbst: RSpliet: that's my current change: https://github.com/karolherbst/nouveau/commit/58096903386dabe10e9e7ebe9e68eac205ea1512
04:55 karolherbst: ohhhhhh
04:55 karolherbst: wake_up isn't called at all, because nvkm_clk_pmu_reclk_request isn't returning
06:02 karolherbst: mhh debugging symbols inside the nouveau module are helpful...
06:02 karolherbst: RSpliet: it waits at this line: https://github.com/karolherbst/nouveau/blob/master_karol_no_touchy/drm/nouveau/nvkm/subdev/pmu/base.c#L82
06:03 karolherbst: and it did stuff inside nvkm_memx_init
06:05 karolherbst: RSpliet: do you know with call(send) is synchronues?
06:45 karolherbst: nice
06:45 karolherbst: it works
07:10 karolherbst: how can I use a # inside a macro like #perf_reclk_last_gr
07:12 imirkin: #define hash #
07:12 imirkin: #define foo(bar) hash ## bar
07:15 karolherbst: mhh
07:15 karolherbst: then I get hashperf_reclk_last_gr
07:15 karolherbst: #define hash #
07:15 karolherbst: #define common() ld(b8, $r14, hash ## perf_reclk_last_gr)
07:15 karolherbst: ohh right, I also call a macro there :p
07:18 karolherbst: imirkin: ohh ## merges both string as they are together
07:18 karolherbst: hash don't get evaluated
07:20 karolherbst: strange
07:32 karolherbst: imirkin: the painfull part is, is that cpp is invoked twice and even when the first one finishes with #perf_reclk_last_gr, the second one will try to process that
07:32 karolherbst: :/
07:37 karolherbst: anyway, pmu side dynreclocking stuff is done I think, at least for core reclocking
07:39 RSpliet: karolherbst: good stuff!
07:39 imirkin: karolherbst: moral of the story - invoke cpp once :)
07:40 karolherbst: RSpliet: I have to tweak it a little, because currently I have a desigb not involving any replies from the host
07:40 imirkin: actually i dunno what #foo does if foo isn't a macro param
07:40 karolherbst: which should work for like 95% of all cases, but there are some tricky ones
07:40 imirkin: error: '#' is not followed by a macro parameter
07:40 imirkin: heh
07:40 karolherbst: eg: if the target is 50% load
07:40 karolherbst: and you request reclock at 60%
07:40 karolherbst: you don't need a ack
07:41 karolherbst: because if the load decreaes, the core was either reclocked or the load really went down, or maybe the load goes up (because there is more load and the host didn't reclock)
07:41 karolherbst: then you request another one at 61% ore more
07:51 RSpliet: karolherbst: what kind of control does the host have over the monitoring?
07:58 karolherbst: RSpliet: none
07:58 karolherbst: it is all set up on the pmu itself
08:00 RSpliet: so what happens if the card is already at the highest perflvl? or the lowest? or both? :-D
08:01 karolherbst: RSpliet: the pmu will only send another request when the current load either goes further away from the target or is growing into reverse direction. if target is 50%, last request was made at 70%, and current load is 44%, the pmu will request a reclock
08:01 RSpliet: you might want to think about keeping host in control, and let nouveau send a message to "arm" it (with a lower bound and a higher bound) instead
08:01 karolherbst: there is a saftey margin of 5% though, so between 45% and 55% the pmu won't send anything
08:02 karolherbst: mhh
08:02 karolherbst: I think we will know those bounds at compile time already
08:02 karolherbst: so we can just share constants between host and the pmu code
08:03 karolherbst: I still have to decide to which p/c-state to clock on the host
08:03 RSpliet: risking to bikeshed here, my opinion:
08:03 RSpliet: the bounds are tweakable, and you might want to vary them between the various perflvls (it's not a linear perf increase)
08:04 RSpliet: whereas the overhead of adding the bounds to the message are negligible :-)
08:04 RSpliet: the more important bit though is that it would be nice to disable the "lower bound" interrupts if you're already in the lowest perflvl
08:04 RSpliet: and the "higher bound" interrupts when you're all the way up
08:05 RSpliet: they just needlessly interrupt the system, even if you have a clever heuristic to only do it twice or three times :-)
08:05 karolherbst: RSpliet: yeah I know, but I decided it isn't worth the effort much, because the pmu will only start sending reclock requests when teh load decreases a lot
08:05 karolherbst: so it will do one or two requests more than necessary
08:06 karolherbst: I mean we can improve it later anyway, I just try to find a really simply design, which can be simply improved later on
08:06 karolherbst: currently it is basically two compares and some ld/st stuff
08:07 RSpliet: I'll just leave you play with it then ;-)
08:08 RSpliet: if it doesn't have too many corner cases that could lead to many interrupts I guess it's a good start :-)
08:08 karolherbst: yeah
08:08 karolherbst: https://github.com/karolherbst/nouveau/commit/308297f511eab60ba2540bfa6826987b3493cd7c#diff-5e5cb4582f6faff078d1cad6144b248a
08:08 karolherbst: this is basically the change
08:08 karolherbst: perf_check_reclock
08:08 RSpliet: mmm, not going to read it just now
08:08 RSpliet: still at work
08:08 karolherbst: k
08:10 RSpliet: sorry
08:15 karolherbst: np
08:31 dcomp: [ 1.484295] nouveau 0000:07:00.0: enabling device (0006 -> 0007)
08:31 dcomp: [ 1.550054] nouveau ![ DEVICE][0000:07:00.0] unknown Maxwell chipset
08:31 dcomp: [ 1.550060] nouveau E[ DEVICE][0000:07:00.0] unknown chipset, 0x118010a2
08:31 dcomp: [ 1.550064] nouveau E[ DRM] failed to create 0x00000080, -22
08:31 dcomp: [ 1.550259] nouveau: probe of 0000:07:00.0 failed with error -22
08:31 dcomp: Anything I can do?
08:33 imirkin: dcomp: search bugs.freedesktop.org for NV118 and look at the suggestions within
08:34 imirkin: dcomp: basically copy the gm107 handling for gm108 and live happily ever after
08:35 imirkin: (except not so happily, since maxwell has lots of issues)
08:45 karolherbst: RSpliet: I just hope the kernel code is fast enough to handle three or more reclock requests every 0.1 seconds. I had some dead locks while reclocking that fast through the pstate interface I think
09:00 RSpliet: karolherbst: so many reclocks are undesirable
09:00 karolherbst: RSpliet: I know
09:01 karolherbst: but we will get two within 0.1 seconds sometimes
09:01 karolherbst: imagine the host decides to clock down after a request and then there is a spike load and has to upclock the very 0.1 seconds later
09:01 karolherbst: *load spike
09:02 RSpliet: just don't trigger events while reclocking, that's a bit pointless
09:02 karolherbst: I already want to skip sending reclock requests for about 5 seconds after the the load drops below the target, just to catch unstable loads
09:03 RSpliet: I'd imagine load drops during clock change because PFIFO is paused
09:03 karolherbst: RSpliet: not noticable
09:04 karolherbst: RSpliet: the load can even go higher even with reclocking within this 0.1 seconds period
09:04 RSpliet: even if it doesn't, you don't want to send an interrupt while the kernel is busy changing clocks ;-)
09:04 karolherbst: I know
09:05 karolherbst: it is done inside a worker anyway and this is mutex locked already
09:05 karolherbst: but still there is an issue somewhere there I think
09:08 karolherbst: what means fifo: LB_ERROR by the way?
10:04 karolherbst: imirkin: I get some FB_FLUSH_TIMEOUT and LB_ERROR, how _serious_ are those errors?
10:06 RSpliet: karolherbst: I think FB_FLUSH_TIMEOUT is quite serious
10:07 karolherbst: mhh
14:49 Flyoc: hi
14:51 Flyoc: is nouveau video hardware decoding supposed to work with sid ? I get a "[vo/opengl/vaapi] vaDeriveImage(): operation failed" when I try to use it with mpv
14:52 imirkin: Flyoc: http://nouveau.freedesktop.org/wiki/VideoAcceleration/
14:53 Flyoc: imirkin: yeah I've read that a few times now
14:53 Flyoc: extracted the firmwares
14:53 imirkin: Flyoc: pastebin vdpauinfo
14:55 Flyoc: imirkin: http://pastebin.ubuntu.com/13232547/
14:56 imirkin: great, looks like you're all set then.
14:56 imirkin: did you try the mplayer command on the page?
14:56 Flyoc: imirkin: hmm actually, what does "width" and "height" mean in there ?
14:56 imirkin: max width/height of video
14:56 skeggsb: vinceh: yes, gr objects need a channel as a parent
14:57 skeggsb: vinceh: i'll likely push an attempt at using the zbc methods in nouveau's userspace shortly, i've been preparing our userspace to be able to use those interfaces recently
14:57 Flyoc: imirkin: I have not, I'm trying to make it work with mpv
14:57 imirkin: Flyoc: mplayer works, everything else is kinda meh.
14:57 Flyoc: ha
14:59 imirkin: Flyoc: from your message it looks like you're trying to use vaapi? that won't work without that vdpau <-> vaapi converter dealie
14:59 imirkin: which you may or may not have installed, dunno. seems like a huge waste.
14:59 imirkin: also doing opengl + vdpau at the same time is going to end poorly.
14:59 imirkin: just use mplayer and all will be well.
15:00 Flyoc: imirkin: I just ran the mplayer command from the page, my video is hw decoded but it's slow. It's "only" 1080p though
15:00 Flyoc: imirkin: I would have expected hw decoding to be faster that sw decoding ?
15:01 imirkin: what gpu?
15:01 Flyoc: imirkin: GeForce GTX 560 Ti
15:01 imirkin: what freq does it boot up at?
15:01 imirkin: pastebin your dmesg
15:03 Flyoc: imirkin: is http://pastebin.ubuntu.com/13232628/ enough ?
15:04 imirkin: yeah. so i guess 50mhz ain't enough :)
15:04 imirkin: the -- line is the current level
15:04 imirkin: i bet your cpu speed is higher :p
15:05 Flyoc: ugh
15:05 imirkin: engine speed reclocking might actually work on fermi... dunno. you'd have to hack the code a bit to allow that.
15:05 imirkin: memory reclocking def doesn't, but you might be able to get away without changing memclock speeds
15:05 imirkin: definitely not an "out of the box" situation though, sorry!
15:06 Flyoc: imirkin: should I boot with nouveau.pstate=1 ?
15:06 imirkin: won't help
15:07 imirkin: you can change the clk code to allow reclocks
15:07 imirkin: while disabling memory reclocks
15:07 imirkin: and hope for the best :)
15:08 Flyoc: imirkin: where is that tweaked ?
15:08 imirkin: mmmm.... sorry, don't quite remember.
15:08 imirkin: grep for NvMemExec?
15:08 imirkin: it's been a while since i've looked at it.
15:08 imirkin: i think ben's rewritten all of it at least twice since then, so my info may be out of date :)
15:10 Flyoc: https://wiki.freedesktop.org/nouveau/KernelModuleParameters/ imirkin
15:10 imirkin: i wrote that page :p
15:10 Flyoc: "NvClkMode: Force a particular clock level on boot. Note that this does not parse hex, so for clock mode f, pass in 15."
15:10 Flyoc: haha
15:11 Flyoc: so I guess just tweak NvClkMode ?
15:11 imirkin: when i say you have to modify code, you can trust me
15:11 imirkin: pretty sure that won't do anything but generate an error on load about not being able to switch states.
15:14 Flyoc: imirkin: can I damage my card ?
15:14 imirkin: probably. i've never heard reports of the gpu being damaged as a result of futzing with reclocking though.
15:15 Flyoc: I'll give 07 a try.
15:20 Flyoc: well, that didn't do anything
15:40 Flyoc: thanks imirkin for your help ! I guess I just have to wait
15:44 imirkin: probably for the best... unfortunately nouveau h264 decoding is slightly buggy
17:27 vinceh: skeggsb: good to know that. what's the userspace btw?
17:28 vinceh: skeggsb: do you mean you have some ideas to solve the dependency problem? if yes, could you please show me how briefly? :)