From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915: Store HPLL frequency in dev_priv on VLV
Date: Tue, 5 Nov 2013 13:02:58 -0800 [thread overview]
Message-ID: <20131105130258.7c6749eb@jbarnes-desktop> (raw)
In-Reply-To: <1383684151-595-4-git-send-email-ville.syrjala@linux.intel.com>
On Tue, 5 Nov 2013 22:42:30 +0200
ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Keep the HPLL frequencey in dev_priv on VLV instead of reading
> it from CCK every time it's needed.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 2 +-
> drivers/gpu/drm/i915/intel_display.c | 7 ++++++-
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 4bae871..dd40925 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1360,7 +1360,7 @@ typedef struct drm_i915_private {
> int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
> int num_fence_regs; /* 8 on pre-965, 16 otherwise */
>
> - unsigned int fsb_freq, mem_freq, is_ddr3;
> + unsigned int fsb_freq, mem_freq, is_ddr3, hpll_vco;
>
> /**
> * wq - Driver workqueue for GEM.
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 48f4990..f97e895 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3898,13 +3898,18 @@ int valleyview_get_vco(struct drm_i915_private *dev_priv)
> {
> int hpll_freq, vco_freq[] = { 800, 1600, 2000, 2400 };
>
> + if (dev_priv->hpll_vco)
> + return dev_priv->hpll_vco;
> +
> /* Obtain SKU information */
> mutex_lock(&dev_priv->dpio_lock);
> hpll_freq = vlv_cck_read(dev_priv, CCK_FUSE_REG) &
> CCK_FUSE_HPLL_FREQ_MASK;
> mutex_unlock(&dev_priv->dpio_lock);
>
> - return vco_freq[hpll_freq];
> + dev_priv->hpll_vco = vco_freq[hpll_freq];
> +
> + return dev_priv->hpll_vco;
> }
>
> /* Adjust CDclk dividers to allow high res or save power if possible */
I'd just move this to init_clock_gating or something, then use
dev_priv->hpll_vco everywhere, rather than this conditional lazy
initialization.
--
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-11-05 21:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 20:42 [PATCH 0/4] drm/i915: VLV graphics clock improvements ville.syrjala
2013-11-05 20:42 ` [PATCH 1/4] drm/i915: Improve vlv_gpu_freq() and vlv_freq_opcode() ville.syrjala
2013-11-06 16:56 ` Jesse Barnes
2013-11-05 20:42 ` [PATCH 2/4] drm/i915: Pass dev_priv to " ville.syrjala
2013-11-05 21:01 ` Jesse Barnes
2013-11-06 17:06 ` Daniel Vetter
2013-11-05 20:42 ` [PATCH 3/4] drm/i915: Store HPLL frequency in dev_priv on VLV ville.syrjala
2013-11-05 21:02 ` Jesse Barnes [this message]
2013-11-06 8:41 ` Ville Syrjälä
2013-11-06 10:02 ` Daniel Vetter
2013-11-05 20:42 ` [PATCH 4/4] drm/i915: Add support for VLV GPLL bypass ville.syrjala
2013-11-05 21:03 ` Jesse Barnes
2013-11-06 17:07 ` Daniel Vetter
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=20131105130258.7c6749eb@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox