OSDN Git Service

drm/i915/tgl: Program MBUS_ABOX{1,2}_CTL during display init
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 4 Feb 2020 01:10:32 +0000 (17:10 -0800)
committerMatt Roper <matthew.d.roper@intel.com>
Thu, 20 Feb 2020 21:14:31 +0000 (13:14 -0800)
On gen11 we only needed to program MBus credits into MBUS_ABOX_CTL
during display initialization, but on gen12 we're now supposed to
program the same values into MBUS_ABOX1_CTL and MBUS_ABOX2_CTL as well.

v2:
 - Program registers with rmw to preserve contents of unrelated bits.
 - Switch to the new display uncore helpers.

Bspec: 49213
Bspec: 50096
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200204011032.582737-2-matthew.d.roper@intel.com
Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com>
drivers/gpu/drm/i915/display/intel_display_power.c
drivers/gpu/drm/i915/i915_reg.h

index 6e1d5d7..0d94fe0 100644 (file)
@@ -4498,6 +4498,10 @@ static void icl_mbus_init(struct drm_i915_private *dev_priv)
                MBUS_ABOX_BW_CREDIT(1);
 
        intel_de_rmw(dev_priv, MBUS_ABOX_CTL, mask, val);
+       if (INTEL_GEN(dev_priv) >= 12) {
+               intel_de_rmw(dev_priv, MBUS_ABOX1_CTL, mask, val);
+               intel_de_rmw(dev_priv, MBUS_ABOX2_CTL, mask, val);
+       }
 }
 
 static void hsw_assert_cdclk(struct drm_i915_private *dev_priv)
index faf8945..4acb6de 100644 (file)
@@ -2865,6 +2865,8 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)
 #define MI_ARB_STATE   _MMIO(0x20e4) /* 915+ only */
 
 #define MBUS_ABOX_CTL                  _MMIO(0x45038)
+#define MBUS_ABOX1_CTL                 _MMIO(0x45048)
+#define MBUS_ABOX2_CTL                 _MMIO(0x4504C)
 #define MBUS_ABOX_BW_CREDIT_MASK       (3 << 20)
 #define MBUS_ABOX_BW_CREDIT(x)         ((x) << 20)
 #define MBUS_ABOX_B_CREDIT_MASK                (0xF << 16)