diff options
author | Christian König <christian.koenig@amd.com> | 2016-05-18 07:04:02 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-07-07 14:50:51 -0400 |
commit | 20df080da27e368eea04e5d69d4c7292f8425281 (patch) | |
tree | 80304081942f01620171832ef394213558bdc91a | |
parent | 7392c329ee1e49663fc7c7e47e32ab0dcc79b4d2 (diff) |
drm/amdgpu: remove duplicated timeout callback
No need for double housekeeping here.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Monk.Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 |
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c index 821bc89bd057..f3fd80b93a20 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | |||
@@ -343,8 +343,6 @@ static void amd_sched_job_finish(struct amd_sched_job *s_job) | |||
343 | struct amd_sched_job, node); | 343 | struct amd_sched_job, node); |
344 | 344 | ||
345 | if (next) { | 345 | if (next) { |
346 | INIT_DELAYED_WORK(&next->work_tdr, | ||
347 | s_job->timeout_callback); | ||
348 | amd_sched_job_get(next); | 346 | amd_sched_job_get(next); |
349 | schedule_delayed_work(&next->work_tdr, sched->timeout); | 347 | schedule_delayed_work(&next->work_tdr, sched->timeout); |
350 | } | 348 | } |
@@ -359,7 +357,6 @@ static void amd_sched_job_begin(struct amd_sched_job *s_job) | |||
359 | list_first_entry_or_null(&sched->ring_mirror_list, | 357 | list_first_entry_or_null(&sched->ring_mirror_list, |
360 | struct amd_sched_job, node) == s_job) | 358 | struct amd_sched_job, node) == s_job) |
361 | { | 359 | { |
362 | INIT_DELAYED_WORK(&s_job->work_tdr, s_job->timeout_callback); | ||
363 | amd_sched_job_get(s_job); | 360 | amd_sched_job_get(s_job); |
364 | schedule_delayed_work(&s_job->work_tdr, sched->timeout); | 361 | schedule_delayed_work(&s_job->work_tdr, sched->timeout); |
365 | } | 362 | } |
@@ -401,7 +398,7 @@ int amd_sched_job_init(struct amd_sched_job *job, | |||
401 | return -ENOMEM; | 398 | return -ENOMEM; |
402 | 399 | ||
403 | job->s_fence->s_job = job; | 400 | job->s_fence->s_job = job; |
404 | job->timeout_callback = timeout_cb; | 401 | INIT_DELAYED_WORK(&job->work_tdr, timeout_cb); |
405 | job->free_callback = free_cb; | 402 | job->free_callback = free_cb; |
406 | 403 | ||
407 | if (fence) | 404 | if (fence) |
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h index 69840d7458e6..ec55b9f073d1 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | |||
@@ -87,7 +87,6 @@ struct amd_sched_job { | |||
87 | struct work_struct work_free_job; | 87 | struct work_struct work_free_job; |
88 | struct list_head node; | 88 | struct list_head node; |
89 | struct delayed_work work_tdr; | 89 | struct delayed_work work_tdr; |
90 | void (*timeout_callback) (struct work_struct *work); | ||
91 | void (*free_callback)(struct kref *refcount); | 90 | void (*free_callback)(struct kref *refcount); |
92 | }; | 91 | }; |
93 | 92 | ||