drm/amdgpu/sdma_v5_2: update fw version check for per-queue reset on various ASICs
Subsystems (2)
PATCH 1/3 drm/amdgpu/sdma_v5_2: update fw version check for per-queue reset on various ASICs
Adjust SDMA 5.2 per-queue reset firmware version thresholds to match the correct requirements for different ASICs:
5.2.0: Require fw >=34
5.2.2: Require fw >=41
5.2.3: Require fw >=9
5.2.4: Require fw >=33 (from 76)
5.2.5: Require fw >=1 (from 34)
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +17 -2
@@ -1350,16 +1350,31 @@ static int sdma_v5_2_sw_init(struct amdgpu_ip_block *ip_block)amdgpu_get_soft_full_reset_mask (&adev->sdma.instance[0 ].ring);switch (amdgpu_ip_version (adev,SDMA0_HWIP ,0 )) {case IP_VERSION (5 ,2 ,0 ): +if ((adev->sdma.instance[0 ].fw_version >=34 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,2 ,2 ): +if ((adev->sdma.instance[0 ].fw_version >=41 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,2 ,3 ): +if ((adev->sdma.instance[0 ].fw_version >=9 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,2 ,4 ): -if ((adev->sdma.instance[0 ].fw_version >=76 ) && +if ((adev->sdma.instance[0 ].fw_version >=33 ) && !amdgpu_sriov_vf (adev) && !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ;break ;case IP_VERSION (5 ,2 ,5 ): -if ((adev->sdma.instance[0 ].fw_version >=34 ) && +if ((adev->sdma.instance[0 ].fw_version >=1 ) && !amdgpu_sriov_vf (adev) && !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ;
Signature · 1 line
2.49.0
PATCH 2/3 drm/amdgpu: extend per-queue reset fw check for 5.2.1/5.2.6/5.2.7
Add per-queue reset fw version checks for new SDMA 5.2.x variants:
5.2.1: >=41
5.2.6: >=8
5.2.7: >=1
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +18 -0
@@ -1355,6 +1355,12 @@ static int sdma_v5_2_sw_init(struct amdgpu_ip_block *ip_block) !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ;break ; +case IP_VERSION (5 ,2 ,1 ): +if ((adev->sdma.instance[0 ].fw_version >=41 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,2 ,2 ): if ((adev->sdma.instance[0].fw_version >= 41) && !amdgpu_sriov_vf(adev) &&
@@ -1379,6 +1385,18 @@ static int sdma_v5_2_sw_init(struct amdgpu_ip_block *ip_block) !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ;break ; +case IP_VERSION (5 ,2 ,6 ): +if ((adev->sdma.instance[0 ].fw_version >=8 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ; +case IP_VERSION (5 ,2 ,7 ): +if ((adev->sdma.instance[0 ].fw_version >=1 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;default :break ; }
Signature · 1 line
2.49.0
PATCH 3/3 drm/amdgpu/sdma_v5_0: Update per-queue reset fw version checks for 5.0.x ASICs
In reply to Jesse.ZhangTune SDMA 5.0.x per-queue reset firmware version thresholds for specific ASICs:
5.0.0: Require fw >=24
5.0.2: Adjust fw threshold to >=30
5.0.1: Add new check with fw >=38
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +19 -4
@@ -1432,17 +1432,32 @@ static int sdma_v5_0_sw_init(struct amdgpu_ip_block *ip_block)amdgpu_get_soft_full_reset_mask (&adev->sdma.instance[0 ].ring);switch (amdgpu_ip_version (adev,SDMA0_HWIP ,0 )) {case IP_VERSION (5 ,0 ,0 ): +if ((adev->sdma.instance[0 ].fw_version >=24 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ; +case IP_VERSION (5 ,0 ,1 ): +if ((adev->sdma.instance[0 ].fw_version >=38 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,0 ,2 ): +if ((adev->sdma.instance[0 ].fw_version >=30 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,0 ,5 ):if ((adev->sdma.instance[0 ].fw_version >=35 ) && - !amdgpu_sriov_vf (adev) && - !adev->debug_disable_gpu_ring_reset) + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; -break ; +break ;default :break ; } -/* Allocate memory for SDMA IP Dump buffer */ ptr =kcalloc (adev->sdma.num_instances * reg_count,sizeof (uint32_t ),GFP_KERNEL );if (ptr)
Signature · 1 line
2.49.0
Re: [PATCH 3/3] drm/amdgpu/sdma_v5_0: Update per-queue reset fw version checks for 5.0.x ASICs
Series is:
Quoted 55 lines · Jesse.Zhang
Tune SDMA 5.0.x per-queue reset firmware version thresholds for specific ASICs:
5.0.0: Require fw >=24
5.0.2: Adjust fw threshold to >=30
5.0.1: Add new check with fw >=38Signed-off-by Jesse.Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +19
-5@@ -1432,17 +1432,32 @@ static int sdma_v5_0_sw_init(struct amdgpu_ip_block *ip_block)amdgpu_get_soft_full_reset_mask (&adev->sdma.instance[0 ].ring);switch (amdgpu_ip_version (adev,SDMA0_HWIP ,0 )) {case IP_VERSION (5 ,0 ,0 ): +if ((adev->sdma.instance[0 ].fw_version >=24 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ; +case IP_VERSION (5 ,0 ,1 ): +if ((adev->sdma.instance[0 ].fw_version >=38 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,0 ,2 ): +if ((adev->sdma.instance[0 ].fw_version >=30 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,0 ,5 ):if ((adev->sdma.instance[0 ].fw_version >=35 ) && - !amdgpu_sriov_vf (adev) && - !adev->debug_disable_gpu_ring_reset) + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; -break ; +break ;default :break ; } -/* Allocate memory for SDMA IP Dump buffer */ ptr =kcalloc (adev->sdma.num_instances * reg_count,sizeof (uint32_t ),GFP_KERNEL );if (ptr) --2.49.0
Re: [PATCH 3/3] drm/amdgpu/sdma_v5_0: Update per-queue reset fw version checks for 5.0.x ASICs
Quoted 3 lines · Alex Deucher
Series is:
Acked-by Alex Deucher <[email protected]>
Since the HW team said there is no firmware requirement, I'm also fine with just dropping the switch statements and just doing something like:
+ if (!amdgpu_sriov_vf(adev) &&
+ !adev->debug_disable_gpu_ring_reset)
+ adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE;
Alex
Quoted 57 lines · Jesse.Zhang
Quoted 55 lines
Tune SDMA 5.0.x per-queue reset firmware version thresholds for specific ASICs:
5.0.0: Require fw >=24
5.0.2: Adjust fw threshold to >=30
5.0.1: Add new check with fw >=38Signed-off-by Jesse.Zhang <[email protected]>--- drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +19
-5@@ -1432,17 +1432,32 @@ static int sdma_v5_0_sw_init(struct amdgpu_ip_block *ip_block)amdgpu_get_soft_full_reset_mask (&adev->sdma.instance[0 ].ring);switch (amdgpu_ip_version (adev,SDMA0_HWIP ,0 )) {case IP_VERSION (5 ,0 ,0 ): +if ((adev->sdma.instance[0 ].fw_version >=24 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ; +case IP_VERSION (5 ,0 ,1 ): +if ((adev->sdma.instance[0 ].fw_version >=38 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,0 ,2 ): +if ((adev->sdma.instance[0 ].fw_version >=30 ) && + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) + adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; +break ;case IP_VERSION (5 ,0 ,5 ):if ((adev->sdma.instance[0 ].fw_version >=35 ) && - !amdgpu_sriov_vf (adev) && - !adev->debug_disable_gpu_ring_reset) + !amdgpu_sriov_vf (adev) && + !adev->debug_disable_gpu_ring_reset) adev->sdma.supported_reset |=AMDGPU_RESET_TYPE_PER_QUEUE ; -break ; +break ;default :break ; } -/* Allocate memory for SDMA IP Dump buffer */ ptr =kcalloc (adev->sdma.num_instances * reg_count,sizeof (uint32_t ),GFP_KERNEL );if (ptr) --2.49.0