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

drm/amdgpu: make gfxhub_v1_0 callback functions to be static

Those functions should be invoked through gfxhub.funcs
pointer.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Hawking Zhang and committed by
Alex Deucher
0d4d9512 3939c49c

+10 -17
+9 -8
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
··· 31 31 32 32 #include "soc15_common.h" 33 33 34 - u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev) 34 + static u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev) 35 35 { 36 36 return (u64)RREG32_SOC15(GC, 0, mmMC_VM_FB_OFFSET) << 24; 37 37 } 38 38 39 - void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid, 40 - uint64_t page_table_base) 39 + static void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, 40 + uint32_t vmid, 41 + uint64_t page_table_base) 41 42 { 42 43 struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0]; 43 44 ··· 276 275 } 277 276 } 278 277 279 - int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev) 278 + static int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev) 280 279 { 281 280 if (amdgpu_sriov_vf(adev) && adev->asic_type != CHIP_ARCTURUS) { 282 281 /* ··· 306 305 return 0; 307 306 } 308 307 309 - void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev) 308 + static void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev) 310 309 { 311 310 struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0]; 312 311 u32 tmp; ··· 337 336 * @adev: amdgpu_device pointer 338 337 * @value: true redirects VM faults to the default page 339 338 */ 340 - void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, 341 - bool value) 339 + static void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, 340 + bool value) 342 341 { 343 342 u32 tmp; 344 343 tmp = RREG32_SOC15(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL); ··· 375 374 WREG32_SOC15(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL, tmp); 376 375 } 377 376 378 - void gfxhub_v1_0_init(struct amdgpu_device *adev) 377 + static void gfxhub_v1_0_init(struct amdgpu_device *adev) 379 378 { 380 379 struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0]; 381 380
+1 -9
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.h
··· 24 24 #ifndef __GFXHUB_V1_0_H__ 25 25 #define __GFXHUB_V1_0_H__ 26 26 27 - int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev); 28 - void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev); 29 - void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, 30 - bool value); 31 - void gfxhub_v1_0_init(struct amdgpu_device *adev); 32 - u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev); 33 - void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid, 34 - uint64_t page_table_base); 35 - 36 27 extern const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs; 28 + 37 29 #endif