From: Ramalingam C <ramalingam.c@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel <dri-devel@lists.freedesktop.org>
Cc: lucas.demarchi@intel.com
Subject: [Intel-gfx] [PATCH 02/15] drm/i915: Fix for PHY_MISC_TC1 offset
Date: Sat, 19 Feb 2022 00:17:39 +0530 [thread overview]
Message-ID: <20220218184752.7524-3-ramalingam.c@intel.com> (raw)
In-Reply-To: <20220218184752.7524-1-ramalingam.c@intel.com>
From: Jouni Högander <jouni.hogander@intel.com>
Currently ICL_PHY_MISC macro is returning offset 0x64C10 for PHY_E.
The PORT_TC1 port is not yet enabled properly in the driver, but
intel_phy_snps.c is relying on intel_phy_is_snps() to filter out
unavailable phys. That function was already considering the last phy as
available. Just correct the offset of the last phy to 0x64C14 as the
rest of the support for it is coming on next commits.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/i915/display/intel_snps_phy.c | 2 +-
drivers/gpu/drm/i915/i915_reg.h | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_snps_phy.c b/drivers/gpu/drm/i915/display/intel_snps_phy.c
index 8fd00de981fc..4cdce0116883 100644
--- a/drivers/gpu/drm/i915/display/intel_snps_phy.c
+++ b/drivers/gpu/drm/i915/display/intel_snps_phy.c
@@ -32,7 +32,7 @@ void intel_snps_phy_wait_for_calibration(struct drm_i915_private *i915)
if (!intel_phy_is_snps(i915, phy))
continue;
- if (intel_de_wait_for_clear(i915, ICL_PHY_MISC(phy),
+ if (intel_de_wait_for_clear(i915, DG2_PHY_MISC(phy),
DG2_PHY_DP_TX_ACK_MASK, 25))
drm_err(&i915->drm, "SNPS PHY %c failed to calibrate after 25ms.\n",
phy_name(phy));
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index e2e9f543fb83..cc13918fe246 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -9361,8 +9361,10 @@ enum skl_power_gate {
#define _ICL_PHY_MISC_A 0x64C00
#define _ICL_PHY_MISC_B 0x64C04
-#define ICL_PHY_MISC(port) _MMIO_PORT(port, _ICL_PHY_MISC_A, \
- _ICL_PHY_MISC_B)
+#define _DG2_PHY_MISC_TC1 0x64C14 /* TC1="PHY E" but offset as if "PHY F" */
+#define ICL_PHY_MISC(port) _MMIO_PORT(port, _ICL_PHY_MISC_A, _ICL_PHY_MISC_B)
+#define DG2_PHY_MISC(port) ((port) == PHY_E ? _MMIO(_DG2_PHY_MISC_TC1) : \
+ ICL_PHY_MISC(port))
#define ICL_PHY_MISC_MUX_DDID (1 << 28)
#define ICL_PHY_MISC_DE_IO_COMP_PWR_DOWN (1 << 23)
#define DG2_PHY_DP_TX_ACK_MASK REG_GENMASK(23, 20)
--
2.20.1
next prev parent reply other threads:[~2022-02-18 18:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 18:47 [Intel-gfx] [PATCH 00/15] drm/i915: Enable DG2 Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 01/15] drm/i915/dg2: Define GuC firmware version for DG2 Ramalingam C
2022-02-18 19:14 ` Ceraolo Spurio, Daniele
2022-02-18 18:47 ` Ramalingam C [this message]
2022-02-18 18:47 ` [Intel-gfx] [PATCH 03/15] drm/i915/dg2: Drop 38.4 MHz MPLLB tables Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 04/15] drm/i915/dg2: Enable 5th port Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 05/15] drm/i915: add needs_compact_pt flag Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 06/15] drm/i915: enforce min GTT alignment for discrete cards Ramalingam C
2022-03-03 9:43 ` Jani Nikula
2022-02-18 18:47 ` [Intel-gfx] [PATCH 07/15] drm/i915: support 64K GTT pages " Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 08/15] drm/i915: add gtt misalignment test Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 09/15] drm/i915/gtt: allow overriding the pt alignment Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 10/15] drm/i915/gtt: add xehpsdv_ppgtt_insert_entry Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 11/15] drm/i915/migrate: add acceleration support for DG2 Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 12/15] drm/i915/uapi: document behaviour for DG2 64K support Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 13/15] drm/i915/xehpsdv: Add has_flat_ccs to device info Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 14/15] drm/i915/lmem: Enable lmem for platforms with Flat CCS Ramalingam C
2022-02-18 18:47 ` [Intel-gfx] [PATCH 15/15] drm/i915/gt: Clear compress metadata for Xe_HP platforms Ramalingam C
2022-02-19 1:47 ` Matt Roper
2022-02-27 16:52 ` Ramalingam C
2022-03-03 5:28 ` Matt Roper
2022-02-18 19:09 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Enable DG2 Patchwork
2022-02-18 19:10 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-18 19:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-19 11:53 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-02-20 10:18 ` [Intel-gfx] [PATCH 00/15] " Lucas De Marchi
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=20220218184752.7524-3-ramalingam.c@intel.com \
--to=ramalingam.c@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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