diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-04-21 07:35:11 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 17:40:18 -0400 |
commit | 17b2e332a277bf8a1314bfa58ac17d38b77d3c14 (patch) | |
tree | a5d1df7a8428a3621c2b7eea2d59b1da9694fe5f /drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | |
parent | 3af906f0cf6bdf9b7c300a0fa34858a02c71c730 (diff) |
drm/amdgpu:need som change on vega10 mailbox
if sriov gpu reset is invoked by job timeout, it is run
in a global work-queue which is very slow and better not call
msleep ortherwise it takes long time to get back CPU.
so make below changes:
1: Change msleep 1 to mdelay 5
2: Ignore the ack fail from pf after time out,
because VF FLR will clear ack, sometime VF FLR is done
prior to the beginning of poll_ack so we can ignore this ack
TODO:
Put job_timedout (and the following gpu reset) in a driver thread,
instead of the global work_struct.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c index 7bdc51b02326..f0d64f13abbc 100644 --- a/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c +++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | |||
@@ -398,8 +398,8 @@ static int xgpu_vi_poll_ack(struct amdgpu_device *adev) | |||
398 | r = -ETIME; | 398 | r = -ETIME; |
399 | break; | 399 | break; |
400 | } | 400 | } |
401 | msleep(1); | 401 | mdelay(5); |
402 | timeout -= 1; | 402 | timeout -= 5; |
403 | 403 | ||
404 | reg = RREG32_NO_KIQ(mmMAILBOX_CONTROL); | 404 | reg = RREG32_NO_KIQ(mmMAILBOX_CONTROL); |
405 | } | 405 | } |
@@ -418,8 +418,8 @@ static int xgpu_vi_poll_msg(struct amdgpu_device *adev, enum idh_event event) | |||
418 | r = -ETIME; | 418 | r = -ETIME; |
419 | break; | 419 | break; |
420 | } | 420 | } |
421 | msleep(1); | 421 | mdelay(5); |
422 | timeout -= 1; | 422 | timeout -= 5; |
423 | 423 | ||
424 | r = xgpu_vi_mailbox_rcv_msg(adev, event); | 424 | r = xgpu_vi_mailbox_rcv_msg(adev, event); |
425 | } | 425 | } |
@@ -447,7 +447,7 @@ static int xgpu_vi_send_access_requests(struct amdgpu_device *adev, | |||
447 | request == IDH_REQ_GPU_RESET_ACCESS) { | 447 | request == IDH_REQ_GPU_RESET_ACCESS) { |
448 | r = xgpu_vi_poll_msg(adev, IDH_READY_TO_ACCESS_GPU); | 448 | r = xgpu_vi_poll_msg(adev, IDH_READY_TO_ACCESS_GPU); |
449 | if (r) | 449 | if (r) |
450 | return r; | 450 | pr_err("Doesn't get ack from pf, continue\n"); |
451 | } | 451 | } |
452 | 452 | ||
453 | return 0; | 453 | return 0; |