drm/amdgpu: Return -EINVAL when MMSCH init status incorrect
Subsystems (2)
PATCH 1/1 drm/amdgpu: Return -EINVAL when MMSCH init status incorrect
Return -EINVAL when MMSCH init fail which can be handle by function amdgpu_device_reset_sriov correctly.
Signed-off-by Lin.Cao <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +4 -1
@@ -518,8 +518,11 @@ static int jpeg_v4_0_start_sriov(struct amdgpu_device *adev)return -EBUSY ; } } -if (resp != expected && resp !=MMSCH_VF_MAILBOX_RESP__INCOMPLETE && init_status !=MMSCH_VF_ENGINE_STATUS__PASS ) +if (resp != expected && resp !=MMSCH_VF_MAILBOX_RESP__INCOMPLETE + && init_status !=MMSCH_VF_ENGINE_STATUS__PASS ) {DRM_ERROR ("MMSCH init status is incorrect! readback=0x%08x, header init status for jpeg: %x\n" , resp, init_status); +return -EINVAL ; + }return 0 ;
Signature · 1 line
2.25.1
Reviewed-by Jingwen Chen <[email protected]>
Signature · 2 lines
Best Regards, JingWen Chen
Quoted 25 lines · Lin.Cao
Return
-EINVALwhen MMSCH init fail which can be handle by functionamdgpu_device_reset_sriovcorrectly.Signed-off-by Lin.Cao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c +4
-1@@ -518,8 +518,11 @@ static int jpeg_v4_0_start_sriov(struct amdgpu_device *adev)return -EBUSY ; } } -if (resp != expected && resp !=MMSCH_VF_MAILBOX_RESP__INCOMPLETE && init_status !=MMSCH_VF_ENGINE_STATUS__PASS ) +if (resp != expected && resp !=MMSCH_VF_MAILBOX_RESP__INCOMPLETE + && init_status !=MMSCH_VF_ENGINE_STATUS__PASS ) {DRM_ERROR ("MMSCH init status is incorrect! readback=0x%08x, header init status for jpeg: %x\n" , resp, init_status); +return -EINVAL ; + }return 0 ;