01:23 mwk: well
01:23 mwk: seems I can't proceed further without REing the rsqrt operation
01:24 mwk: which, in turn, would be easier if I could somehow execute it on its own without involving 543298 other steps before and after it
08:09 nan0s7: okay well after the reboot chrome had magically finished installing and now I just tried installing flash for Firefox again and it crashed the software center so... time for a bug report?
08:11 nan0s7: whoops never mind wrong chat
21:54 karolherbst: am I stupid or why does gcc complain about uninitialized ret in line 10?
21:54 karolherbst: https://gist.github.com/karolherbst/88a60f50324e00e3f6672f2a64e6eb6e
21:58 tobijk: why would it :O
21:58 pmoreau: Good question…
21:58 karolherbst: "warning: ‘ret’ may be used uninitialized in this function"
21:59 pmoreau: Does `nvkm_pstate_prog()` fail to always return a value?
21:59 karolherbst: no
21:59 karolherbst: okay I'll show you level 2 then
21:59 tobijk: imirkin: airlied: there is something fishy about nouveau_drm_postclose after it got nouveau_drm_preclose merged in
21:59 karolherbst: I've updated the gist
21:59 karolherbst: still same warning
22:00 pmoreau: Woot
22:01 pmoreau: Are you not looking at the correct file? Or are you looking at the correct file, but in the wrong repo (not the repo being use for the build)?
22:01 tobijk: heh
22:01 karolherbst: putting a ret=1 before that if works
22:01 karolherbst: the hell is wrong with gcc
22:02 karolherbst: puting an assignment to ret after "ret = nvkm_pstate_prog(clk, pstate);" fixes it
22:02 tobijk: your stack is screwed then :>
22:02 karolherbst: sig of that function: "static int nvkm_pstate_prog(struct nvkm_clk *clk, int pstateid)"
22:03 karolherbst: :O
22:03 karolherbst: I found it
22:03 karolherbst: the hell gcc, the hell
22:04 karolherbst: nvkm_cstate_prog was able to return an uninit value, which might get returned inside nvkm_pstate_prog
22:04 karolherbst: .......
22:04 pmoreau: Ah, I hadn’t thought of going one level higher, for the returned uninit value.
22:05 tobijk: mh why is this bugged: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/nouveau/nouveau_drm.c#n880
22:06 pmoreau: tobijk: Btw, you are declaring `method_ret` twice in your patch.
22:07 karolherbst: tobijk: isn't the call to pm_runtime_put_autosuspend in the end kind of useless?
22:07 tobijk: yeah that one shouldn have gone out in the first place :/
22:07 karolherbst: or does it decrease the refcount as well?
22:10 tobijk: mh.. i think we freed something we use here actually (that one was made up of two function (pre/postclose))
22:11 tobijk: were preclose was up to line 894
22:19 karolherbst: okay nice, voltage updates implemented on thermal changes without hacky hacks
22:19 karolherbst: looks kind of clean to me: https://github.com/karolherbst/nouveau/commit/287985597d8e3870900d184c9173d7ae50d62769
22:19 karolherbst: excapt that label part :(
22:20 karolherbst: ugh, and that printk
22:20 tobijk: printk(KERN_INFO "changing voltage\n"); <-- spam :D
22:20 karolherbst: https://github.com/karolherbst/nouveau/commit/a38665db64eaa61ed493a91fd11c18a9bff70d40
22:21 karolherbst: that new if in nvkm_cstate_prog is useless
22:22 karolherbst: https://github.com/karolherbst/nouveau/commit/21cb7de1082224582cca8f3d751ef64391d48f8d
22:22 karolherbst: my last version was like twice as big
22:22 karolherbst: last version: https://github.com/karolherbst/nouveau/commit/77be1b966d9024858f5f85bbd8f9519c380f934f
22:23 tobijk: a little comment at line 292 maybe (just adding some topping here :))
22:27 karolherbst: :) https://gist.github.com/karolherbst/4da9d0d3598cd2130520b740dc610d04
22:27 tobijk: karolherbst: either way, looks good to me, the cstate label is a bit upgly as you said, but it doesn add too much complexity to the code, so that one is fine imho
22:28 karolherbst: yeah
22:28 karolherbst: tobijk: I could just copy the call though
22:28 karolherbst: then I can even remove that assignment
22:29 karolherbst: yeah, should be fine calling the function twice
22:29 karolherbst: better than an ugly goto
22:30 tobijk: its quite common in the kernel though, guess nobody would bother to change that ;-9
22:30 karolherbst: https://github.com/karolherbst/nouveau/commit/cba728320a87e5375ce1d058cd68fa49a854c78f
22:30 karolherbst: I do
22:30 karolherbst: gotos are evil
22:31 karolherbst: ohh wait
22:31 karolherbst: now I can even remove that ret = 0 thing
22:32 karolherbst: +14/-2 for this feature, nice
22:32 karolherbst: I could remove those three lines in the volt/base.c file as well, but I think it's importent to properly guard non static functions anyhow
22:33 tobijk: karolherbst: yeah let the (!volt) in, its a nice guard
22:35 tobijk: mhpf why is my card not going to sleep :/