]> git.hungrycats.org Git - linux/commitdiff
drm/i915/dg1: Update DMC_DEBUG3 register
authorChuansheng Liu <chuansheng.liu@intel.com>
Fri, 11 Feb 2022 00:29:33 +0000 (08:29 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Mar 2024 12:21:53 +0000 (13:21 +0100)
[ Upstream commit b60668cb4c57a7cc451de781ae49f5e9cc375eaf ]

Current DMC_DEBUG3(_MMIO(0x101090)) address is for TGL,
it is wrong for DG1. Just like commit 5bcc95ca382e
("drm/i915/dg1: Update DMC_DEBUG register"), correct
this issue for DG1 platform to avoid wrong register
being read.

BSpec: 49788

v2: fix "not wrong" typo. (Jani)

Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Chuansheng Liu <chuansheng.liu@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220211002933.84240-1-chuansheng.liu@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/i915/display/intel_display_debugfs.c
drivers/gpu/drm/i915/i915_reg.h

index b136a0fc0963bf48a0c4925906e602edde1d8ded..6b3e2e053f4579172b197516e4ea1183bc26837c 100644 (file)
@@ -571,8 +571,8 @@ static int i915_dmc_info(struct seq_file *m, void *unused)
                 * reg for DC3CO debugging and validation,
                 * but TGL DMC f/w is using DMC_DEBUG3 reg for DC3CO counter.
                 */
-               seq_printf(m, "DC3CO count: %d\n",
-                          intel_de_read(dev_priv, DMC_DEBUG3));
+               seq_printf(m, "DC3CO count: %d\n", intel_de_read(dev_priv, IS_DGFX(dev_priv) ?
+                                       DG1_DMC_DEBUG3 : TGL_DMC_DEBUG3));
        } else {
                dc5_reg = IS_BROXTON(dev_priv) ? BXT_DMC_DC3_DC5_COUNT :
                                                 SKL_DMC_DC3_DC5_COUNT;
index 3c70aa5229e5ae9bf888e045f0a3bff612af75f7..906982d6370d03f3516fbe486a77933b3ac30eeb 100644 (file)
@@ -7841,7 +7841,8 @@ enum {
 #define TGL_DMC_DEBUG_DC6_COUNT        _MMIO(0x101088)
 #define DG1_DMC_DEBUG_DC5_COUNT        _MMIO(0x134154)
 
-#define DMC_DEBUG3             _MMIO(0x101090)
+#define TGL_DMC_DEBUG3         _MMIO(0x101090)
+#define DG1_DMC_DEBUG3         _MMIO(0x13415c)
 
 /* Display Internal Timeout Register */
 #define RM_TIMEOUT             _MMIO(0x42060)