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

drm/i915: rename intel_pm.[ch] to intel_clock_gating.[ch]

Observe that intel_pm.[ch] is now purely about clock gating, so rename
them to intel_clock_gating.[ch]. Rename the functions to
intel_clock_gating_*() to follow coding conventions.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230403122428.3526263-1-jani.nikula@intel.com

+31 -35
+1 -1
drivers/gpu/drm/i915/Makefile
··· 47 47 i915_switcheroo.o \ 48 48 i915_sysfs.o \ 49 49 i915_utils.o \ 50 + intel_clock_gating.o \ 50 51 intel_device_info.o \ 51 52 intel_memory_region.o \ 52 53 intel_pcode.o \ 53 - intel_pm.o \ 54 54 intel_region_ttm.o \ 55 55 intel_runtime_pm.o \ 56 56 intel_sbi.o \
+2 -2
drivers/gpu/drm/i915/display/intel_display.c
··· 63 63 #include "intel_audio.h" 64 64 #include "intel_bw.h" 65 65 #include "intel_cdclk.h" 66 + #include "intel_clock_gating.h" 66 67 #include "intel_color.h" 67 68 #include "intel_crt.h" 68 69 #include "intel_crtc.h" ··· 106 105 #include "intel_pcode.h" 107 106 #include "intel_pipe_crc.h" 108 107 #include "intel_plane_initial.h" 109 - #include "intel_pm.h" 110 108 #include "intel_pps.h" 111 109 #include "intel_psr.h" 112 110 #include "intel_quirks.h" ··· 850 850 */ 851 851 intel_pps_unlock_regs_wa(i915); 852 852 intel_modeset_init_hw(i915); 853 - intel_init_clock_gating(i915); 853 + intel_clock_gating_init(i915); 854 854 intel_hpd_init(i915); 855 855 856 856 ret = __intel_display_resume(i915, state, ctx);
+4 -4
drivers/gpu/drm/i915/i915_driver.c
··· 79 79 #include "soc/intel_dram.h" 80 80 #include "soc/intel_gmch.h" 81 81 82 - #include "i915_file_private.h" 83 82 #include "i915_debugfs.h" 84 83 #include "i915_driver.h" 85 84 #include "i915_drm_client.h" 86 85 #include "i915_drv.h" 86 + #include "i915_file_private.h" 87 87 #include "i915_getparam.h" 88 88 #include "i915_hwmon.h" 89 89 #include "i915_ioc32.h" ··· 97 97 #include "i915_sysfs.h" 98 98 #include "i915_utils.h" 99 99 #include "i915_vgpu.h" 100 + #include "intel_clock_gating.h" 100 101 #include "intel_gvt.h" 101 102 #include "intel_memory_region.h" 102 103 #include "intel_pci_config.h" 103 104 #include "intel_pcode.h" 104 - #include "intel_pm.h" 105 105 #include "intel_region_ttm.h" 106 106 #include "vlv_suspend.h" 107 107 ··· 252 252 253 253 intel_irq_init(dev_priv); 254 254 intel_init_display_hooks(dev_priv); 255 - intel_init_clock_gating_hooks(dev_priv); 255 + intel_clock_gating_hooks_init(dev_priv); 256 256 257 257 intel_detect_preproduction_hw(dev_priv); 258 258 ··· 1242 1242 i915_gem_resume(dev_priv); 1243 1243 1244 1244 intel_modeset_init_hw(dev_priv); 1245 - intel_init_clock_gating(dev_priv); 1245 + intel_clock_gating_init(dev_priv); 1246 1246 intel_hpd_init(dev_priv); 1247 1247 1248 1248 /* MST sideband requires HPD interrupts enabled */
+4 -4
drivers/gpu/drm/i915/i915_gem.c
··· 58 58 #include "i915_file_private.h" 59 59 #include "i915_trace.h" 60 60 #include "i915_vgpu.h" 61 - #include "intel_pm.h" 61 + #include "intel_clock_gating.h" 62 62 63 63 static int 64 64 insert_mappable_node(struct i915_ggtt *ggtt, struct drm_mm_node *node, u32 size) ··· 1164 1164 } 1165 1165 1166 1166 /* 1167 - * Despite its name intel_init_clock_gating applies both display 1167 + * Despite its name intel_clock_gating_init applies both display 1168 1168 * clock gating workarounds; GT mmio workarounds and the occasional 1169 1169 * GT power context workaround. Worse, sometimes it includes a context 1170 1170 * register workaround which we need to apply before we record the ··· 1172 1172 * 1173 1173 * FIXME: break up the workarounds and apply them at the right time! 1174 1174 */ 1175 - intel_init_clock_gating(dev_priv); 1175 + intel_clock_gating_init(dev_priv); 1176 1176 1177 1177 for_each_gt(gt, dev_priv, i) { 1178 1178 ret = intel_gt_init(gt); ··· 1216 1216 /* Minimal basic recovery for KMS */ 1217 1217 ret = i915_ggtt_enable_hw(dev_priv); 1218 1218 i915_ggtt_resume(to_gt(dev_priv)->ggtt); 1219 - intel_init_clock_gating(dev_priv); 1219 + intel_clock_gating_init(dev_priv); 1220 1220 } 1221 1221 1222 1222 i915_gem_drain_freed_objects(dev_priv);
+14
drivers/gpu/drm/i915/intel_clock_gating.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + /* 3 + * Copyright © 2019 Intel Corporation 4 + */ 5 + 6 + #ifndef __INTEL_CLOCK_GATING_H__ 7 + #define __INTEL_CLOCK_GATING_H__ 8 + 9 + struct drm_i915_private; 10 + 11 + void intel_clock_gating_init(struct drm_i915_private *i915); 12 + void intel_clock_gating_hooks_init(struct drm_i915_private *i915); 13 + 14 + #endif /* __INTEL_CLOCK_GATING_H__ */
+4 -4
drivers/gpu/drm/i915/intel_pm.c drivers/gpu/drm/i915/intel_clock_gating.c
··· 36 36 #include "gt/intel_gt_regs.h" 37 37 38 38 #include "i915_drv.h" 39 + #include "intel_clock_gating.h" 39 40 #include "intel_mchbar_regs.h" 40 - #include "intel_pm.h" 41 41 #include "vlv_sideband.h" 42 42 43 43 struct drm_i915_clock_gating_funcs { ··· 774 774 _MASKED_BIT_ENABLE(MEM_DISPLAY_B_TRICKLE_FEED_DISABLE)); 775 775 } 776 776 777 - void intel_init_clock_gating(struct drm_i915_private *dev_priv) 777 + void intel_clock_gating_init(struct drm_i915_private *dev_priv) 778 778 { 779 779 dev_priv->clock_gating_funcs->init_clock_gating(dev_priv); 780 780 } ··· 818 818 #undef CG_FUNCS 819 819 820 820 /** 821 - * intel_init_clock_gating_hooks - setup the clock gating hooks 821 + * intel_clock_gating_hooks_init - setup the clock gating hooks 822 822 * @dev_priv: device private 823 823 * 824 824 * Setup the hooks that configure which clocks of a given platform can be ··· 826 826 * platforms. Note that some GT specific workarounds are applied separately 827 827 * when GPU contexts or batchbuffers start their execution. 828 828 */ 829 - void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv) 829 + void intel_clock_gating_hooks_init(struct drm_i915_private *dev_priv) 830 830 { 831 831 if (IS_METEORLAKE(dev_priv)) 832 832 dev_priv->clock_gating_funcs = &nop_clock_gating_funcs;
-18
drivers/gpu/drm/i915/intel_pm.h
··· 1 - /* SPDX-License-Identifier: MIT */ 2 - /* 3 - * Copyright © 2019 Intel Corporation 4 - */ 5 - 6 - #ifndef __INTEL_PM_H__ 7 - #define __INTEL_PM_H__ 8 - 9 - #include <linux/types.h> 10 - 11 - struct drm_i915_private; 12 - struct intel_crtc_state; 13 - struct intel_plane_state; 14 - 15 - void intel_init_clock_gating(struct drm_i915_private *dev_priv); 16 - void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv); 17 - 18 - #endif /* __INTEL_PM_H__ */
+2 -2
drivers/gpu/drm/i915/vlv_suspend.c
··· 12 12 #include "i915_reg.h" 13 13 #include "i915_trace.h" 14 14 #include "i915_utils.h" 15 - #include "intel_pm.h" 15 + #include "intel_clock_gating.h" 16 16 #include "vlv_suspend.h" 17 17 18 18 #include "gt/intel_gt_regs.h" ··· 451 451 vlv_check_no_gt_access(dev_priv); 452 452 453 453 if (rpm_resume) 454 - intel_init_clock_gating(dev_priv); 454 + intel_clock_gating_init(dev_priv); 455 455 456 456 return ret; 457 457 }