Commit b053117e authored by Lin.Cao's avatar Lin.Cao Committed by Alex Deucher
Browse files

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: default avatarLin.Cao <lincao12@amd.com>
Reviewed-by: default avatarJingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent de7f3c4e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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;