From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>,
intel-gfx@lists.freedesktop.org, "Zanoni,
Paulo R" <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 2/2] drm/i915: Implement BXT and GLK cdclk restriction based on Azalia BCLK
Date: Fri, 03 Mar 2017 14:23:44 +0200 [thread overview]
Message-ID: <1488543824.4567.14.camel@gmail.com> (raw)
In-Reply-To: <1488337038-2906-2-git-send-email-dhinakaran.pandiyan@intel.com>
On Tue, 2017-02-28 at 18:57 -0800, Dhinakaran Pandiyan wrote:
> According to BSpec, "The CD clock frequency must be at least twice the
> frequency of the Azalia BCLK." and BCLK is configured to 96 MHz by
> default. BXT and GLK both have cdclk frequencies that are less han 192 MHz,
> so apply the check conditionally for these platforms.
>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> drivers/gpu/drm/i915/intel_cdclk.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
> index 8fc0f72..89027fa 100644
> --- a/drivers/gpu/drm/i915/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/intel_cdclk.c
> @@ -1444,6 +1444,8 @@ static int intel_min_cdclk(struct drm_atomic_state *state)
> struct intel_crtc_state *crtc_state;
>
> crtc_state = to_intel_crtc_state(cstate);
> + if (!crtc_state->has_audio)
> + continue;
>
> /* According to BSpec, "Do not use DisplayPort with CDCLK less
> * than 432 MHz, audio enabled, port width x4, and link rate
> @@ -1452,7 +1454,6 @@ static int intel_min_cdclk(struct drm_atomic_state *state)
> * for GLK is at 316.8 MHz
> */
> if (intel_crtc_has_dp_encoder(crtc_state) &&
> - crtc_state->has_audio &&
> crtc_state->port_clock >= 540000 &&
> crtc_state->lane_count == 4) {
> if (IS_GEMINILAKE(dev_priv))
> @@ -1460,6 +1461,13 @@ static int intel_min_cdclk(struct drm_atomic_state *state)
> else if (IS_BROADWELL(dev_priv) || IS_GEN9(dev_priv))
> min_cdclk = 432000;
> }
> +
> + /* 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.
> + */
> + if (IS_BROXTON(dev_priv) || IS_GEMINILAKE(dev_priv))
> + min_cdclk = max(min_cdclk, 2 * 96000);
Hmm, my assumption from reviewing patch 1 of "this returns a valid cdclk" is
broken here. Maybe with the idea of splitting the calc_cdclk_state() in two from
my comment to Paulo's series this could be just:
min_cdclk = max(min_cdcdlk, choose_cdclk(2 * 96000));
?
On second thought, it does make sense for this kind of platform specific
restrictions to be dealt with in platform specific hook, so duplicating that in
calc_cdclk_state() is not that bad?
Ander
> }
>
> return min_cdclk;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-03 12:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 2:57 [PATCH 1/2] drm/i915/glk: Apply cdclk workaround for DP audio Dhinakaran Pandiyan
2017-03-01 2:57 ` [PATCH 2/2] drm/i915: Implement BXT and GLK cdclk restriction based on Azalia BCLK Dhinakaran Pandiyan
2017-03-03 12:23 ` Ander Conselvan De Oliveira [this message]
2017-03-04 0:08 ` Pandiyan, Dhinakaran
2017-03-01 4:22 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915/glk: Apply cdclk workaround for DP audio Patchwork
2017-03-03 12:14 ` [PATCH 1/2] " Ander Conselvan De Oliveira
2017-03-03 17:55 ` Paulo Zanoni
2017-03-03 23:39 ` Pandiyan, Dhinakaran
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=1488543824.4567.14.camel@gmail.com \
--to=conselvan2@gmail.com \
--cc=dhinakaran.pandiyan@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@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.