From: Mika Kahola <mika.kahola@intel.com>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Use cached cdclk value in i915_audio_component_get_cdclk_freq()
Date: Wed, 27 Apr 2016 16:06:34 +0300 [thread overview]
Message-ID: <1461762394.30256.6.camel@sorvi> (raw)
In-Reply-To: <1461689194-6079-3-git-send-email-ville.syrjala@linux.intel.com>
Looks reasonable.
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
On Tue, 2016-04-26 at 19:46 +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> No point in reading the cdclk out from the hardware every single time
> since we have it cached already. Just return the cached value to the
> audio driver.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_audio.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 56ba8765816e..1063108a9bab 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -624,17 +624,11 @@ static void i915_audio_component_codec_wake_override(struct device *dev,
> static int i915_audio_component_get_cdclk_freq(struct device *dev)
> {
> struct drm_i915_private *dev_priv = dev_to_i915(dev);
> - int ret;
>
> if (WARN_ON_ONCE(!HAS_DDI(dev_priv)))
> return -ENODEV;
>
> - intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO);
> - ret = dev_priv->display.get_display_clock_speed(dev_priv->dev);
> -
> - intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO);
> -
> - return ret;
> + return dev_priv->cdclk_freq;
> }
>
> static int i915_audio_component_sync_audio_rate(struct device *dev,
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-27 13:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 16:46 [PATCH 0/3] drm/i915: Cdclk related fixes and polish ville.syrjala
2016-04-26 16:46 ` [PATCH 1/3] drm/i915: Update CDCLK_FREQ register on BDW after changing cdclk frequency ville.syrjala
2016-04-27 8:19 ` Mika Kahola
2016-04-27 8:19 ` Mika Kahola
2016-04-26 16:46 ` [PATCH 2/3] drm/i915: Use cached cdclk value in i915_audio_component_get_cdclk_freq() ville.syrjala
2016-04-27 13:06 ` Mika Kahola [this message]
2016-04-26 16:46 ` [PATCH 3/3] drm/i915: Fix comments about GMBUSFREQ register ville.syrjala
2016-04-27 13:30 ` Mika Kahola
2016-04-27 13:56 ` Ville Syrjälä
2016-04-28 18:40 ` Ville Syrjälä
2016-04-27 6:19 ` ✗ Fi.CI.BAT: warning for drm/i915: Cdclk related fixes and polish Patchwork
2016-04-27 17:28 ` Ville Syrjälä
2016-04-27 17:34 ` Ville Syrjälä
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=1461762394.30256.6.camel@sorvi \
--to=mika.kahola@intel.com \
--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 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.