From: Matt Atwood <matthew.s.atwood@intel.com>
To: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>,
Gustavo Sousa <gustavo.sousa@intel.com>,
Matt Atwood <matthew.s.atwood@intel.com>
Subject: [PATCH v2 05/10] drm/i915/xe3lpd: Add cdclk changes
Date: Thu, 10 Oct 2024 15:43:06 -0700 [thread overview]
Message-ID: <20241010224311.50133-6-matthew.s.atwood@intel.com> (raw)
In-Reply-To: <20241010224311.50133-1-matthew.s.atwood@intel.com>
From: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Xe3_LPD has new max cdclk of 691200 which requires reusing the lnl table
and modify/add higher frequencies. Updating the max cdclk supported by
the platform and voltage_level determination is also updated.
There are minor changes in cdclk programming sequence compared to lnl,
where programming cd2x divider needs to be skipped. This is already handled
by the calculations in existing code.
v2: update tables
Bspec: 68861, 68863, 68864
Cc: Gustavo Sousa <gustavo.sousa@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Matt Atwood <matthew.s.atwood@intel.com>
---
drivers/gpu/drm/i915/display/intel_cdclk.c | 61 +++++++++++++++++++++-
1 file changed, 59 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
index fa1c2012b10c..13829a3c3c42 100644
--- a/drivers/gpu/drm/i915/display/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
@@ -1468,6 +1468,39 @@ static const struct intel_cdclk_vals xe2hpd_cdclk_table[] = {
{}
};
+static const struct intel_cdclk_vals xe3lpd_cdclk_table[] = {
+ { .refclk = 38400, .cdclk = 153600, .ratio = 16, .waveform = 0xaaaa },
+ { .refclk = 38400, .cdclk = 172800, .ratio = 16, .waveform = 0xad5a },
+ { .refclk = 38400, .cdclk = 192000, .ratio = 16, .waveform = 0xb6b6 },
+ { .refclk = 38400, .cdclk = 211200, .ratio = 16, .waveform = 0xdbb6 },
+ { .refclk = 38400, .cdclk = 230400, .ratio = 16, .waveform = 0xeeee },
+ { .refclk = 38400, .cdclk = 249600, .ratio = 16, .waveform = 0xf7de },
+ { .refclk = 38400, .cdclk = 268800, .ratio = 16, .waveform = 0xfefe },
+ { .refclk = 38400, .cdclk = 288000, .ratio = 16, .waveform = 0xfffe },
+ { .refclk = 38400, .cdclk = 307200, .ratio = 16, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 326400, .ratio = 17, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 345600, .ratio = 18, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 364800, .ratio = 19, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 384000, .ratio = 20, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 403200, .ratio = 21, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 422400, .ratio = 22, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 441600, .ratio = 23, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 460800, .ratio = 24, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 480000, .ratio = 25, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 499200, .ratio = 26, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 518400, .ratio = 27, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 537600, .ratio = 28, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 556800, .ratio = 29, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 576000, .ratio = 30, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 595200, .ratio = 31, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 614400, .ratio = 32, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 633600, .ratio = 33, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 652800, .ratio = 34, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 672000, .ratio = 35, .waveform = 0xffff },
+ { .refclk = 38400, .cdclk = 691200, .ratio = 36, .waveform = 0xffff },
+ {}
+};
+
static const int cdclk_squash_len = 16;
static int cdclk_squash_divider(u16 waveform)
@@ -1594,6 +1627,18 @@ static u8 rplu_calc_voltage_level(int cdclk)
rplu_voltage_level_max_cdclk);
}
+static u8 xe3lpd_calc_voltage_level(int cdclk)
+{
+ static const int xe3lpd_voltage_level_max_cdclk[] = {
+ [0] = 307200,
+ [1] = 691200,
+ };
+
+ return calc_voltage_level(cdclk,
+ ARRAY_SIZE(xe3lpd_voltage_level_max_cdclk),
+ xe3lpd_voltage_level_max_cdclk);
+}
+
static void icl_readout_refclk(struct intel_display *display,
struct intel_cdclk_config *cdclk_config)
{
@@ -3437,7 +3482,9 @@ void intel_update_max_cdclk(struct intel_display *display)
{
struct drm_i915_private *dev_priv = to_i915(display->drm);
- if (IS_JASPERLAKE(dev_priv) || IS_ELKHARTLAKE(dev_priv)) {
+ if (DISPLAY_VER(display) >= 30) {
+ display->cdclk.max_cdclk_freq = 691200;
+ } else if (IS_JASPERLAKE(dev_priv) || IS_ELKHARTLAKE(dev_priv)) {
if (display->cdclk.hw.ref == 24000)
display->cdclk.max_cdclk_freq = 552000;
else
@@ -3650,6 +3697,13 @@ void intel_cdclk_debugfs_register(struct intel_display *display)
display, &i915_cdclk_info_fops);
}
+static const struct intel_cdclk_funcs xe3lpd_cdclk_funcs = {
+ .get_cdclk = bxt_get_cdclk,
+ .set_cdclk = bxt_set_cdclk,
+ .modeset_calc_cdclk = bxt_modeset_calc_cdclk,
+ .calc_voltage_level = xe3lpd_calc_voltage_level,
+};
+
static const struct intel_cdclk_funcs rplu_cdclk_funcs = {
.get_cdclk = bxt_get_cdclk,
.set_cdclk = bxt_set_cdclk,
@@ -3794,7 +3848,10 @@ void intel_init_cdclk_hooks(struct intel_display *display)
{
struct drm_i915_private *dev_priv = to_i915(display->drm);
- if (DISPLAY_VER(display) >= 20) {
+ if (DISPLAY_VER(display) >= 30) {
+ display->funcs.cdclk = &xe3lpd_cdclk_funcs;
+ display->cdclk.table = xe3lpd_cdclk_table;
+ } else if (DISPLAY_VER(display) >= 20) {
display->funcs.cdclk = &rplu_cdclk_funcs;
display->cdclk.table = xe2lpd_cdclk_table;
} else if (DISPLAY_VER_FULL(display) >= IP_VER(14, 1)) {
--
2.45.0
next prev parent reply other threads:[~2024-10-10 22:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 22:43 [PATCH v2 00/10] Add xe3lpd edp enabling Matt Atwood
2024-10-10 22:43 ` [PATCH v2 01/10] drm/i915/xe3lpd: reuse xe2lpd definition Matt Atwood
2024-10-10 22:43 ` [PATCH v2 02/10] drm/i915/xe3lpd: Adjust watermark calculations Matt Atwood
2024-10-10 22:43 ` [PATCH v2 03/10] drm/i915/xe3lpd: Add new display power wells Matt Atwood
2024-10-11 21:49 ` Matt Roper
2024-10-10 22:43 ` [PATCH v2 04/10] drm/i915/xe3lpd: Update pmdemand programming Matt Atwood
2024-10-11 6:33 ` Govindapillai, Vinod
2024-10-11 13:03 ` Gustavo Sousa
2024-10-11 15:00 ` Jani Nikula
2024-10-10 22:43 ` Matt Atwood [this message]
2024-10-11 20:32 ` [PATCH v2 05/10] drm/i915/xe3lpd: Add cdclk changes Matt Roper
2024-10-10 22:43 ` [PATCH v2 06/10] drm/i915/xe3lpd: Include hblank restriction for xe3lpd Matt Atwood
2024-10-11 8:20 ` Jani Nikula
2024-10-10 22:43 ` [PATCH v2 07/10] drm/i915/xe3lpd: Add C20 Phy consolidated programming table Matt Atwood
2024-10-11 21:45 ` Matt Roper
2024-10-13 15:23 ` Kandpal, Suraj
2024-10-10 22:43 ` [PATCH v2 08/10] drm/i915/xe3lpd: Add new bit range of MAX swing setup Matt Atwood
2024-10-10 22:43 ` [PATCH v2 09/10] drm/i915/xe3lpd: Add check to see if edp over type c is allowed Matt Atwood
2024-10-11 8:22 ` Jani Nikula
2024-10-10 22:43 ` [PATCH v2 10/10] drm/i915/xe3lpd: Add condition for EDP to powerdown P2.PG Matt Atwood
2024-10-10 23:12 ` ✓ CI.Patch_applied: success for Add xe3lpd edp enabling (rev2) Patchwork
2024-10-10 23:12 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-10 23:14 ` ✓ CI.KUnit: success " Patchwork
2024-10-10 23:25 ` ✓ CI.Build: " Patchwork
2024-10-10 23:27 ` ✓ CI.Hooks: " Patchwork
2024-10-10 23:29 ` ✗ CI.checksparse: warning " Patchwork
2024-10-10 23:53 ` ✓ CI.BAT: success " Patchwork
2024-10-11 4:02 ` ✗ CI.FULL: failure " Patchwork
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=20241010224311.50133-6-matthew.s.atwood@intel.com \
--to=matthew.s.atwood@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=radhakrishna.sripada@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