Skip to contentSkip to conversation

drm/amdgpu: fix scheduler timeout calc

PATCH Superseded Cui, Flora 3 participants 3 messages Jun 24, 2019 2 messages not in the archive

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Cui, Flora

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix scheduler timeout calc

scheduler timeout is in jiffies

Change-Id I26708c163db943ff8d930dd81bcab4b4b9d84eb2
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +3 -0
index cbcaa7c..2edaa6c 100644
@@ -481,6 +481,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
 			break;
 		}
 
+		if (timeout != MAX_SCHEDULE_TIMEOUT)
+			timeout = msecs_to_jiffies(timeout);
+
 		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,
 				   num_hw_submission, amdgpu_job_hang_limit,
 				   timeout, ring->name);
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): 1561366217-13261-1-git-send-email-flora.cui-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 24.06.19 um 10:50 schrieb Cui, Flora:

Quoted 4 lines

scheduler timeout is in jiffies

Change-Id I26708c163db943ff8d930dd81bcab4b4b9d84eb2

I actually suggested to do this consistently in amdgpu_device_get_job_timeout_settings after parsing the value.

BTW: The test for negative values there is still not correct either.

Can you fix up both? Cause otherwise we are not able to completely disable the timeout for testing.

Christian.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +0 -0
index cbcaa7c..2edaa6c 100644

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

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +3 -0
@@ -481,6 +481,9 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,
  			break;
  		}
 
+		if (timeout != MAX_SCHEDULE_TIMEOUT)
+			timeout = msecs_to_jiffies(timeout);
+
  		r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,()
  				   num_hw_submission, amdgpu_job_hang_limit,
  				   timeout, ring->name);

_______________________________________________
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): 44e2f73b-2102-8361-034d-6176eb952ce3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw

OK. will update in v2.

Quoted 20 lines · Christian König

Am 24.06.19 um 10:50 schrieb Cui, Flora:

Quoted 4 lines

scheduler timeout is in jiffies

Change-Id I26708c163db943ff8d930dd81bcab4b4b9d84eb2

I actually suggested to do this consistently in amdgpu_device_get_job_timeout_settings after parsing the value.

BTW: The test for negative values there is still not correct either.

Can you fix up both? Cause otherwise we are not able to completely disable the timeout for testing.

Christian.

Quoted 4 lines

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 3 +++

  1 file changed, 3 insertions(+)
Quoted 16 lines
Quoted 14 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +2 -0
index cbcaa7c..2edaa6c 100644
@@ -481,6 +481,9 @@ int amdgpu_fence_driver_init_ring(struct 
 amdgpu_ring *ring,
               break;
           }
   +        if (timeout != MAX_SCHEDULE_TIMEOUT)
+            timeout = msecs_to_jiffies(timeout);
+
           r = drm_sched_init(&ring->sched, &amdgpu_sched_ops,()
                      num_hw_submission, amdgpu_job_hang_limit,
Quoted 1 line

                     timeout, ring->name);

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