summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/umc_v8_10.h
diff options
context:
space:
mode:
authorCandice Li <candice.li@amd.com>2023-06-10 10:15:14 +0800
committerAlex Deucher <alexander.deucher@amd.com>2023-06-15 11:06:59 -0400
commitbcd9a5f8b9e2a705bc30e9b27ebf7b8a8625325f (patch)
tree8e2cb232651bf3bdc99d4d178bf852aca51c090c /drivers/gpu/drm/amd/amdgpu/umc_v8_10.h
parent4506f0bc15f42d22fc50f75a098ff9133ffdbe6f (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/umc_v8_10.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/umc_v8_10.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v8_10.h b/drivers/gpu/drm/amd/amdgpu/umc_v8_10.h
index c6dfd433fec7..dc12e0af5451 100644
--- a/drivers/gpu/drm/amd/amdgpu/umc_v8_10.h
+++ b/drivers/gpu/drm/amd/amdgpu/umc_v8_10.h
@@ -33,7 +33,8 @@
/* Total channel instances for all available umc nodes */
#define UMC_V8_10_TOTAL_CHANNEL_NUM(adev) \
- (UMC_V8_10_CHANNEL_INSTANCE_NUM * UMC_V8_10_UMC_INSTANCE_NUM * (adev)->gmc.num_umc)
+ (UMC_V8_10_CHANNEL_INSTANCE_NUM * UMC_V8_10_UMC_INSTANCE_NUM * \
+ (adev)->gmc.num_umc - hweight32((adev)->gmc.m_half_use) * 2)
/* UMC regiser per channel offset */
#define UMC_V8_10_PER_CHANNEL_OFFSET 0x400