]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dmc: Parametrize MTL_PIPEDMC_GATING_DIS
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 17 Jun 2025 17:07:52 +0000 (20:07 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 23 Jun 2025 14:50:07 +0000 (17:50 +0300)
The MTL+ pipe DMC clock gating bits can be parametrized.
Make it so.

Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250617170759.19552-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_dmc.c
drivers/gpu/drm/i915/i915_reg.h

index 1d748b9dca443bd98d1888ca4e3039adf864b668..ef61870b882912b1284dcab3d4d8aa3788215331 100644 (file)
@@ -483,7 +483,8 @@ static void mtl_pipedmc_clock_gating_wa(struct intel_display *display)
         * for pipe A and B.
         */
        intel_de_rmw(display, GEN9_CLKGATE_DIS_0, 0,
-                    MTL_PIPEDMC_GATING_DIS_A | MTL_PIPEDMC_GATING_DIS_B);
+                    MTL_PIPEDMC_GATING_DIS(PIPE_A) |
+                    MTL_PIPEDMC_GATING_DIS(PIPE_B));
 }
 
 static void pipedmc_clock_gating_wa(struct intel_display *display, bool enable)
index 52a902532e6f7d9cabff5f105a93202ec994ccea..04fb40867cc05005f5730319ecf69bbe4b401183 100644 (file)
  */
 #define GEN9_CLKGATE_DIS_0             _MMIO(0x46530)
 #define   DARBF_GATING_DIS             REG_BIT(27)
-#define   MTL_PIPEDMC_GATING_DIS_A     REG_BIT(15)
-#define   MTL_PIPEDMC_GATING_DIS_B     REG_BIT(14)
+#define   MTL_PIPEDMC_GATING_DIS(pipe) REG_BIT(15 - (pipe))
 #define   PWM2_GATING_DIS              REG_BIT(14)
 #define   PWM1_GATING_DIS              REG_BIT(13)