mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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>
This commit is contained in:
parent
9b24f63d82
commit
87046288e8
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user