Bug 99913 - [G96] Reclocking fails on voltage
Summary: [G96] Reclocking fails on voltage
Status: NEEDINFO
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-22 19:16 UTC by Pekka Paalanen
Modified: 2017-08-05 08:04 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
VBIOS from /sys/kernel/debug/dri/0/vbios.rom (62.00 KB, application/octet-stream)
2017-02-22 19:20 UTC, Pekka Paalanen
no flags Details
dmesg (49.30 KB, text/plain)
2017-02-22 19:25 UTC, Pekka Paalanen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pekka Paalanen 2017-02-22 19:16:04 UTC
Attempting to set the performance level to 15 on my laptop results in errors.

nouveau 0000:01:00.0: NVIDIA G96 (096500a1)
nouveau 0000:01:00.0: bios: version 62.94.3c.00.15
nouveau 0000:01:00.0: fb: 512 MiB GDDR3

The kernel module has options: config=NvClkMode=15
That leads to errors:

nouveau 0000:01:00.0: clk: failed to raise voltage: -22
...
nouveau 0000:01:00.0: clk: error setting pstate 3: -22

After that the contents of /sys/kernel/debug/dri/0/pstate are:

03: core 169 MHz shader 338 MHz memory 100 MHz
05: core 275 MHz shader 550 MHz memory 300 MHz
07: core 400 MHz shader 800 MHz memory 300 MHz
0f: core 625 MHz shader 1563 MHz memory 800 MHz AC DC *
AC: core 275 MHz shader 550 MHz memory 799 MHz

Kernel log and VBIOS will follow.
Comment 1 Pekka Paalanen 2017-02-22 19:20:59 UTC
Created attachment 129840 [details]
VBIOS from /sys/kernel/debug/dri/0/vbios.rom
Comment 2 Ilia Mirkin 2017-02-22 19:21:28 UTC
This is probably apparent to anyone investigating, but for your benefit... what's happening is that memory reclock works fine, but changing core/shader clocks requires a voltage adjustment, and that fails. So your core/shader clocks remain unchanged, while memory gets reclocked.

Without looking at your VBIOS, I suspect if you first clock to 07 and then to 0f, you'll be able to get 07's core/shader speeds and the faster memory clock.
Comment 3 Pekka Paalanen 2017-02-22 19:25:55 UTC
Created attachment 129841 [details]
dmesg
Comment 4 Pekka Paalanen 2017-02-22 19:31:27 UTC
(In reply to Ilia Mirkin from comment #2)
> Without looking at your VBIOS, I suspect if you first clock to 07 and then
> to 0f, you'll be able to get 07's core/shader speeds and the faster memory
> clock.

That's a good idea, and it indeed seems to be working. I ended up with:

03: core 169 MHz shader 338 MHz memory 100 MHz
05: core 275 MHz shader 550 MHz memory 300 MHz
07: core 400 MHz shader 800 MHz memory 300 MHz
0f: core 625 MHz shader 1563 MHz memory 800 MHz AC DC *
AC: core 400 MHz shader 800 MHz memory 799 MHz
Comment 5 Ilia Mirkin 2017-02-23 00:06:17 UTC
Huh. Well, this is what's in the vbios:

Voltage table at 0xd0c9. Version 32.
Header:
0x0000d0c9: 20 06 02 04 00 01                               mask = 0x1

2 entries
-- Vid = 0x0, voltage = 890000 <C2><B5>V --
-- GPIO tag 0x4(VID) data (logic 0) --
0x0000d0cf: 59 00 00 00                                    

-- Vid = 0x1, voltage = 1050000 <C2><B5>V --
-- GPIO tag 0x4(VID) data (logic 1) --
0x0000d0d3: 69 01 00 00                                    

-- ID 0x3 Core 169MHz Memory 100MHz Shader 338MHz Vdec 169MHz Dom6 208MHz Voltage 89[*10mV] Timing 0 Fan 100 PCIe link width 1 --
-- ID 0x5 Core 275MHz Memory 300MHz Shader 550MHz Vdec 275MHz Dom6 277MHz Voltage 89[*10mV] Timing 16 Fan 100 PCIe link width 16 --
-- ID 0x7 Core 400MHz Memory 300MHz Shader 800MHz Vdec 450MHz Dom6 416MHz Voltage 89[*10mV] Timing 0 Fan 100 PCIe link width 16 --
-- ID 0xf Core 625MHz Memory 800MHz Shader 1563MHz Vdec 450MHz Dom6 416MHz Voltage 116[*10mV] Timing 0 Fan 100 PCIe link width 16 --

Note that the 89 voltage is clearly covered by voltage entry 0, while the 116 voltage is not available. It'd be instructional to see what the blob does. If you have any mmiotrace (even a very old one) for this board, it'd be interesting to look at.
Comment 6 Pekka Paalanen 2017-02-23 08:24:06 UTC
Thanks, I'll have a look, but don't hold your breath.
Comment 7 Pekka Paalanen 2017-02-23 09:03:53 UTC
Actually, I found out that there is an old dump from this laptop referred to in bug #60680:
http://people.freedesktop.org/~pq/mmiotrace-fdo-bug-60680.tar.xz

Does that help?
Comment 8 Karol Herbst 2017-03-05 10:05:59 UTC
it would be quite unpleasant if nvidia would indeed use the highest clock level here.

And that mmiotrace seems a bit odd, because it accesses a GPIO which shouldn't exist and in any case it doesn't change the voltage of that GPU.

Would you mind checking what nvidia clocks to on this system?
Comment 9 Pekka Paalanen 2017-03-05 13:04:18 UTC
(In reply to Karol Herbst from comment #8)
> it would be quite unpleasant if nvidia would indeed use the highest clock
> level here.

Do you mean an noise or something else?

> And that mmiotrace seems a bit odd, because it accesses a GPIO which
> shouldn't exist and in any case it doesn't change the voltage of that GPU.

Yeah, I guessed it might not be enough, since it was recorded for HDMI enablement. Thanks for taking a look.

> Would you mind checking what nvidia clocks to on this system?

Yeah, looks like I should be able to install the legacy drivers 340.x. I'll put that on my todo to record a new mmiotrace with some OpenGL action or something else to get the clocks to max.
Comment 10 Karol Herbst 2017-03-05 15:58:16 UTC
(In reply to Pekka Paalanen from comment #9)
> (In reply to Karol Herbst from comment #8)
> > it would be quite unpleasant if nvidia would indeed use the highest clock
> > level here.
> 
> Do you mean an noise or something else?
> 

hacky code

> > Would you mind checking what nvidia clocks to on this system?
> 
> Yeah, looks like I should be able to install the legacy drivers 340.x. I'll
> put that on my todo to record a new mmiotrace with some OpenGL action or
> something else to get the clocks to max.

you can force the highest power state in nvidia-settings afaik, this way the mmiotrace stays rather small
Comment 11 Karol Herbst 2017-03-05 15:58:39 UTC
but you can use OpenGL stuff to confirm if it doesn't use the higher clocks
Comment 12 Pekka Paalanen 2017-03-30 15:38:24 UTC
Note to self: need to rebuild my kernel without CONFIG_TRIM_UNUSED_KSYMS. Otherwise the driver won't install.
Comment 13 Pekka Paalanen 2017-08-05 07:27:35 UTC
Seems unlikely I will ever get around to make that mmiotrace. Should we close this report?
Comment 14 Karol Herbst 2017-08-05 08:04:15 UTC
(In reply to Pekka Paalanen from comment #13)
> Seems unlikely I will ever get around to make that mmiotrace. Should we
> close this report?

can you run the nvidia legacy driver and see what perf level is set?


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.