[Nouveau] [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
Martin Peres
martin.peres at free.fr
Sun Apr 17 16:05:38 PDT 2011
Le 18/04/2011 00:56, Ben Skeggs a écrit :
> On Mon, 2011-04-18 at 00:54 +0200, Martin Peres wrote:
>> Le 18/04/2011 00:32, Ben Skeggs a écrit :
>>> On Sun, 2011-04-17 at 17:10 +0200, Martin Peres wrote:
>>>> ---
>>>> drivers/gpu/drm/nouveau/nouveau_perf.c | 6 +++---
>>>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/nouveau/nouveau_perf.c b/drivers/gpu/drm/nouveau/nouveau_perf.c
>>>> index 950caba..d64a98a 100644
>>>> --- a/drivers/gpu/drm/nouveau/nouveau_perf.c
>>>> +++ b/drivers/gpu/drm/nouveau/nouveau_perf.c
>>>> @@ -177,9 +177,9 @@ nouveau_perf_init(struct drm_device *dev)
>>>> #define subent(n) entry[perf[2] + ((n) * perf[3])]
>>>> perflvl->fanspeed = 0; /*XXX*/
>>>> perflvl->voltage = entry[2];
>>>> - perflvl->core = (ROM16(subent(0))& 0xfff) * 1000;
>>>> - perflvl->shader = (ROM16(subent(1))& 0xfff) * 1000;
>>>> - perflvl->memory = (ROM16(subent(2))& 0xfff) * 1000;
>>>> + perflvl->core = (ROM16(subent(3))& 0xfff) * 1000;
>>>> + perflvl->shader = (ROM16(subent(3))& 0xfff) / 2 * 1000;
>>>> + perflvl->memory = (ROM16(subent(5))& 0xfff) * 1000;
>>> Um, NACK. This is *definitely* very very wrong on NVA8, which uses
>>> version 0x40 of this table too.
>>>
>>> Ben.
>> Crap, I would have sworn this table was introduced for Fermi! Sorry for
>> the noise then, I'll try to find a fix for that (other than looking at
>> the codename).
> I'm highly skeptical that it's correct on fermi too, but, I can't check
> that myself right now. I shall do it during the week however.
>
> Ben.
I was also highly skeptical about this, but I looked at all the vbios
and it seemed good on all of them.
Then, I looked at tools like nibitor or Fermi bios editor
(http://www.xtremesystems.org/forums/showthread.php?t=256367) which also
highlights the subentries 3 and 5.
I'll look further and try to see if ramcfg could help us select the
right subentries.
More information about the Nouveau
mailing list