TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);
}
+static void intel_pch_lpt_init_clock_gating(struct intel_display *display)
+{
+ /*
+ * TODO: this bit should only be enabled when really needed, then
+ * disabled when not needed anymore in order to save power.
+ */
+ if (HAS_PCH_LPT_LP(display))
+ intel_de_rmw(display, SOUTH_DSPCLK_GATE_D, 0,
+ PCH_LP_PARTITION_LEVEL_DISABLE);
+
+ /* WADPOClockGatingDisable:hsw */
+ intel_de_rmw(display, TRANS_CHICKEN1(PIPE_A), 0,
+ TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);
+}
+
void intel_pch_init_clock_gating(struct intel_display *display)
{
switch (INTEL_PCH_TYPE(display)) {
case PCH_CPT:
intel_pch_cpt_init_clock_gating(display);
break;
+ case PCH_LPT_H:
+ case PCH_LPT_LP:
+ intel_pch_lpt_init_clock_gating(display);
+ break;
default:
break;
}
gen6_check_mch_setup(i915);
}
-static void lpt_init_clock_gating(struct drm_i915_private *i915)
-{
- struct intel_display *display = i915->display;
-
- /*
- * TODO: this bit should only be enabled when really needed, then
- * disabled when not needed anymore in order to save power.
- */
- if (HAS_PCH_LPT_LP(display))
- intel_uncore_rmw(&i915->uncore, SOUTH_DSPCLK_GATE_D,
- 0, PCH_LP_PARTITION_LEVEL_DISABLE);
-
- /* WADPOClockGatingDisable:hsw */
- intel_uncore_rmw(&i915->uncore, TRANS_CHICKEN1(PIPE_A),
- 0, TRANS_CHICKEN1_DP0UNIT_GC_DISABLE);
-}
-
static void gen8_set_l3sqc_credits(struct drm_i915_private *i915,
int general_prio_credits,
int high_prio_credits)
intel_uncore_rmw(&i915->uncore, CHICKEN_PAR2_1,
0, KVM_CONFIG_CHANGE_NOTIFICATION_SELECT);
- lpt_init_clock_gating(i915);
+ intel_pch_init_clock_gating(i915->display);
/* WaDisableDopClockGating:bdw
*
/* WaSwitchSolVfFArbitrationPriority:hsw */
intel_uncore_rmw(&i915->uncore, GAM_ECOCHK, 0, HSW_ECOCHK_ARB_PRIO_SOL);
- lpt_init_clock_gating(i915);
+ intel_pch_init_clock_gating(i915->display);
}
static void ivb_init_clock_gating(struct drm_i915_private *i915)