summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/scheduler
diff options
context:
space:
mode:
authorChunming Zhou <david1.zhou@amd.com>2015-08-24 05:35:26 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-08-25 16:52:18 +0200
commitf38fdfddfaab070e3ff2333a79e45169ee33dc28 (patch)
tree8988ba27abf8551083067d487b8b04ddfd8ff2f6 /drivers/gpu/drm/amd/scheduler
parentdrm/amdgpu: add owner for sched fence (diff)
downloadlinux-f38fdfddfaab070e3ff2333a79e45169ee33dc28.tar.xz
linux-f38fdfddfaab070e3ff2333a79e45169ee33dc28.zip
drm/amdgpu: add priv data to sched
Signed-off-by: Chunming Zhou <david1.zhou@amd.com> Reviewed-by: Christian K?nig <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c4
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 24593fd29150..2df6f174ba7b 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -341,7 +341,8 @@ static int amd_sched_main(void *param)
* Return the pointer to scheduler for success, otherwise return NULL
*/
struct amd_gpu_scheduler *amd_sched_create(struct amd_sched_backend_ops *ops,
- unsigned ring, unsigned hw_submission)
+ unsigned ring, unsigned hw_submission,
+ void *priv)
{
struct amd_gpu_scheduler *sched;
@@ -352,6 +353,7 @@ struct amd_gpu_scheduler *amd_sched_create(struct amd_sched_backend_ops *ops,
sched->ops = ops;
sched->ring_id = ring;
sched->hw_submission_limit = hw_submission;
+ sched->priv = priv;
snprintf(sched->name, sizeof(sched->name), "amdgpu[%d]", ring);
amd_sched_rq_init(&sched->sched_rq);
amd_sched_rq_init(&sched->kernel_rq);
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
index 0927864af1f8..44909b16c3a3 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
@@ -112,11 +112,12 @@ struct amd_gpu_scheduler {
wait_queue_head_t wait_queue;
uint32_t hw_submission_limit;
char name[20];
+ void *priv;
};
struct amd_gpu_scheduler *
amd_sched_create(struct amd_sched_backend_ops *ops,
- uint32_t ring, uint32_t hw_submission);
+ uint32_t ring, uint32_t hw_submission, void *priv);
int amd_sched_destroy(struct amd_gpu_scheduler *sched);
int amd_sched_entity_init(struct amd_gpu_scheduler *sched,