]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amdgpu: remove gfxhub_v1_1_funcs set
authorKevin Wang <kevin1.wang@amd.com>
Wed, 14 Oct 2020 12:09:57 +0000 (20:09 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 16 Oct 2020 18:44:32 +0000 (14:44 -0400)
remove duplicate gfxhub v1.1 function set.
put function of gfxhub_v1_1_get_xgmi_info to gfxhub v1_0 function set.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.h
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index fad887a668866a813f28114b6753573cf64b453c..d83577b77a66733f3bf5d7d971b3d3114bd18399 100644 (file)
@@ -22,6 +22,7 @@
  */
 #include "amdgpu.h"
 #include "gfxhub_v1_0.h"
+#include "gfxhub_v1_1.h"
 
 #include "gc/gc_9_0_offset.h"
 #include "gc/gc_9_0_sh_mask.h"
@@ -412,4 +413,5 @@ const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs = {
        .gart_disable = gfxhub_v1_0_gart_disable,
        .set_fault_enable_default = gfxhub_v1_0_set_fault_enable_default,
        .init = gfxhub_v1_0_init,
+       .get_xgmi_info = gfxhub_v1_1_get_xgmi_info,
 };
index 1e24b6d51e41e0fa6853870fb4460566a0d824cf..c0ab71df0d90475ead34768ea4b2db0e9a64c7ed 100644 (file)
@@ -21,7 +21,6 @@
  *
  */
 #include "amdgpu.h"
-#include "gfxhub_v1_0.h"
 #include "gfxhub_v1_1.h"
 
 #include "gc/gc_9_2_1_offset.h"
@@ -29,7 +28,7 @@
 
 #include "soc15_common.h"
 
-static int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev)
+int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev)
 {
        u32 xgmi_lfb_cntl = RREG32_SOC15(GC, 0, mmMC_VM_XGMI_LFB_CNTL);
        u32 max_region =
@@ -67,13 +66,3 @@ static int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev)
 
        return 0;
 }
-
-const struct amdgpu_gfxhub_funcs gfxhub_v1_1_funcs = {
-       .get_mc_fb_offset = gfxhub_v1_0_get_mc_fb_offset,
-       .setup_vm_pt_regs = gfxhub_v1_0_setup_vm_pt_regs,
-       .gart_enable = gfxhub_v1_0_gart_enable,
-       .gart_disable = gfxhub_v1_0_gart_disable,
-       .set_fault_enable_default = gfxhub_v1_0_set_fault_enable_default,
-       .init = gfxhub_v1_0_init,
-       .get_xgmi_info = gfxhub_v1_1_get_xgmi_info,
-};
index ae5759ffbee37a1844b64e0862af98f277c2e51c..d753cf28a0a6e2c9dfdf42b7c182ba4e8dafc78a 100644 (file)
@@ -24,6 +24,6 @@
 #ifndef __GFXHUB_V1_1_H__
 #define __GFXHUB_V1_1_H__
 
-extern const struct amdgpu_gfxhub_funcs gfxhub_v1_1_funcs;
+int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev);
 
 #endif
index 3ebbddb63705cfa457dd03327d48b8892a6bb007..a9929d1b6b3d0f792d46439911ee3c481d65c325 100644 (file)
@@ -1166,15 +1166,7 @@ static void gmc_v9_0_set_mmhub_funcs(struct amdgpu_device *adev)
 
 static void gmc_v9_0_set_gfxhub_funcs(struct amdgpu_device *adev)
 {
-       switch (adev->asic_type) {
-       case CHIP_ARCTURUS:
-       case CHIP_VEGA20:
-               adev->gfxhub.funcs = &gfxhub_v1_1_funcs;
-               break;
-       default:
-               adev->gfxhub.funcs = &gfxhub_v1_0_funcs;
-               break;
-       }
+       adev->gfxhub.funcs = &gfxhub_v1_0_funcs;
 }
 
 static int gmc_v9_0_early_init(void *handle)