drm/amdgpu:no gpu scheduler for KIQ
Subsystems (2)
PATCH v2 1/1 drm/amdgpu:no gpu scheduler for KIQ
KIQ is used for interaction between driver and CP, and not exposed to outside client, as such it doesn't need to be handled by GPU scheduler.
Changes in v2:
- According to Alex's suggestion, wrapping the scheduler setup conditionally instead of returning early.
- Use another simple method to check if is a KIQ ring.
Change-Id: Iba09b6dfb6515e5de5fc48c4e8904e8a0ec5f22b
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +21 -18
@@ -382,24 +382,27 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,if (!ring->fence_drv.fences)return -ENOMEM ; - timeout =msecs_to_jiffies (amdgpu_lockup_timeout); -if (timeout ==0 ) { -/* -* FIXME: -* Delayed workqueue cannot use it directly, -* so the scheduler will not use delayed workqueue if -* MAX_SCHEDULE_TIMEOUT is set. -* Currently keep it simple and silly. -*/ - timeout =MAX_SCHEDULE_TIMEOUT ; - } - r =amd_sched_init (&ring->sched, &amdgpu_sched_ops, - num_hw_submission, - timeout, ring->name); -if (r) { -DRM_ERROR ("Failed to create scheduler on ring %s.\n" , - ring->name); -return r; +/* No need to setup the GPU scheduler for KIQ ring */ +if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ ) { + timeout =msecs_to_jiffies (amdgpu_lockup_timeout); +if (timeout ==0 ) { +/* +* FIXME: +* Delayed workqueue cannot use it directly, +* so the scheduler will not use delayed workqueue if +* MAX_SCHEDULE_TIMEOUT is set. +* Currently keep it simple and silly. +*/ + timeout =MAX_SCHEDULE_TIMEOUT ; + } + r =amd_sched_init (&ring->sched, &amdgpu_sched_ops, + num_hw_submission, + timeout, ring->name); +if (r) { +DRM_ERROR ("Failed to create scheduler on ring %s.\n" , + ring->name); +return r; + } }return 0 ;
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sorry please just ignore this patch, since I made a small mistake, I will sent again soon.
Thanks & Best Wishes,
Trigger Huang
-----Original Message-----
From: Trigger Huang [mailto:[email protected]]
Sent: Wednesday, November 02, 2016 7:26 PM
To: [email protected]
Cc: Huang, Trigger <[email protected]>; Liu, Monk <[email protected]>; Yu, Xiangliang <[email protected]>
Subject: [V2] drm/amdgpu:no gpu scheduler for KIQ
KIQ is used for interaction between driver and CP, and not exposed to outside client, as such it doesn't need to be handled by GPU scheduler.
Changes in v2:
- According to Alex's suggestion, wrapping the scheduler setup conditionally instead of returning early.
- Use another simple method to check if is a KIQ ring.
Change-Id: Iba09b6dfb6515e5de5fc48c4e8904e8a0ec5f22b
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +21 -18
@@ -382,24 +382,27 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring,if (!ring->fence_drv.fences)return -ENOMEM ; - timeout =msecs_to_jiffies (amdgpu_lockup_timeout); -if (timeout ==0 ) { -/* -* FIXME: -* Delayed workqueue cannot use it directly, -* so the scheduler will not use delayed workqueue if -* MAX_SCHEDULE_TIMEOUT is set. -* Currently keep it simple and silly. -*/ - timeout =MAX_SCHEDULE_TIMEOUT ; - } - r =amd_sched_init (&ring->sched, &amdgpu_sched_ops, - num_hw_submission, - timeout, ring->name); -if (r) { -DRM_ERROR ("Failed to create scheduler on ring %s.\n" , - ring->name); -return r; +/* No need to setup the GPU scheduler for KIQ ring */ +if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ ) { + timeout =msecs_to_jiffies (amdgpu_lockup_timeout); +if (timeout ==0 ) { +/* +* FIXME: +* Delayed workqueue cannot use it directly, +* so the scheduler will not use delayed workqueue if +* MAX_SCHEDULE_TIMEOUT is set. +* Currently keep it simple and silly. +*/ + timeout =MAX_SCHEDULE_TIMEOUT ; + } + r =amd_sched_init (&ring->sched, &amdgpu_sched_ops, + num_hw_submission, + timeout, ring->name); +if (r) { +DRM_ERROR ("Failed to create scheduler on ring %s.\n" , + ring->name); +return r; + } }return 0 ;
--
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Trigger Huang
Sent: Wednesday, November 02, 2016 7:26 AM
To: [email protected]
Cc: Yu, Xiangliang; Liu, Monk; Huang, Trigger
Subject: [V2] drm/amdgpu:no gpu scheduler for KIQ
Quoted 7 lines
KIQ is used for interaction between driver and CP, and not exposed to outside client, as such it doesn't need to be handled by GPU scheduler.
Signed-off-by Monk Liu <[email protected]>Signed-off-by Xiangliang Yu <[email protected]>Signed-off-by Trigger Huang <[email protected]>
Quoted 64 lines
Changes in v2:
- According to Alex's suggestion, wrapping the scheduler setup conditionally instead of returning early.
- Use another simple method to check if is a KIQ ring.Change-Id: Iba09b6dfb6515e5de5fc48c4e8904e8a0ec5f22b
--- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 +++++++++++++++++-------------- 1 file changed, 21 insertions(+), 18 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +21
-18@@ -382,24 +382,27 @@ int amdgpu_fence_driver_init_ring(struct amdgpu_ring *ring, if (!ring->fence_drv.fences) return -ENOMEM; - timeout =msecs_to_jiffies (amdgpu_lockup_timeout); -if (timeout ==0 ) { -/* -* FIXME: -* Delayed workqueue cannot use it directly, -* so the scheduler will not use delayed workqueue if -* MAX_SCHEDULE_TIMEOUT is set. -* Currently keep it simple and silly. -*/ - timeout =MAX_SCHEDULE_TIMEOUT ; - } - r =amd_sched_init (&ring->sched, &amdgpu_sched_ops, - num_hw_submission, - timeout, ring->name); -if (r) { -DRM_ERROR ("Failed to create scheduler on ring %s.\n" , - ring->name); -return r; +/* No need to setup the GPU scheduler for KIQ ring */ +if (ring->funcs->type !=AMDGPU_RING_TYPE_KIQ ) { + timeout =msecs_to_jiffies (amdgpu_lockup_timeout); +if (timeout ==0 ) { +/* +* FIXME: +* Delayed workqueue cannot use it directly, +* so the scheduler will not use delayed workqueue if +* MAX_SCHEDULE_TIMEOUT is set. +* Currently keep it simple and silly. +*/ + timeout =MAX_SCHEDULE_TIMEOUT ; + } + r =amd_sched_init (&ring->sched, &amdgpu_sched_ops, + num_hw_submission, + timeout, ring->name); +if (r) { + DRM_ERROR("Failed to create scheduler on ring %s.\n", + ring->name); +return r; + } }
Quoted 8 lines
return 0;
--
2.7.4_______________________________________________
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