Skip to contentSkip to conversation

drm/amdgpu: for sriov timeout is still enforced on compute rings

PATCH In review Evan Quan 2 participants 3 messages Mar 27, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/1 drm/amdgpu: for sriov timeout is still enforced on compute rings

Sriov still wants these error messags on timeout. So, for sriov use case, the timeout setting on compute rings is kept.

Change-Id Id0af6959a8023c8d683ff680de7c583f84cfeab3
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -1
index 455a81e..2cc5a75 100644
@@ -435,7 +435,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
 	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
 		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
 				   num_hw_submission, amdgpu_job_hang_limit,
-				   (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ?
+				   /* for non-sriov case, no timeout enforce on compute ring */
+				   ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) ?
 				   MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(amdgpu_lockup_timeout),
 				   ring->name);
 		if (r) {
Signature · 6 lines
2.7.4

_______________________________________________
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): 1522133191-31247-1-git-send-email-evan.quan-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 27.03.2018 um 08:46 schrieb Evan Quan:

Quoted 14 lines

Sriov still wants these error messags on timeout. So, for sriov use case, the timeout setting on compute rings is kept.

Change-Id Id0af6959a8023c8d683ff680de7c583f84cfeab3
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
index 455a81e..2cc5a75 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, · line 439

Quoted 6 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -1
@@ -435,7 +435,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
  	if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {
  		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
  				   num_hw_submission, amdgpu_job_hang_limit,
-				   (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ?
+				   /* for non-sriov case, no timeout enforce on compute ring */
+				   ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) ?

This starts to look a bit messy, can you add a local variable and separate the exceptions, e.g. something like:

long timeout = msecs_to_jiffies(amdgpu_lockup_timeout);

if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) timeout = MAX_SCHEDULE_TIMEOUT;

....

Apart from that the patch looks good to me,
Christian.

drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, · line 442

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
  				   MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(amdgpu_lockup_timeout),
  				   ring->name);
  		if (r) {

_______________________________________________
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): 32b69fa9-c0be-db27-03a9-97eb3585083e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

author
#4 lore raw

Yes, of course. I have sent out a new patch with the code cleaned.

Regards,
Evan
From: Christian König [mailto:[email protected]]
Sent: Tuesday, March 27, 2018 3:52 PM
To: Quan, Evan <[email protected]>; [email protected]
Cc: Deucher, Alexander <[email protected]>; Liu, Monk <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: for sriov timeout is still enforced on compute rings

Am 27.03.2018 um 08:46 schrieb Evan Quan:

Sriov still wants these error messags on timeout. So, for sriov

use case, the timeout setting on compute rings is kept.

Change-Id: Id0af6959a8023c8d683ff680de7c583f84cfeab3

---

 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0

index 455a81e..2cc5a75 100644

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

@@ -435,7 +435,8 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,

        if (ring->funcs->type != AMDGPU_RING_TYPE_KIQ) {

                r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,

                                  num_hw_submission, amdgpu_job_hang_limit,

- (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) ?

+ /* for non-sriov case, no timeout enforce on compute ring */

+ ((ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev)) ?

This starts to look a bit messy, can you add a local variable and separate the exceptions, e.g. something like:

long timeout = msecs_to_jiffies(amdgpu_lockup_timeout);

if (ring->funcs->type == AMDGPU_RING_TYPE_COMPUTE) && !amdgpu_sriov_vf(ring->adev))

    timeout = MAX_SCHEDULE_TIMEOUT;

....

Apart from that the patch looks good to me,
Christian.

                                  MAX_SCHEDULE_TIMEOUT : msecs_to_jiffies(amdgpu_lockup_timeout),

                                  ring->name);

                if (r) {

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