Martin Peres
2011-Apr-17 15:10 UTC
[Nouveau] [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
--- 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; break; } -- 1.7.4.4
Ben Skeggs
2011-Apr-17 22:32 UTC
[Nouveau] [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
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.> break; > } >