From 0aa33ed963ddbd3b55b88e0f431f5444e5d2cdfa Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 3 Aug 2022 03:14:23 +0000 Subject: [PATCH] drm/i915/adlp: Fix register corruption after DDI clock enabling From Imre Deak 59207e63801fbcd39ca68df6e2ba5ae90f76c0c3 in mainline linux --- sys/dev/pci/drm/i915/i915_reg.h | 1 + sys/dev/pci/drm/i915/intel_pm.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/sys/dev/pci/drm/i915/i915_reg.h b/sys/dev/pci/drm/i915/i915_reg.h index 9846d9a373e..7e56e3db791 100644 --- a/sys/dev/pci/drm/i915/i915_reg.h +++ b/sys/dev/pci/drm/i915/i915_reg.h @@ -8308,6 +8308,7 @@ enum { #define ICL_DELAY_PMRSP REG_BIT(22) #define DISABLE_FLR_SRC REG_BIT(15) #define MASK_WAKEMEM REG_BIT(13) +#define DDI_CLOCK_REG_ACCESS REG_BIT(7) #define GEN11_CHICKEN_DCPR_2 _MMIO(0x46434) #define DCPR_MASK_MAXLATENCY_MEMUP_CLR REG_BIT(27) diff --git a/sys/dev/pci/drm/i915/intel_pm.c b/sys/dev/pci/drm/i915/intel_pm.c index a1417ed2e5d..e678740f614 100644 --- a/sys/dev/pci/drm/i915/intel_pm.c +++ b/sys/dev/pci/drm/i915/intel_pm.c @@ -7606,6 +7606,9 @@ static void adlp_init_clock_gating(struct drm_i915_private *dev_priv) /* Wa_22011091694:adlp */ intel_de_rmw(dev_priv, GEN9_CLKGATE_DIS_5, 0, DPCE_GATING_DIS); + + /* Bspec/49189 Initialize Sequence */ + intel_de_rmw(dev_priv, GEN8_CHICKEN_DCPR_1, DDI_CLOCK_REG_ACCESS, 0); } static void dg1_init_clock_gating(struct drm_i915_private *dev_priv) -- 2.20.1