[Nouveau] [PATCH v4 20/37] volt: add coefficients

Martin Peres martin.peres at free.fr
Tue Apr 19 22:06:23 UTC 2016


On 20/04/16 00:54, Ilia Mirkin wrote:
> On Tue, Apr 19, 2016 at 5:52 PM, Martin Peres <martin.peres at free.fr> wrote:
>>> +                               result =  ((s64)info.arg[0] * 15625) >>
>>> 18;
>>> +                               result += ((s64)info.arg[1] * volt->speedo
>>> * 15625) >> 18;
>>> +                               result += ((s64)info.arg[2] * temp *
>>> 15625) >> 10;
>>> +                               result += ((s64)info.arg[3] * volt->speedo
>>> * temp * 15625) >> 18;
>>> +                               result += ((s64)info.arg[4] * volt->speedo
>>> * volt->speedo * 15625) >> 30;
>>> +                               result += ((s64)info.arg[5] * temp * temp
>>> * 15625) >> 18;
>>> +                               break;
>>
>> Well, I can only say that these values got us really really close to what
>> nvidia does... On around 10 GPUs... So... until we know better, let's stick
>> to them.
>>
>> Hopefully, we can figure out where this 15625 comes from. This patch is:
> 5^6. Really it's 10^6, but it's silly to multiply by 10^6 and then
> divide by powers of 2. Instead that's factored out...

That makes sense. I must have missed this on the IRC discussion.

Major congrats to Karol and you for figuring out all of this!

@Ben: I really think this is the right thing to do, it really was solid 
work for Karol's part.


More information about the Nouveau mailing list