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/wa: convert intel_display_wa.[ch] to struct intel_display

Going forward, struct intel_display is the main display device data
pointer. Convert as much as possible of intel_display_wa.[ch] to struct
intel_display.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://lore.kernel.org/r/821937f9fcdcb7d5516be0c48c2cee009936ecb8.1742906146.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+28 -24
+1 -2
drivers/gpu/drm/i915/display/intel_display_driver.c
··· 82 82 83 83 void intel_display_driver_init_hw(struct intel_display *display) 84 84 { 85 - struct drm_i915_private *i915 = to_i915(display->drm); 86 85 struct intel_cdclk_state *cdclk_state; 87 86 88 87 if (!HAS_DISPLAY(display)) ··· 93 94 intel_cdclk_dump_config(display, &display->cdclk.hw, "Current CDCLK"); 94 95 cdclk_state->logical = cdclk_state->actual = display->cdclk.hw; 95 96 96 - intel_display_wa_apply(i915); 97 + intel_display_wa_apply(display); 97 98 } 98 99 99 100 static const struct drm_mode_config_funcs intel_mode_funcs = {
+15 -15
drivers/gpu/drm/i915/display/intel_display_wa.c
··· 3 3 * Copyright © 2023 Intel Corporation 4 4 */ 5 5 6 - #include "i915_drv.h" 7 6 #include "i915_reg.h" 8 7 #include "intel_de.h" 8 + #include "intel_display_core.h" 9 9 #include "intel_display_wa.h" 10 10 11 - static void gen11_display_wa_apply(struct drm_i915_private *i915) 11 + static void gen11_display_wa_apply(struct intel_display *display) 12 12 { 13 13 /* Wa_14010594013 */ 14 - intel_de_rmw(i915, GEN8_CHICKEN_DCPR_1, 0, ICL_DELAY_PMRSP); 14 + intel_de_rmw(display, GEN8_CHICKEN_DCPR_1, 0, ICL_DELAY_PMRSP); 15 15 } 16 16 17 - static void xe_d_display_wa_apply(struct drm_i915_private *i915) 17 + static void xe_d_display_wa_apply(struct intel_display *display) 18 18 { 19 19 /* Wa_14013723622 */ 20 - intel_de_rmw(i915, CLKREQ_POLICY, CLKREQ_POLICY_MEM_UP_OVRD, 0); 20 + intel_de_rmw(display, CLKREQ_POLICY, CLKREQ_POLICY_MEM_UP_OVRD, 0); 21 21 } 22 22 23 - static void adlp_display_wa_apply(struct drm_i915_private *i915) 23 + static void adlp_display_wa_apply(struct intel_display *display) 24 24 { 25 25 /* Wa_22011091694:adlp */ 26 - intel_de_rmw(i915, GEN9_CLKGATE_DIS_5, 0, DPCE_GATING_DIS); 26 + intel_de_rmw(display, GEN9_CLKGATE_DIS_5, 0, DPCE_GATING_DIS); 27 27 28 28 /* Bspec/49189 Initialize Sequence */ 29 - intel_de_rmw(i915, GEN8_CHICKEN_DCPR_1, DDI_CLOCK_REG_ACCESS, 0); 29 + intel_de_rmw(display, GEN8_CHICKEN_DCPR_1, DDI_CLOCK_REG_ACCESS, 0); 30 30 } 31 31 32 - void intel_display_wa_apply(struct drm_i915_private *i915) 32 + void intel_display_wa_apply(struct intel_display *display) 33 33 { 34 - if (IS_ALDERLAKE_P(i915)) 35 - adlp_display_wa_apply(i915); 36 - else if (DISPLAY_VER(i915) == 12) 37 - xe_d_display_wa_apply(i915); 38 - else if (DISPLAY_VER(i915) == 11) 39 - gen11_display_wa_apply(i915); 34 + if (display->platform.alderlake_p) 35 + adlp_display_wa_apply(display); 36 + else if (DISPLAY_VER(display) == 12) 37 + xe_d_display_wa_apply(display); 38 + else if (DISPLAY_VER(display) == 11) 39 + gen11_display_wa_apply(display); 40 40 }
+7 -4
drivers/gpu/drm/i915/display/intel_display_wa.h
··· 8 8 9 9 #include <linux/types.h> 10 10 11 - struct drm_i915_private; 11 + struct intel_display; 12 12 13 - void intel_display_wa_apply(struct drm_i915_private *i915); 13 + void intel_display_wa_apply(struct intel_display *display); 14 14 15 15 #ifdef I915 16 - static inline bool intel_display_needs_wa_16023588340(struct drm_i915_private *i915) { return false; } 16 + static inline bool intel_display_needs_wa_16023588340(struct intel_display *display) 17 + { 18 + return false; 19 + } 17 20 #else 18 - bool intel_display_needs_wa_16023588340(struct drm_i915_private *i915); 21 + bool intel_display_needs_wa_16023588340(struct intel_display *display); 19 22 #endif 20 23 21 24 #endif
+1 -1
drivers/gpu/drm/i915/display/intel_fbc.c
··· 1437 1437 return 0; 1438 1438 } 1439 1439 1440 - if (intel_display_needs_wa_16023588340(i915)) { 1440 + if (intel_display_needs_wa_16023588340(display)) { 1441 1441 plane_state->no_fbc_reason = "Wa_16023588340"; 1442 1442 return 0; 1443 1443 }
+4 -2
drivers/gpu/drm/xe/display/xe_display_wa.c
··· 10 10 11 11 #include <generated/xe_wa_oob.h> 12 12 13 - bool intel_display_needs_wa_16023588340(struct drm_i915_private *i915) 13 + bool intel_display_needs_wa_16023588340(struct intel_display *display) 14 14 { 15 - return XE_WA(xe_root_mmio_gt(i915), 16023588340); 15 + struct xe_device *xe = to_xe_device(display->drm); 16 + 17 + return XE_WA(xe_root_mmio_gt(xe), 16023588340); 16 18 }