Skip to content

Commit bcd9a5f

Browse files
candicelicyalexdeucher
authored andcommitted
drm/amdgpu: Update total channel number for umc v8_10
Update total channel number for umc v8_10. Signed-off-by: Candice Li <candice.li@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 4506f0b commit bcd9a5f

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,7 @@ static int amdgpu_discovery_get_mall_info(struct amdgpu_device *adev)
15151515
mall_size += mall_size_per_umc;
15161516
}
15171517
adev->gmc.mall_size = mall_size;
1518+
adev->gmc.m_half_use = half_use;
15181519
break;
15191520
default:
15201521
dev_err(adev->dev,

drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,8 @@ struct amdgpu_gmc {
301301

302302
/* MALL size */
303303
u64 mall_size;
304+
uint32_t m_half_use;
305+
304306
/* number of UMC instances */
305307
int num_umc;
306308
/* mode2 save restore */

drivers/gpu/drm/amd/amdgpu/umc_v8_10.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333

3434
/* Total channel instances for all available umc nodes */
3535
#define UMC_V8_10_TOTAL_CHANNEL_NUM(adev) \
36-
(UMC_V8_10_CHANNEL_INSTANCE_NUM * UMC_V8_10_UMC_INSTANCE_NUM * (adev)->gmc.num_umc)
36+
(UMC_V8_10_CHANNEL_INSTANCE_NUM * UMC_V8_10_UMC_INSTANCE_NUM * \
37+
(adev)->gmc.num_umc - hweight32((adev)->gmc.m_half_use) * 2)
3738

3839
/* UMC regiser per channel offset */
3940
#define UMC_V8_10_PER_CHANNEL_OFFSET 0x400

0 commit comments

Comments
 (0)