drm/amdgpu/mes: zero the sdma_hqd_mask of 2nd SDMA engine for SDMA 6.0.1
Subsystems (2)
PATCH v2 1/1 drm/amdgpu/mes: zero the sdma_hqd_mask of 2nd SDMA engine for SDMA 6.0.1
there is only one SDMA engine in SDMA 6.0.1, the sdma_hqd_mask has to be zeroed for the 2nd engine, otherwise MES scheduler will consider 2nd engine exists and map/unmap SDMA queues to the non-existent engine.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +3 -0
@@ -181,6 +181,9 @@ int amdgpu_mes_init(struct amdgpu_device *adev)for (i =0 ; i <AMDGPU_MES_MAX_SDMA_PIPES ; i++) {if (adev->ip_versions[SDMA0_HWIP ][0 ] <IP_VERSION (6 ,0 ,0 )) adev->mes.sdma_hqd_mask[i] = i ?0 :0x3fc ; +/* zero sdma_hqd_mask for non-existent engine */ +else if (adev->sdma.num_instances ==1 ) + adev->mes.sdma_hqd_mask[i] = i ?0 :0xfc ;else adev->mes.sdma_hqd_mask[i] =0xfc ; }
Signature · 1 line
2.37.1
[AMD Official Use Only - General]
Best Regards,
Tim Huang
-----Original Message-----
From: Zhang, Yifan <[email protected]>
Sent: Wednesday, August 31, 2022 8:56 AM
To: [email protected]
Cc: Huang, Tim <[email protected]>; Deucher, Alexander <[email protected]>; Du, Xiaojian <[email protected]>; Xiao, Jack <[email protected]>; Zhang, Yifan <[email protected]>
Subject: [PATCH v2] drm/amdgpu/mes: zero the sdma_hqd_mask of 2nd SDMA engine for SDMA 6.0.1
there is only one SDMA engine in SDMA 6.0.1, the sdma_hqd_mask has to be zeroed for the 2nd engine, otherwise MES scheduler will consider 2nd engine exists and map/unmap SDMA queues to the non-existent engine.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c +3 -0
@@ -181,6 +181,9 @@ int amdgpu_mes_init(struct amdgpu_device *adev)for (i =0 ; i <AMDGPU_MES_MAX_SDMA_PIPES ; i++) {if (adev->ip_versions[SDMA0_HWIP ][0 ] <IP_VERSION (6 ,0 ,0 )) adev->mes.sdma_hqd_mask[i] = i ?0 :0x3fc ; +/* zero sdma_hqd_mask for non-existent engine */ +else if (adev->sdma.num_instances ==1 ) + adev->mes.sdma_hqd_mask[i] = i ?0 :0xfc ;else adev->mes.sdma_hqd_mask[i] =0xfc ; }
--
2.37.1