aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2018-06-19 17:03:27 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-09-10 22:46:22 -0500
commitbf0a60b78b61a7b31bb22e60cc7b2e7fc538d38f (patch)
tree0aa2541fc01311b25ee16e7d9b208bb7e0c581c0 /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
parentdrm/amdgpu/gmc: add initial xgmi structure to amdgpu_gmc structure (diff)
downloadlinux-dev-bf0a60b78b61a7b31bb22e60cc7b2e7fc538d38f.tar.xz
linux-dev-bf0a60b78b61a7b31bb22e60cc7b2e7fc538d38f.zip
drm/amdgpu/gmc9: add a new gfxhub 1.1 helper for xgmi
Used to populate the xgmi info on vega20. v2: PF_MAX_REGION is val - 1 (Ray) Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Slava Abramov <slava.abramov@amd.com> Reviewed-by :Shaoyun liu <Shaoyun.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by :Shaoyun liu <Shaoyun.liu@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 3529c55ab52d..e9b5a1300657 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -43,6 +43,7 @@
#include "gfxhub_v1_0.h"
#include "mmhub_v1_0.h"
+#include "gfxhub_v1_1.h"
#include "ivsrcid/vmc/irqsrcs_vmc_1_0.h"
@@ -985,6 +986,12 @@ static int gmc_v9_0_sw_init(void *handle)
}
adev->need_swiotlb = drm_get_max_iomem() > ((u64)1 << dma_bits);
+ if (adev->asic_type == CHIP_VEGA20) {
+ r = gfxhub_v1_1_get_xgmi_info(adev);
+ if (r)
+ return r;
+ }
+
r = gmc_v9_0_mc_init(adev);
if (r)
return r;