From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: Re: [PATCH] drm/i915/audio: set minimum CD clock to twice the BCLK
Date: Thu, 19 Apr 2018 12:14:48 +0300 [thread overview]
Message-ID: <87d0yvfth3.fsf@intel.com> (raw)
In-Reply-To: <20180418103707.14645-1-jani.nikula@intel.com>
On Wed, 18 Apr 2018, Jani Nikula <jani.nikula@intel.com> wrote:
> From: Abhay Kumar <abhay.kumar@intel.com>
>
> In GLK when the device boots with only 1366x768 panel without audio, HDA
> codec doesn't come up. In this case, the CDCLK is less than twice the
> BCLK. Even though audio isn't being enabled, having a too low CDCLK
> leads to audio probe failing altogether.
>
> Require CDCLK to be at least twice the BLCK regardless of audio. This is
> a minimal fix to improve things. Unfortunately, this a) leads to too
> high CDCLK being used when audio is not used, and b) is still not enough
> to fix audio probe when no outputs are connected at probe time.
>
> The proper fix would be to increase CDCLK dynamically from the audio
> component hooks.
>
> v2:
> - Address comment (Jani)
> - New design approach
> v3: - Typo fix on top of v1
>
> v4 by Jani: rewrite commit message, add comment in code
>
> Cc: stable@vger.kernel.org
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@gmail.com>
> Cc: Wenkai Du <wenkai.du@intel.com>
> Reviewed-by: Wenkai Du <wenkai.du@intel.com>
> Tested-by: Wenkai Du <wenkai.du@intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102937
> Signed-off-by: Abhay Kumar <abhay.kumar@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Pushed to dinq with Ville's Ack on another thread.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/intel_cdclk.c | 16 ++++++++++++++--
> 1 file changed, 14 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
> index fc8b2c6e3508..32d24c69da3c 100644
> --- a/drivers/gpu/drm/i915/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/intel_cdclk.c
> @@ -2140,10 +2140,22 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
> }
> }
>
> - /* According to BSpec, "The CD clock frequency must be at least twice
> + /*
> + * According to BSpec, "The CD clock frequency must be at least twice
> * the frequency of the Azalia BCLK." and BCLK is 96 MHz by default.
> + *
> + * FIXME: Check the actual, not default, BCLK being used.
> + *
> + * FIXME: This does not depend on ->has_audio because the higher CDCLK
> + * is required for audio probe, also when there are no audio capable
> + * displays connected at probe time. This leads to unnecessarily high
> + * CDCLK when audio is not required.
> + *
> + * FIXME: This limit is only applied when there are displays connected
> + * at probe time. If we probe without displays, we'll still end up using
> + * the platform minimum CDCLK, failing audio probe.
> */
> - if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9)
> + if (INTEL_GEN(dev_priv) >= 9)
> min_cdclk = max(2 * 96000, min_cdclk);
>
> /*
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2018-04-19 9:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 10:37 [PATCH] drm/i915/audio: set minimum CD clock to twice the BCLK Jani Nikula
2018-04-18 15:35 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2018-04-18 15:49 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-18 20:27 ` ✓ Fi.CI.IGT: " Patchwork
2018-04-19 9:14 ` Jani Nikula [this message]
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=87d0yvfth3.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).