[Nouveau] [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly

Ben Skeggs skeggsb at gmail.com
Sun Apr 17 15:56:26 PDT 2011


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.




More information about the Nouveau mailing list