diff options
author | Le Ma <le.ma@amd.com> | 2021-12-20 11:06:25 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-06-09 16:40:17 +0300 |
commit | d9426c3d9b4e91dda4f1f1684f9296762fafe0de (patch) | |
tree | e55349122eace373492d8e2af9b94d6172e24bfc /drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | |
parent | b35ce49ab9ca2bc6a59d4441efc5039de80643ce (diff) | |
download | linux-d9426c3d9b4e91dda4f1f1684f9296762fafe0de.tar.xz |
drm/amdgpu: add bitmask to iterate vmhubs
As the layout of VMHUB definition has been changed to cover multiple
XCD/AID case, the original num_vmhubs is not appropriate to do vmhub
iteration any more.
Drop num_vmhubs and introduce vmhubs_mask instead.
v2: switch to the new VMHUB layout
v3: use DECLARE_BITMAP to define vmhubs_mask
Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c index 402960b0174e..81609a2b226f 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c @@ -977,7 +977,7 @@ static int gmc_v7_0_sw_init(void *handle) int r; struct amdgpu_device *adev = (struct amdgpu_device *)handle; - adev->num_vmhubs = 1; + set_bit(AMDGPU_GFXHUB(0), adev->vmhubs_mask); if (adev->flags & AMD_IS_APU) { adev->gmc.vram_type = AMDGPU_VRAM_TYPE_UNKNOWN; |