Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v2 5/9] drm/i915/display/mtl: Program latch to phy reset
Date: Tue, 21 Feb 2023 23:35:03 -0800	[thread overview]
Message-ID: <20230222073507.788705-6-radhakrishna.sripada@intel.com> (raw)
In-Reply-To: <20230222073507.788705-1-radhakrishna.sripada@intel.com>

From: José Roberto de Souza <jose.souza@intel.com>

Latch reset of phys during DC9 and when driver is unloaded to avoid
phy reset.

Specification ask us to program it closer to the step that enables
DC9 in DC_STATE_EN but doing this way allow us to sanitize the phy
latch during driver load.

BSpec: 49197
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 8 ++++++++
 drivers/gpu/drm/i915/i915_reg.h                    | 2 ++
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index 743b919bb2cf..50098c77e3be 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -1624,6 +1624,10 @@ static void icl_display_core_init(struct drm_i915_private *dev_priv,
 	intel_power_well_enable(dev_priv, well);
 	mutex_unlock(&power_domains->lock);
 
+	if (DISPLAY_VER(dev_priv) == 14)
+		intel_de_rmw(dev_priv, DC_STATE_EN,
+			     HOLD_PHY_PG1_LATCH | HOLD_PHY_CLKREQ_PG1_LATCH, 0);
+
 	/* 4. Enable CDCLK. */
 	intel_cdclk_init_hw(dev_priv);
 
@@ -1677,6 +1681,10 @@ static void icl_display_core_uninit(struct drm_i915_private *dev_priv)
 	/* 3. Disable CD clock */
 	intel_cdclk_uninit_hw(dev_priv);
 
+	if (DISPLAY_VER(dev_priv) == 14)
+		intel_de_rmw(dev_priv, DC_STATE_EN, 0,
+			     HOLD_PHY_PG1_LATCH | HOLD_PHY_CLKREQ_PG1_LATCH);
+
 	/*
 	 * 4. Disable Power Well 1 (PG1).
 	 *    The AUX IO power wells are toggled on demand, so they are already
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 7c9ac5b43831..fa1905cc5a99 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -7360,6 +7360,8 @@ enum skl_power_gate {
 #define  DC_STATE_DISABLE		0
 #define  DC_STATE_EN_DC3CO		REG_BIT(30)
 #define  DC_STATE_DC3CO_STATUS		REG_BIT(29)
+#define  HOLD_PHY_CLKREQ_PG1_LATCH	REG_BIT(21)
+#define  HOLD_PHY_PG1_LATCH		REG_BIT(20)
 #define  DC_STATE_EN_UPTO_DC5		(1 << 0)
 #define  DC_STATE_EN_DC9		(1 << 3)
 #define  DC_STATE_EN_UPTO_DC6		(2 << 0)
-- 
2.34.1


  parent reply	other threads:[~2023-02-22  7:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22  7:34 [Intel-gfx] [PATCH v2 0/9] Misc Meteorlake patches Radhakrishna Sripada
2023-02-22  7:34 ` [Intel-gfx] [PATCH v2 1/9] drm/i915/mtl: Fix Wa_14015855405 implementation Radhakrishna Sripada
2023-02-22 18:53   ` Matt Roper
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 2/9] drm/i915/gt: generate per tile debugfs files Radhakrishna Sripada
2023-02-22 19:00   ` Matt Roper
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 3/9] drm/i915/mtl: make IRQ reset and postinstall multi-gt aware Radhakrishna Sripada
2023-02-22 15:19   ` Lucas De Marchi
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 4/9] drm/i915/fbdev: lock the fbdev obj before vma pin Radhakrishna Sripada
2023-02-22 19:07   ` Matt Roper
2023-02-22  7:35 ` Radhakrishna Sripada [this message]
2023-02-22 19:13   ` [Intel-gfx] [PATCH v2 5/9] drm/i915/display/mtl: Program latch to phy reset Matt Roper
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 6/9] drm/i915/mtl: Drop FLAT CCS check Radhakrishna Sripada
2023-02-22 19:16   ` Matt Roper
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 7/9] drm/i915/mtl: Add MTL for remapping CCS FBs Radhakrishna Sripada
2023-02-22 19:26   ` Matt Roper
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 8/9] drm/i915/mtl: define MTL related ccs modifiers Radhakrishna Sripada
2023-02-22 19:29   ` Matt Roper
2023-02-22  7:35 ` [Intel-gfx] [PATCH v2 9/9] drm/i915/mtl: Add handling for MTL " Radhakrishna Sripada
2023-02-22  8:04 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for Misc Meteorlake patches (rev2) Patchwork
2023-02-22 15:06 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-02-22 16:26 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20230222073507.788705-6-radhakrishna.sripada@intel.com \
    --to=radhakrishna.sripada@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