|
@@ -2032,12 +2032,17 @@ static int amdgpu_resume(struct amdgpu_device *adev)
|
|
|
|
|
|
static void amdgpu_device_detect_sriov_bios(struct amdgpu_device *adev)
|
|
|
{
|
|
|
- if (adev->is_atom_fw) {
|
|
|
- if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
|
|
|
- adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
|
|
|
- } else {
|
|
|
- if (amdgpu_atombios_has_gpu_virtualization_table(adev))
|
|
|
- adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
|
|
|
+ if (amdgpu_sriov_vf(adev)) {
|
|
|
+ if (adev->is_atom_fw) {
|
|
|
+ if (amdgpu_atomfirmware_gpu_supports_virtualization(adev))
|
|
|
+ adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
|
|
|
+ } else {
|
|
|
+ if (amdgpu_atombios_has_gpu_virtualization_table(adev))
|
|
|
+ adev->virt.caps |= AMDGPU_SRIOV_CAPS_SRIOV_VBIOS;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!(adev->virt.caps & AMDGPU_SRIOV_CAPS_SRIOV_VBIOS))
|
|
|
+ amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -2207,7 +2212,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
|
|
if (amdgpu_need_post(adev)) {
|
|
|
if (!adev->bios) {
|
|
|
dev_err(adev->dev, "no vBIOS found\n");
|
|
|
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_NO_VBIOS, 0, 0);
|
|
|
r = -EINVAL;
|
|
|
goto failed;
|
|
|
}
|
|
@@ -2215,7 +2219,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
|
|
|
r = amdgpu_atom_asic_init(adev->mode_info.atom_context);
|
|
|
if (r) {
|
|
|
dev_err(adev->dev, "gpu post error!\n");
|
|
|
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_POST_ERROR, 0, 0);
|
|
|
goto failed;
|
|
|
}
|
|
|
} else {
|
|
@@ -3019,7 +3022,6 @@ out:
|
|
|
}
|
|
|
} else {
|
|
|
dev_err(adev->dev, "asic resume failed (%d).\n", r);
|
|
|
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_ASIC_RESUME_FAIL, 0, r);
|
|
|
for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
|
|
|
if (adev->rings[i] && adev->rings[i]->sched.thread) {
|
|
|
kthread_unpark(adev->rings[i]->sched.thread);
|
|
@@ -3033,7 +3035,6 @@ out:
|
|
|
if (r) {
|
|
|
/* bad news, how to tell it to userspace ? */
|
|
|
dev_info(adev->dev, "GPU reset failed\n");
|
|
|
- amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_GPU_RESET_FAIL, 0, r);
|
|
|
}
|
|
|
else {
|
|
|
dev_info(adev->dev, "GPU reset successed!\n");
|