Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: move LPT clock gating init into intel_pch

Move the LPT PCH clock gating programming into
intel_pch_init_clock_gating() and switch the corresponding
Haswell/Broadwell callers to the display-specific code.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260324080441.154609-4-luciano.coelho@intel.com
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

+21 -19
+19
drivers/gpu/drm/i915/display/intel_pch.c
··· 264 264 TRANS_CHICKEN1_DP0UNIT_GC_DISABLE); 265 265 } 266 266 267 + static void intel_pch_lpt_init_clock_gating(struct intel_display *display) 268 + { 269 + /* 270 + * TODO: this bit should only be enabled when really needed, then 271 + * disabled when not needed anymore in order to save power. 272 + */ 273 + if (HAS_PCH_LPT_LP(display)) 274 + intel_de_rmw(display, SOUTH_DSPCLK_GATE_D, 0, 275 + PCH_LP_PARTITION_LEVEL_DISABLE); 276 + 277 + /* WADPOClockGatingDisable:hsw */ 278 + intel_de_rmw(display, TRANS_CHICKEN1(PIPE_A), 0, 279 + TRANS_CHICKEN1_DP0UNIT_GC_DISABLE); 280 + } 281 + 267 282 void intel_pch_init_clock_gating(struct intel_display *display) 268 283 { 269 284 switch (INTEL_PCH_TYPE(display)) { ··· 287 272 break; 288 273 case PCH_CPT: 289 274 intel_pch_cpt_init_clock_gating(display); 275 + break; 276 + case PCH_LPT_H: 277 + case PCH_LPT_LP: 278 + intel_pch_lpt_init_clock_gating(display); 290 279 break; 291 280 default: 292 281 break;
+2 -19
drivers/gpu/drm/i915/intel_clock_gating.c
··· 266 266 gen6_check_mch_setup(i915); 267 267 } 268 268 269 - static void lpt_init_clock_gating(struct drm_i915_private *i915) 270 - { 271 - struct intel_display *display = i915->display; 272 - 273 - /* 274 - * TODO: this bit should only be enabled when really needed, then 275 - * disabled when not needed anymore in order to save power. 276 - */ 277 - if (HAS_PCH_LPT_LP(display)) 278 - intel_uncore_rmw(&i915->uncore, SOUTH_DSPCLK_GATE_D, 279 - 0, PCH_LP_PARTITION_LEVEL_DISABLE); 280 - 281 - /* WADPOClockGatingDisable:hsw */ 282 - intel_uncore_rmw(&i915->uncore, TRANS_CHICKEN1(PIPE_A), 283 - 0, TRANS_CHICKEN1_DP0UNIT_GC_DISABLE); 284 - } 285 - 286 269 static void gen8_set_l3sqc_credits(struct drm_i915_private *i915, 287 270 int general_prio_credits, 288 271 int high_prio_credits) ··· 405 422 intel_uncore_rmw(&i915->uncore, CHICKEN_PAR2_1, 406 423 0, KVM_CONFIG_CHANGE_NOTIFICATION_SELECT); 407 424 408 - lpt_init_clock_gating(i915); 425 + intel_pch_init_clock_gating(i915->display); 409 426 410 427 /* WaDisableDopClockGating:bdw 411 428 * ··· 439 456 /* WaSwitchSolVfFArbitrationPriority:hsw */ 440 457 intel_uncore_rmw(&i915->uncore, GAM_ECOCHK, 0, HSW_ECOCHK_ARB_PRIO_SOL); 441 458 442 - lpt_init_clock_gating(i915); 459 + intel_pch_init_clock_gating(i915->display); 443 460 } 444 461 445 462 static void ivb_init_clock_gating(struct drm_i915_private *i915)