From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Ander Conselvan de Oliveira
<ander.conselvan.de.oliveira@intel.com>,
Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Subject: [PATCH 2/2] drm/i915: Implement BXT and GLK cdclk restriction based on Azalia BCLK
Date: Tue, 28 Feb 2017 18:57:18 -0800 [thread overview]
Message-ID: <1488337038-2906-2-git-send-email-dhinakaran.pandiyan@intel.com> (raw)
In-Reply-To: <1488337038-2906-1-git-send-email-dhinakaran.pandiyan@intel.com>
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);
}
return min_cdclk;
--
2.7.4
_______________________________________________
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-01 2:59 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 ` Dhinakaran Pandiyan [this message]
2017-03-03 12:23 ` [PATCH 2/2] drm/i915: Implement BXT and GLK cdclk restriction based on Azalia BCLK Ander Conselvan De Oliveira
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=1488337038-2906-2-git-send-email-dhinakaran.pandiyan@intel.com \
--to=dhinakaran.pandiyan@intel.com \
--cc=ander.conselvan.de.oliveira@intel.com \
--cc=intel-gfx@lists.freedesktop.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