All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 1/1] nv50: improve nv50_pm_clock_get()
Date: Fri, 18 Mar 2011 22:04:09 +1000	[thread overview]
Message-ID: <1300449860.2258.2.camel@nisroch> (raw)
In-Reply-To: <1300410948-12022-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Fri, 2011-03-18 at 01:15 +0000, Emil Velikov wrote:
> On some cards the memory and/or shader pll can be switched off/disabled
> Check and return the linked/standart clock
> 
> Signed-off-by: Emil Velikov <emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/gpu/drm/nouveau/nv50_pm.c |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nv50_pm.c b/drivers/gpu/drm/nouveau/nv50_pm.c
> index 7dbb305..c01a64f 100644
> --- a/drivers/gpu/drm/nouveau/nv50_pm.c
> +++ b/drivers/gpu/drm/nouveau/nv50_pm.c
> @@ -47,6 +47,19 @@ nv50_pm_clock_get(struct drm_device *dev, u32 id)
>  
>  	reg0 = nv_rd32(dev, pll.reg + 0);
>  	reg1 = nv_rd32(dev, pll.reg + 4);
> +
> +	if ((reg0 & 0x80000000) == 0) {
> +		if (id == PLL_SHADER) {
> +			NV_INFO(dev, "Shader PLL appears to be OFF\n");
> +			ret = nv50_pm_clock_get(dev, PLL_CORE);
> +			if (ret > 0)
> +				return ret*2;
This seems somewhat OK, from what I recall seeing.  Have you seen any
definite evidence to suggest that the shaders actually run at double the
core clock if the PLL is "off"?

> +		} else if (id == PLL_MEMORY) {
> +			NV_INFO(dev, "Memory PLL appears to be OFF\n");
> +			return 100*1000;
This, is more dubious.  Are you trying to indicate that it's running at
the reference clock?  Or always at a fixed 100MHz?

Ben.
> +		}
> +	}
> +
>  	P = (reg0 & 0x00070000) >> 16;
>  	N = (reg1 & 0x0000ff00) >> 8;
>  	M = (reg1 & 0x000000ff);

  parent reply	other threads:[~2011-03-18 12:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18  1:15 [PATCH 1/1] nv50: improve nv50_pm_clock_get() Emil Velikov
     [not found] ` <1300410948-12022-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-03-18 12:04   ` Ben Skeggs [this message]
2011-03-18 19:57     ` [PATCH 1/1] nv50: improve nv50_pm_clock_get () Emil Velikov
2011-03-19  1:38       ` Ben Skeggs
2011-03-20 22:49         ` Emil Velikov
2011-04-11 19:43           ` [PATCH] nv50: improve nv50_pm_get_clock() Emil Velikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300449860.2258.2.camel@nisroch \
    --to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.