diff options
author | Nils Wallménius <nils.wallmenius@gmail.com> | 2016-04-10 16:30:00 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-05-04 20:20:05 -0400 |
commit | 62250a910a4090f88b729e04baf4369d78ba5bdc (patch) | |
tree | fac76dbe592027b5e8d7aa650a541e05fc45d5d7 /drivers/gpu/drm/amd/scheduler | |
parent | f498d9ed26fdfa2694ef3d892f032c7dc6feba14 (diff) | |
download | op-kernel-dev-62250a910a4090f88b729e04baf4369d78ba5bdc.zip op-kernel-dev-62250a910a4090f88b729e04baf4369d78ba5bdc.tar.gz |
drm/amd/scheduler: Mark amdgpu_sched_ops const
This marks the struct amdgpu_sched_ops const and
adjusts amd_sched_init to take a const pointer
for the ops param. The ops member of
struct amd_gpu_scheduler is also changed to const.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler')
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 639c70d..c16248c 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c @@ -530,7 +530,7 @@ static int amd_sched_main(void *param) * Return 0 on success, otherwise error code. */ int amd_sched_init(struct amd_gpu_scheduler *sched, - struct amd_sched_backend_ops *ops, + const struct amd_sched_backend_ops *ops, unsigned hw_submission, long timeout, const char *name) { int i; diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h index 95ebfd0..169f70f 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h @@ -123,7 +123,7 @@ enum amd_sched_priority { * One scheduler is implemented for each hardware ring */ struct amd_gpu_scheduler { - struct amd_sched_backend_ops *ops; + const struct amd_sched_backend_ops *ops; uint32_t hw_submission_limit; long timeout; const char *name; @@ -137,7 +137,7 @@ struct amd_gpu_scheduler { }; int amd_sched_init(struct amd_gpu_scheduler *sched, - struct amd_sched_backend_ops *ops, + const struct amd_sched_backend_ops *ops, uint32_t hw_submission, long timeout, const char *name); void amd_sched_fini(struct amd_gpu_scheduler *sched); |