Commit 0d4d9512 authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdgpu: make gfxhub_v1_0 callback functions to be static

Those functions should be invoked through gfxhub.funcs
pointer.
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3939c49c
...@@ -31,13 +31,14 @@ ...@@ -31,13 +31,14 @@
#include "soc15_common.h" #include "soc15_common.h"
u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev) static u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev)
{ {
return (u64)RREG32_SOC15(GC, 0, mmMC_VM_FB_OFFSET) << 24; return (u64)RREG32_SOC15(GC, 0, mmMC_VM_FB_OFFSET) << 24;
} }
void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid, static void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev,
uint64_t page_table_base) uint32_t vmid,
uint64_t page_table_base)
{ {
struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0]; struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
...@@ -275,7 +276,7 @@ static void gfxhub_v1_0_program_invalidation(struct amdgpu_device *adev) ...@@ -275,7 +276,7 @@ static void gfxhub_v1_0_program_invalidation(struct amdgpu_device *adev)
} }
} }
int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev) static int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev)
{ {
if (amdgpu_sriov_vf(adev) && adev->asic_type != CHIP_ARCTURUS) { if (amdgpu_sriov_vf(adev) && adev->asic_type != CHIP_ARCTURUS) {
/* /*
...@@ -305,7 +306,7 @@ int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev) ...@@ -305,7 +306,7 @@ int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev)
return 0; return 0;
} }
void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev) static void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev)
{ {
struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0]; struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
u32 tmp; u32 tmp;
...@@ -336,8 +337,8 @@ void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev) ...@@ -336,8 +337,8 @@ void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev)
* @adev: amdgpu_device pointer * @adev: amdgpu_device pointer
* @value: true redirects VM faults to the default page * @value: true redirects VM faults to the default page
*/ */
void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, static void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
bool value) bool value)
{ {
u32 tmp; u32 tmp;
tmp = RREG32_SOC15(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL); tmp = RREG32_SOC15(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL);
...@@ -374,7 +375,7 @@ void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev, ...@@ -374,7 +375,7 @@ void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
WREG32_SOC15(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL, tmp); WREG32_SOC15(GC, 0, mmVM_L2_PROTECTION_FAULT_CNTL, tmp);
} }
void gfxhub_v1_0_init(struct amdgpu_device *adev) static void gfxhub_v1_0_init(struct amdgpu_device *adev)
{ {
struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0]; struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_GFXHUB_0];
......
...@@ -24,14 +24,6 @@ ...@@ -24,14 +24,6 @@
#ifndef __GFXHUB_V1_0_H__ #ifndef __GFXHUB_V1_0_H__
#define __GFXHUB_V1_0_H__ #define __GFXHUB_V1_0_H__
int gfxhub_v1_0_gart_enable(struct amdgpu_device *adev);
void gfxhub_v1_0_gart_disable(struct amdgpu_device *adev);
void gfxhub_v1_0_set_fault_enable_default(struct amdgpu_device *adev,
bool value);
void gfxhub_v1_0_init(struct amdgpu_device *adev);
u64 gfxhub_v1_0_get_mc_fb_offset(struct amdgpu_device *adev);
void gfxhub_v1_0_setup_vm_pt_regs(struct amdgpu_device *adev, uint32_t vmid,
uint64_t page_table_base);
extern const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs; extern const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs;
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment