drm/amdgpu: init vmhubs bitmask for GC 9.4.3
authorLe Ma <le.ma@amd.com>
Mon, 20 Dec 2021 08:42:20 +0000 (16:42 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:40:20 +0000 (09:40 -0400)
Each XCD owns one GFXHUB.

v2: switch to the new VMHUB layout

Signed-off-by: Le Ma <le.ma@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index d4bfb5f..6da8536 100644 (file)
@@ -1701,7 +1701,6 @@ static int gmc_v9_0_sw_init(void *handle)
        case IP_VERSION(9, 4, 0):
        case IP_VERSION(9, 3, 0):
        case IP_VERSION(9, 4, 2):
-       case IP_VERSION(9, 4, 3):
                set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask);
                set_bit(AMDGPU_MMHUB0(0), adev->vmhubs_mask);
 
@@ -1727,6 +1726,12 @@ static int gmc_v9_0_sw_init(void *handle)
                amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
                adev->gmc.translate_further = adev->vm_manager.num_level > 1;
                break;
+       case IP_VERSION(9, 4, 3):
+               bitmap_set(adev->vmhubs_mask, AMDGPU_GFXHUB(0), adev->gfx.num_xcd);
+               bitmap_set(adev->vmhubs_mask, AMDGPU_MMHUB0(0), 1);
+
+               amdgpu_vm_adjust_size(adev, 256 * 1024, 9, 3, 48);
+               break;
        default:
                break;
        }