All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH CI 6/6] drm/i915/tgl: Check the UC health of tc controllers after power on
Date: Fri, 20 Sep 2019 13:58:10 -0700	[thread overview]
Message-ID: <20190920205810.211048-7-jose.souza@intel.com> (raw)
In-Reply-To: <20190920205810.211048-1-jose.souza@intel.com>

New step added for TGL, required for us to check the TC
microcontroller health after power on TC aux.

BSpec: 49294

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_power.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
index ce88a27229ef..f1186bc23542 100644
--- a/drivers/gpu/drm/i915/display/intel_display_power.c
+++ b/drivers/gpu/drm/i915/display/intel_display_power.c
@@ -562,6 +562,8 @@ static void icl_tc_port_assert_ref_held(struct drm_i915_private *dev_priv,
 
 #endif
 
+#define TGL_AUX_PW_TO_TC_PORT(pw_idx)	((pw_idx) - TGL_PW_CTL_IDX_AUX_TC1)
+
 static void
 icl_tc_phy_aux_power_well_enable(struct drm_i915_private *dev_priv,
 				 struct i915_power_well *power_well)
@@ -578,6 +580,17 @@ icl_tc_phy_aux_power_well_enable(struct drm_i915_private *dev_priv,
 	I915_WRITE(DP_AUX_CH_CTL(aux_ch), val);
 
 	hsw_power_well_enable(dev_priv, power_well);
+
+	if (INTEL_GEN(dev_priv) >= 12 && !power_well->desc->hsw.is_tc_tbt) {
+		enum tc_port tc_port;
+
+		tc_port = TGL_AUX_PW_TO_TC_PORT(power_well->desc->hsw.idx);
+		I915_WRITE(HIP_INDEX_REG(tc_port), HIP_INDEX_VAL(tc_port, 0x2));
+
+		if (intel_de_wait_for_set(dev_priv, DKL_CMN_UC_DW_27(tc_port),
+					  DKL_CMN_UC_DW27_UC_HEALTH, 1))
+			DRM_WARN("Timeout waiting TC uC health\n");
+	}
 }
 
 static void
-- 
2.23.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-09-20 20:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 20:58 [PATCH CI 0/6] TGL TC enabling v2-CI José Roberto de Souza
2019-09-20 20:58 ` [PATCH CI 1/6] drm/i915/tgl: Add missing ddi clock select during DP init sequence José Roberto de Souza
2019-09-20 20:58 ` [PATCH CI 2/6] drm/i915/tgl: Finish modular FIA support on registers José Roberto de Souza
2019-09-20 20:58 ` [PATCH CI 3/6] drm/i915/tgl/pll: Set update_active_dpll José Roberto de Souza
2019-09-20 20:58 ` [PATCH CI 4/6] drm/i915/tgl: Add dkl phy registers José Roberto de Souza
2019-09-20 20:58 ` [PATCH CI 5/6] drm/i915/icl: Unify disable and enable phy clock gating functions José Roberto de Souza
2019-09-20 20:58 ` José Roberto de Souza [this message]
2019-09-20 22:02 ` ✗ Fi.CI.BAT: failure for TGL TC enabling v2-CI Patchwork
2019-09-20 23:21 ` ✓ Fi.CI.BAT: success for TGL TC enabling v2-CI (rev2) Patchwork
2019-09-22 13:56 ` ✓ Fi.CI.IGT: " Patchwork
2019-09-23 17:52   ` Souza, Jose

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=20190920205810.211048-7-jose.souza@intel.com \
    --to=jose.souza@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 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.