Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Likun Gao and committed by
Alex Deucher
87046288 9b24f63d

+10 -2
+10 -2
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
··· 781 781 782 782 int soc_v1_0_init_soc_config(struct amdgpu_device *adev) 783 783 { 784 - int ret; 784 + int ret, i; 785 + int xcc_inst_per_aid = 4; 786 + uint16_t xcc_mask; 785 787 786 - /*TODO: init soc config */ 788 + xcc_mask = adev->gfx.xcc_mask; 789 + adev->aid_mask = 0; 790 + for (i = 0; xcc_mask; xcc_mask >>= xcc_inst_per_aid, i++) { 791 + if (xcc_mask & ((1U << xcc_inst_per_aid) - 1)) 792 + adev->aid_mask |= (1 << i); 793 + } 794 + 787 795 adev->sdma.num_inst_per_xcc = 2; 788 796 adev->sdma.num_instances = 789 797 NUM_XCC(adev->gfx.xcc_mask) * adev->sdma.num_inst_per_xcc;