Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Voltage calculation #13

Open
karolherbst opened this issue Mar 28, 2016 · 7 comments
Open

[question] Voltage calculation #13

karolherbst opened this issue Mar 28, 2016 · 7 comments
Labels

Comments

@karolherbst
Copy link
Contributor

karolherbst commented Mar 28, 2016

In the vbios of Kepler gpus is a P table (We cal it Voltage Map Table) with all the voltage entries for each clock state and the performance levels.

Each of those entries contain some min/max voltage and 6 coefficients which are used to calculate the final voltage for the given clock state or performance level.

in the end, depending on the 0th byte, the final voltage is calculated (on my GPU by):

0: c0 * 0.1 + c1 * 168 + c2 * 28
1: c0 * 0.06 + c1 * 100 + c2 * 15.3 * T + c3 * 100 + c4 * 41 + c5 * 0.065 * T^2

now my questions:

  1. Are those factors in any way hardware specific or are the same factors used for every gpu?
  2. If those factors are hw specific, where could we find those? (I would suspect them inside PFUSE)
  3. what would be the exact coefficients
@karolherbst
Copy link
Contributor Author

karolherbst commented Apr 17, 2016

well I spend more time and got closer to the calculation:

S: speedo
T: temperature

mode0:
c0 / 10
c1 * S / 10
c2 * S^2 / 10^5

mode1:
c0 * 5^6 >> 18
c1 * S * 5^6 >> 18
c2 * T * 5^6 >> 10
c3 * S * T * 5^6 >> 18
c4 * S^2 * 5^6 >> 30
c5 * T^2 * 5^6 >> 18

mode2: min
mode3: (min+max)/2

I am pretty sure this is right, so I just need a confirmation

@Gnurou
Copy link
Owner

Gnurou commented May 10, 2016

Hi Karol,

The P-table actually contains many sub-tables, which Nouveau selects using the following code:

    if (!bit_entry(bios, 'P', &bit_P)) { <- this extracts P table
            if (bit_P.version == 2)
                    cstep = nvbios_rd16(bios, bit_P.offset + 0x34); <- this extracts sub-table (here, 0x34 offset gives voltage-frequency table)

Can you clarify which bit_P.offset values you are using, so we know which sub-table is referred to and check the coefficients properly?

@ghost
Copy link

ghost commented May 10, 2016

He's referring to the CVB table (+0x20).

@karolherbst
Copy link
Contributor Author

what is CVB? But yeah, it is the +0x20 table.

@karolherbst
Copy link
Contributor Author

are there any updates on this one so far?

@Gnurou
Copy link
Owner

Gnurou commented Jul 7, 2016

Pinged again, trying to get an answer...

@karolherbst
Copy link
Contributor Author

thanks a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants