summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorFlora Cui2017-06-20 05:08:35 +0200
committerAlex Deucher2017-06-29 18:43:49 +0200
commitdbfe85ea496728ccf7731601084853f760be77d7 (patch)
tree7029e2119b04924de3deb34f90dbb8e75f0ebfd8 /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parentdrm/amdgpu/gfx9: gfx_v9_0_enable_gfx_static_mg_power_gating() can be static (diff)
downloadkernel-qcow2-linux-dbfe85ea496728ccf7731601084853f760be77d7.tar.gz
kernel-qcow2-linux-dbfe85ea496728ccf7731601084853f760be77d7.tar.xz
kernel-qcow2-linux-dbfe85ea496728ccf7731601084853f760be77d7.zip
drm/amdgpu: Fix the exported always on CU bitmap
Newer asics with 4 SEs are not able to fit the entire bitmask in the original field, use an array instead. v2: keep cu_ao_mask for backward compatibility. Signed-off-by: Flora Cui <Flora.Cui@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-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_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 9a268272d38e..a1ef7f6307b9 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -7087,7 +7087,9 @@ static void gfx_v8_0_get_cu_info(struct amdgpu_device *adev)
mask <<= 1;
}
active_cu_number += counter;
- ao_cu_mask |= (ao_bitmap << (i * 16 + j * 8));
+ if (i < 2 && j < 2)
+ ao_cu_mask |= (ao_bitmap << (i * 16 + j * 8));
+ cu_info->ao_cu_bitmap[i][j] = ao_bitmap;
}
}
gfx_v8_0_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff);