summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2015-09-04 00:11:54 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-09-04 11:04:04 -0400
commit5134e999cb72c621f48305d5c201ab30156505c1 (patch)
tree9fb6d5c1d067e9d23ee525085c743dde02eae2e7 /drivers/gpu
parent270e869d846af143f60b7404e01e785d18420007 (diff)
drm/amdgpu: fix warning in scheduler
This should never happen so warn when the count does not equal the expected size. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index ab8577f8ed4a..9259f1b6664c 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -332,7 +332,7 @@ static int amd_sched_main(void *param)
{
struct sched_param sparam = {.sched_priority = 1};
struct amd_gpu_scheduler *sched = (struct amd_gpu_scheduler *)param;
- int r;
+ int r, count;
sched_setscheduler(current, SCHED_FIFO, &sparam);
@@ -361,7 +361,8 @@ static int amd_sched_main(void *param)
fence_put(fence);
}
- kfifo_out(&entity->job_queue, &job, sizeof(job));
+ count = kfifo_out(&entity->job_queue, &job, sizeof(job));
+ WARN_ON(count != sizeof(job));
wake_up(&sched->job_scheduled);
}
return 0;