From: Likun Gao <[email protected]>

Update SDMA instances/masks according to xcc num for
multi-xcc models on soc v1.0.

Signed-off-by: Likun Gao <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/soc_v1_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c 
b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
index 66972b8aee505..7e96c6583aa97 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
@@ -771,6 +771,10 @@ int soc_v1_0_init_soc_config(struct amdgpu_device *adev)
 
        /*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;
+       adev->sdma.sdma_mask =
+               GENMASK(adev->sdma.num_instances - 1, 0);
 
        ret = soc_v1_0_xcp_mgr_init(adev);
        if (ret)
-- 
2.51.1

Reply via email to