Skip to contentSkip to conversation

drm/amdgpu: return error when sriov access requests get timeout

PATCH In review Pixel Ding 2 participants 4 messages Oct 31, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Pixel Ding

author
#0 lore raw

PATCH 1/2 drm/amdgpu: return error when sriov access requests get timeout

From: pding <[email protected]>

---
 drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +1 -1
index 818ec0f..f291fb2 100644
@@ -450,7 +450,7 @@ static int xgpu_vi_send_access_requests(struct amdgpu_device *adev,
 			pr_err("Doesn't get ack from pf, continue\n");
 	}
 
-	return 0;
+	return r;
 }
 
 static int xgpu_vi_request_reset(struct amdgpu_device *adev)
Signature · 6 lines
2.9.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1509433855-21354-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org

author
#2 lore raw

PATCH 2/2 drm/amdgpu: retry init if exclusive mode request is failed

From: pding <[email protected]>

This is caused of that hypervisor fails to handle request, one known issue is MMIO unblocking timeout. In theory we can retry init here.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index daa2098..ef01aa3 100644
@@ -1625,7 +1625,7 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev)) {
 		r = amdgpu_virt_request_full_gpu(adev, true);
 		if (r)
-			return r;
+			return -EAGAIN;
 	}
 
 	for (i = 0; i < adev->num_ip_blocks; i++) {
Signature · 6 lines
2.9.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1509433855-21354-2-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org

#4 lore raw

RE: [PATCH 2/2] drm/amdgpu: retry init if exclusive mode request is failed

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Pixel Ding
Sent: Tuesday, October 31, 2017 3:11 PM
To: [email protected]
Cc: Ding, Pixel <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: retry init if exclusive mode request is failed

From: pding <[email protected]>

This is caused of that hypervisor fails to handle request, one known issue is MMIO unblocking timeout. In theory we can retry init here.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index daa2098..ef01aa3 100644
@@ -1625,7 +1625,7 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
 	if (amdgpu_sriov_vf(adev)) {
 		r = amdgpu_virt_request_full_gpu(adev, true);
 		if (r)
-			return r;
+			return -EAGAIN;
 	}
 
 	for (i = 0; i < adev->num_ip_blocks; i++) {

--
2.9.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#5 lore raw
In reply to a message not in the archive

drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c static int xgpu_vi_send_access_requests(struct amdgpu_device *adev, · line 450

Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +0 -0
@@ -450,7 +450,7 @@ static int xgpu_vi_send_access_requests(struct amdgpu_device *adev,
 			pr_err("Doesn't get ack from pf, continue\n");

Why don't return error in this place?

drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c static int xgpu_vi_send_access_requests(struct amdgpu_device *adev, · line 454

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +1 -1
 	}
 
-	return 0;
+	return r;
 }

static int xgpu_vi_request_reset(struct amdgpu_device *adev)

Signature · 10 lines
2.9.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx