* [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
@ 2011-04-17 15:10 Martin Peres
[not found] ` <1303053035-25716-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Martin Peres @ 2011-04-17 15:10 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
[not found] ` <1303053035-25716-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
@ 2011-04-17 22:32 ` Ben Skeggs
2011-04-17 22:54 ` Martin Peres
0 siblings, 1 reply; 5+ messages in thread
From: Ben Skeggs @ 2011-04-17 22:32 UTC (permalink / raw)
To: Martin Peres; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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;
> }
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
2011-04-17 22:32 ` Ben Skeggs
@ 2011-04-17 22:54 ` Martin Peres
[not found] ` <4DAB6F9F.3050905-GANU6spQydw@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Martin Peres @ 2011-04-17 22:54 UTC (permalink / raw)
To: skeggsb-Re5JQEeQqe8AvxtiuMwx3w; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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).
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
[not found] ` <4DAB6F9F.3050905-GANU6spQydw@public.gmane.org>
@ 2011-04-17 22:56 ` Ben Skeggs
2011-04-17 23:05 ` Martin Peres
0 siblings, 1 reply; 5+ messages in thread
From: Ben Skeggs @ 2011-04-17 22:56 UTC (permalink / raw)
To: Martin Peres; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly
2011-04-17 22:56 ` Ben Skeggs
@ 2011-04-17 23:05 ` Martin Peres
0 siblings, 0 replies; 5+ messages in thread
From: Martin Peres @ 2011-04-17 23:05 UTC (permalink / raw)
To: skeggsb-Re5JQEeQqe8AvxtiuMwx3w; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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.
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-17 23:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-17 15:10 [PATCH] drm/nvc0/pm: read core/shader/memory clocks (more) correctly Martin Peres
[not found] ` <1303053035-25716-1-git-send-email-martin.peres-GANU6spQydw@public.gmane.org>
2011-04-17 22:32 ` Ben Skeggs
2011-04-17 22:54 ` Martin Peres
[not found] ` <4DAB6F9F.3050905-GANU6spQydw@public.gmane.org>
2011-04-17 22:56 ` Ben Skeggs
2011-04-17 23:05 ` Martin Peres
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.