* [PATCH v2] drm/amdgpu:no gpu scheduler for KIQ
@ 2016-11-02 11:48 Trigger Huang
[not found] ` <1478087284-30345-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Trigger Huang @ 2016-11-02 11:48 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Xiangliang Yu, Monk Liu, Trigger Huang
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 <Monk.Liu@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Trigger Huang <trigger.huang@amd.com>
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.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 +++++++++++++++++--------------
1 file changed, 21 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 77b34ec..5772ef2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -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
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread[parent not found: <1478087284-30345-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH v2] drm/amdgpu:no gpu scheduler for KIQ [not found] ` <1478087284-30345-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org> @ 2016-11-02 12:24 ` Christian König [not found] ` <668c3770-240f-7ee5-8fa6-4d0533f0e064-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org> 2016-11-02 14:06 ` Deucher, Alexander 1 sibling, 1 reply; 4+ messages in thread From: Christian König @ 2016-11-02 12:24 UTC (permalink / raw) To: Trigger Huang, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW Cc: Xiangliang Yu, Monk Liu Am 02.11.2016 um 12:48 schrieb Trigger Huang: > 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 <Monk.Liu@amd.com> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> > Signed-off-by: Trigger Huang <trigger.huang@amd.com> Even if you only fix a small mistake it is usually good practice to increase the version number of the patch, e.g. you would use v3 in this case and write a one liner what was wrong in the commit message. But that's only a nit pick, so patch is Reviewed-by: Christian König <christian.koenig@amd.com> anyway. Regards, Christian. > > 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. > > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 +++++++++++++++++-------------- > 1 file changed, 21 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > index 77b34ec..5772ef2 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > @@ -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; _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <668c3770-240f-7ee5-8fa6-4d0533f0e064-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>]
* RE: [PATCH v2] drm/amdgpu:no gpu scheduler for KIQ [not found] ` <668c3770-240f-7ee5-8fa6-4d0533f0e064-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org> @ 2016-11-03 9:33 ` Huang, Trigger 0 siblings, 0 replies; 4+ messages in thread From: Huang, Trigger @ 2016-11-03 9:33 UTC (permalink / raw) To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Hi Christian, OK, I got it, thanks for your detailed suggestion. Thanks & Best Wishes, Trigger Huang -----Original Message----- From: Christian König [mailto:deathsimple@vodafone.de] Sent: Wednesday, November 02, 2016 8:24 PM To: Huang, Trigger <Trigger.Huang@amd.com>; amd-gfx@lists.freedesktop.org Cc: Yu, Xiangliang <Xiangliang.Yu@amd.com>; Liu, Monk <Monk.Liu@amd.com> Subject: Re: [PATCH v2] drm/amdgpu:no gpu scheduler for KIQ Am 02.11.2016 um 12:48 schrieb Trigger Huang: > 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 <Monk.Liu@amd.com> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> > Signed-off-by: Trigger Huang <trigger.huang@amd.com> Even if you only fix a small mistake it is usually good practice to increase the version number of the patch, e.g. you would use v3 in this case and write a one liner what was wrong in the commit message. But that's only a nit pick, so patch is Reviewed-by: Christian König <christian.koenig@amd.com> anyway. Regards, Christian. > > 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. > > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 +++++++++++++++++-------------- > 1 file changed, 21 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > index 77b34ec..5772ef2 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > @@ -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; _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH v2] drm/amdgpu:no gpu scheduler for KIQ [not found] ` <1478087284-30345-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org> 2016-11-02 12:24 ` Christian König @ 2016-11-02 14:06 ` Deucher, Alexander 1 sibling, 0 replies; 4+ messages in thread From: Deucher, Alexander @ 2016-11-02 14:06 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Cc: Yu, Xiangliang, Liu, Monk, Huang, Trigger > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Trigger Huang > Sent: Wednesday, November 02, 2016 7:48 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang; Liu, Monk; Huang, Trigger > Subject: [PATCH 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. > > Signed-off-by: Monk Liu <Monk.Liu@amd.com> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> > Signed-off-by: Trigger Huang <trigger.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > 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. > > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 39 > +++++++++++++++++-------------- > 1 file changed, 21 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > index 77b34ec..5772ef2 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c > @@ -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 > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-03 9:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 11:48 [PATCH v2] drm/amdgpu:no gpu scheduler for KIQ Trigger Huang
[not found] ` <1478087284-30345-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org>
2016-11-02 12:24 ` Christian König
[not found] ` <668c3770-240f-7ee5-8fa6-4d0533f0e064-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-11-03 9:33 ` Huang, Trigger
2016-11-02 14:06 ` Deucher, Alexander
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox