drm/amdgpu: set adev->num_vmhubs for gmc6,7,8
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Aug 2019 14:42:33 +0000 (09:42 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Aug 2019 16:35:25 +0000 (11:35 -0500)
So that we properly handle them on older asics.

Fixes: 3ff985485b29 ("drm/amdgpu: Export function to flush TLB of specific vm hub")
Tested-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c

index f0f6c6da9f305fb9d68eecce82034bf4bcee7bee..9fb1765e92d15a8e5183df22b5dd591cf717d7cd 100644 (file)
@@ -841,6 +841,8 @@ static int gmc_v6_0_sw_init(void *handle)
        int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       adev->num_vmhubs = 1;
+
        if (adev->flags & AMD_IS_APU) {
                adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
        } else {
index d935a2f29e5f1cc1c506b0b9b9fd72b3c8e8b55d..0c3d9bc3a64165e2f672077c06c81e9235ee54b3 100644 (file)
@@ -961,6 +961,8 @@ static int gmc_v7_0_sw_init(void *handle)
        int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       adev->num_vmhubs = 1;
+
        if (adev->flags & AMD_IS_APU) {
                adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
        } else {
index 2c60e45e3fa001ae0765b69afeb919bff2760adc..ea764dd9245dba23a28bca0d6dd39c49838f43b7 100644 (file)
@@ -1081,6 +1081,8 @@ static int gmc_v8_0_sw_init(void *handle)
        int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+       adev->num_vmhubs = 1;
+
        if (adev->flags & AMD_IS_APU) {
                adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN;
        } else {