diff options
| author | Likun Gao <Likun.Gao@amd.com> | 2025-11-11 14:34:20 +0800 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2026-01-05 16:59:57 -0500 |
| commit | 87046288e8d540a0e893fec7c452ba0e91abf362 (patch) | |
| tree | 1378d641397e57c002e07f9aff7a370911330bac /drivers/gpu | |
| parent | 9b24f63d825e771dafa137e6370c6bf44395e748 (diff) | |
drm/amdgpu: set aid_mask for soc v1
Set aid_mask via xcc_mask.
v2: squash in follow up change
Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c index 628abd25ac09..e9c7be1ed602 100644 --- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c @@ -781,9 +781,17 @@ static int soc_v1_0_xcp_mgr_init(struct amdgpu_device *adev) int soc_v1_0_init_soc_config(struct amdgpu_device *adev) { - int ret; + int ret, i; + int xcc_inst_per_aid = 4; + uint16_t xcc_mask; + + xcc_mask = adev->gfx.xcc_mask; + adev->aid_mask = 0; + for (i = 0; xcc_mask; xcc_mask >>= xcc_inst_per_aid, i++) { + if (xcc_mask & ((1U << xcc_inst_per_aid) - 1)) + adev->aid_mask |= (1 << i); + } - /*TODO: init soc config */ adev->sdma.num_inst_per_xcc = 2; adev->sdma.num_instances = NUM_XCC(adev->gfx.xcc_mask) * adev->sdma.num_inst_per_xcc; |
