-
Notifications
You must be signed in to change notification settings - Fork 22
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
Ryzen 2500U CpuFID is higher than limited, inaccurate frequency calculation #27
Comments
I think I got the info from the register reference, the FID register address is listed on page 130. When I tested with a 2700x and a 2400g a few years back the numbers looked odd, especially P-State 3 like yours, I didn't look into it however since the motherboards those were in allowed proper over/under clocking unlike mobile CPU's like your 2500U. Perhaps the way Zen calculates the CPU frequency is different than what the math which is currently used. Looking at the commit, here's how tha math is done So with P-State 2 you have a FID of 50, a DID of 12 and REFCLCK is usually 100: (50 / 12) = 4.16666666667 * 100 * 2 = 833.33, which doesn't match the 800 oddly, but like you wrote it shows 750 so something obviously is off. Maybe the REFCLK changes on Zen? |
The information in the DID section is complex, I don't understand it all:
From what I can understand, DID can be max 48 and the clock speed can't be less than 400MHz. |
I don't think that AMD is playing with the reference clock by default. It might has some changes between 97-103 MHz, but this architecture has a fine grain P-state modification algorithm, IMHO this is why there is a higher ranger for the CpuFID value. |
I checked on a 2500g, with default settings the fid shows up to 144:
Can't change the settings on it since it's not my CPU. Perhaps for now a limit of 192 on Fid could be set, since we don't know what the max is? |
I found this doing a search, but I doubt that's the max. https://hardforum.b-cdn.net/data/attachment-files/2017/03/76381_PStateCalc.png |
Setting the limit to 192 on fid is random, I don't know the actual limit.
I found exactly the same, I just forgot to add here. |
v0.3
v0.4
Looks great, the calculated frequencies are aligned with the multiplier. However it's still different from the one which the cpuinfo reports.
|
I think that's because of "SenseMI", which is why there are so few power states on Zen CPU's. |
Precision Boost, part of SenseMI, there are 4 P-States that the OS can use, but the CPU has other P-States (thought it said 1000's, but it's 25MHz spacing I read somewhere else) it can apply over or under those 4 P-States: https://images.anandtech.com/doci/11170/AMD%20Ryzen%20Tech%20Day%20-%20Architecture%20Keynote-24%20-%20Copy.jpg |
I think the fine grade P-states are important in case of using them as intermediate P-states, which are limited between the minimal and maximal values as reference. |
That makes sense, although it's odd it says the current P-State is 3, when it would make more sense for it to be 2. Edit: I think it's because pre Zen the state in used is incremented? I don't have access to pre-zen anymore unfortunately. |
Now it shows the correct P-State in use on the 2400g at least:
Also matches the info from cpupower:
|
I might be wrong about my previous post, it looks Current P-State is inversed?
If I run that with some cores at max frequency it looks like it's inversed. The AMD PDF says:
Which is confusing. ("the frequency component ") |
The lowest P-state is definitely fine as is. |
Yeah, I'm assuming it has to do with the description of |
Hello @kevinlekiller,
this time I'm writing you because of a Ryzen mobile APU. Please look at the default values are used for P0, modifying the fid value to something high at the line 125 is enough. However this time I couln't find the BKDG document for fam17h. It would be hard to guess the value. I have some desktop 1st and 2nd gen Ryzens at home, I can check those too.
`# amdctl -g -c 1
Voltage ID encodings: SVI (serial)
Detected CPU model 11h, from family 17h with 8 CPU cores.
Core 1 | P-State Limits (non-turbo): Highest: 1 ; Lowest 3 | Current P-State: 3
Pstate Status CpuFid CpuDid CpuVid CpuMult CpuFreq CpuVolt IddVal IddDiv CpuCurr CpuPower
0 1 100 10 53 20.00x 2000MHz 1219mV 20 10 30.00A 36.56W
1 1 102 12 96 17.00x 1600MHz 950mV 17 10 27.00A 25.65W
2 1 50 12 120 8.33x 800MHz 800mV 16 10 26.00A 20.80W
3 0 0 0 88 -nanx 0MHz 1000mV 0 10 10.00A 10.00W
Northbridge:
No P-States on AMD17H Northbridge.`
Apart from that the minimum freq is around 750MHz with this settings.
Do you have any ideas what should we do?
Best regards
The text was updated successfully, but these errors were encountered: