Commit 5134e999 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: fix warning in scheduler

This should never happen so warn when the count does
not equal the expected size.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 270e869d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment