From: Nayan Deshmukh <nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Nayan Deshmukh
<nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org,
alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
christian.koenig-5C7GfCeVMHo@public.gmane.org,
l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: [PATCH 1/3] drm/scheduler: add a pointer to scheduler in the rq
Date: Thu, 12 Jul 2018 12:06:41 +0530 [thread overview]
Message-ID: <20180712063643.8030-2-nayan26deshmukh@gmail.com> (raw)
In-Reply-To: <20180712063643.8030-1-nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
---
drivers/gpu/drm/scheduler/gpu_scheduler.c | 6 ++++--
include/drm/gpu_scheduler.h | 2 ++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c b/drivers/gpu/drm/scheduler/gpu_scheduler.c
index 7d2560699b84..429b1328653a 100644
--- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
@@ -69,11 +69,13 @@ static void drm_sched_process_job(struct dma_fence *f, struct dma_fence_cb *cb);
*
* Initializes a scheduler runqueue.
*/
-static void drm_sched_rq_init(struct drm_sched_rq *rq)
+static void drm_sched_rq_init(struct drm_gpu_scheduler *sched,
+ struct drm_sched_rq *rq)
{
spin_lock_init(&rq->lock);
INIT_LIST_HEAD(&rq->entities);
rq->current_entity = NULL;
+ rq->sched = sched;
}
/**
@@ -926,7 +928,7 @@ int drm_sched_init(struct drm_gpu_scheduler *sched,
sched->timeout = timeout;
sched->hang_limit = hang_limit;
for (i = DRM_SCHED_PRIORITY_MIN; i < DRM_SCHED_PRIORITY_MAX; i++)
- drm_sched_rq_init(&sched->sched_rq[i]);
+ drm_sched_rq_init(sched, &sched->sched_rq[i]);
init_waitqueue_head(&sched->wake_up_worker);
init_waitqueue_head(&sched->job_scheduled);
diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
index 4214ceb71c05..43e93d6077cf 100644
--- a/include/drm/gpu_scheduler.h
+++ b/include/drm/gpu_scheduler.h
@@ -93,6 +93,7 @@ struct drm_sched_entity {
* struct drm_sched_rq - queue of entities to be scheduled.
*
* @lock: to modify the entities list.
+ * @sched: the scheduler to which this rq belongs to.
* @entities: list of the entities to be scheduled.
* @current_entity: the entity which is to be scheduled.
*
@@ -102,6 +103,7 @@ struct drm_sched_entity {
*/
struct drm_sched_rq {
spinlock_t lock;
+ struct drm_gpu_scheduler *sched;
struct list_head entities;
struct drm_sched_entity *current_entity;
};
--
2.14.3
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-07-12 6:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-12 6:36 [PATCH 0/3] drm/scheduler: preparation for load balancing Nayan Deshmukh
[not found] ` <20180712063643.8030-1-nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-07-12 6:36 ` Nayan Deshmukh [this message]
[not found] ` <20180712063643.8030-2-nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-07-12 17:50 ` [PATCH 1/3] drm/scheduler: add a pointer to scheduler in the rq Eric Anholt
2018-07-12 6:36 ` [PATCH 2/3] drm/scheduler: add counter for total jobs in scheduler Nayan Deshmukh
2018-08-02 5:01 ` Zhang, Jerry (Junwei)
2018-08-02 5:50 ` Nayan Deshmukh
[not found] ` <CAFd4ddzHsjg=D0=Zo-iKLv-uQ_MFWq2bzZGLwXQtoRnZAixzGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-02 5:59 ` Zhang, Jerry (Junwei)
[not found] ` <5B629DC1.2040100-5C7GfCeVMHo@public.gmane.org>
2018-08-02 6:08 ` Nayan Deshmukh
2018-08-02 6:16 ` Zhang, Jerry (Junwei)
2018-07-12 6:36 ` [PATCH 3/3] drm/scheduler: modify args of drm_sched_entity_init Nayan Deshmukh
2018-07-12 6:42 ` Nayan Deshmukh
2018-07-12 17:51 ` Eric Anholt
[not found] ` <87pnzs9wbz.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
2018-07-13 7:20 ` Nayan Deshmukh
[not found] ` <CAFd4ddwi5gF7FM5jEW01DwXhfBMQ+77JLVKcth3hzeobc5Hc4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-13 7:22 ` Christian König
2018-07-13 7:10 ` Christian König
2018-07-12 7:30 ` [PATCH 0/3] drm/scheduler: preparation for load balancing Christian König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180712063643.8030-2-nayan26deshmukh@gmail.com \
--to=nayan26deshmukh-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
--cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox