summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
diff options
context:
space:
mode:
authorRex Zhu2017-04-26 10:32:22 +0200
committerAlex Deucher2017-05-24 23:40:05 +0200
commitfe723cd3bf277c37c555959ee75bd1429818284b (patch)
tree769d5b0e8b1dba1fa7215c73ad088981ee0fc734 /drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
parentdrm/amdgpu: fix s3 ring test failed on Vi caused by KIQ enabled. (diff)
downloadkernel-qcow2-linux-fe723cd3bf277c37c555959ee75bd1429818284b.tar.gz
kernel-qcow2-linux-fe723cd3bf277c37c555959ee75bd1429818284b.tar.xz
kernel-qcow2-linux-fe723cd3bf277c37c555959ee75bd1429818284b.zip
drm/amdgpu:fix get wrong gfx always on cu masks.
Bug: SWDEV-117987: Always on CU mask broken for gfx7+ Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 3f5ba3fd08b7..978841792001 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3666,9 +3666,9 @@ static int gfx_v9_0_get_cu_info(struct amdgpu_device *adev,
bitmap = gfx_v9_0_get_cu_active_bitmap(adev);
cu_info->bitmap[i][j] = bitmap;
- for (k = 0; k < 16; k ++) {
+ for (k = 0; k < adev->gfx.config.max_cu_per_sh; k ++) {
if (bitmap & mask) {
- if (counter < 2)
+ if (counter < adev->gfx.config.max_cu_per_sh)
ao_bitmap |= mask;
counter ++;
}