@@ -1148,13 +1148,15 @@ static int gfx_v9_4_3_sw_init(struct amdgpu_ip_block *ip_block)
11481148 switch (amdgpu_ip_version (adev , GC_HWIP , 0 )) {
11491149 case IP_VERSION (9 , 4 , 3 ):
11501150 case IP_VERSION (9 , 4 , 4 ):
1151- if (adev -> gfx .mec_fw_version >= 155 ) {
1151+ if ((adev -> gfx .mec_fw_version >= 155 ) &&
1152+ !amdgpu_sriov_vf (adev )) {
11521153 adev -> gfx .compute_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE ;
11531154 adev -> gfx .compute_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE ;
11541155 }
11551156 break ;
11561157 case IP_VERSION (9 , 5 , 0 ):
1157- if (adev -> gfx .mec_fw_version >= 21 ) {
1158+ if ((adev -> gfx .mec_fw_version >= 21 ) &&
1159+ !amdgpu_sriov_vf (adev )) {
11581160 adev -> gfx .compute_supported_reset |= AMDGPU_RESET_TYPE_PER_QUEUE ;
11591161 adev -> gfx .compute_supported_reset |= AMDGPU_RESET_TYPE_PER_PIPE ;
11601162 }
@@ -3561,8 +3563,8 @@ static int gfx_v9_4_3_reset_kcq(struct amdgpu_ring *ring,
35613563 unsigned long flags ;
35623564 int r ;
35633565
3564- if (amdgpu_sriov_vf (adev ))
3565- return - EINVAL ;
3566+ if (! (adev -> gfx . compute_supported_reset & AMDGPU_RESET_TYPE_PER_QUEUE ))
3567+ return - EOPNOTSUPP ;
35663568
35673569 if (!kiq -> pmf || !kiq -> pmf -> kiq_unmap_queues )
35683570 return - EINVAL ;
@@ -3594,7 +3596,9 @@ static int gfx_v9_4_3_reset_kcq(struct amdgpu_ring *ring,
35943596 dev_err (adev -> dev , "fail to wait on hqd deactive and will try pipe reset\n" );
35953597
35963598pipe_reset :
3597- if (r ) {
3599+ if (r ) {
3600+ if (!(adev -> gfx .compute_supported_reset & AMDGPU_RESET_TYPE_PER_PIPE ))
3601+ return - EOPNOTSUPP ;
35983602 r = gfx_v9_4_3_reset_hw_pipe (ring );
35993603 dev_info (adev -> dev , "ring: %s pipe reset :%s\n" , ring -> name ,
36003604 r ? "failed" : "successfully" );
0 commit comments