amdgpu_cs_parser_fini_late(parser);
}
-static int amdgpu_cs_parser_run_job(
- struct amdgpu_cs_parser *sched_job)
+static int amdgpu_cs_parser_run_job(struct amdgpu_cs_parser *sched_job)
{
amdgpu_cs_parser_fini_early(sched_job, 0, true);
return 0;
}
-static int amdgpu_cs_parser_free_job(
- struct amdgpu_cs_parser *sched_job)
+static int amdgpu_cs_parser_free_job(struct amdgpu_cs_parser *sched_job)
{
amdgpu_cs_parser_fini_late(sched_job);
return 0;
{
struct amd_sched_entity *p = rq->current_entity;
int i = atomic_read(&rq->nr_entity) + 1; /*real count + dummy head*/
+
while (i) {
p = list_entry(p->list.next, typeof(*p), list);
if (!rq->check_entity_status(p)) {
static int gpu_entity_check_status(struct amd_sched_entity *entity)
{
- struct amd_context_entity *tmp = NULL;
+ struct amd_context_entity *tmp;
if (entity == &entity->belongto_rq->head)
return -1;
{
unsigned long flags;
bool full;
+
spin_lock_irqsave(&sched->queue_lock, flags);
full = atomic64_read(&sched->hw_rq_count) <
sched->hw_submission_limit ? true : false;
* Select next entity from the kernel run queue, if not available,
* return null.
*/
-static struct amd_context_entity *kernel_rq_select_context(
- struct amd_gpu_scheduler *sched)
+static struct amd_context_entity *
+kernel_rq_select_context(struct amd_gpu_scheduler *sched)
{
- struct amd_sched_entity *sched_entity = NULL;
+ struct amd_sched_entity *sched_entity;
struct amd_context_entity *tmp = NULL;
struct amd_run_queue *rq = &sched->kernel_rq;
/**
* Select next entity containing real IB submissions
*/
-static struct amd_context_entity *select_context(
- struct amd_gpu_scheduler *sched)
+static struct amd_context_entity *
+select_context(struct amd_gpu_scheduler *sched)
{
struct amd_context_entity *wake_entity = NULL;
struct amd_context_entity *tmp;
{
unsigned long flags;
struct amd_gpu_scheduler *sched;
+
if (!sched_job)
return;
sched = sched_job->sched;
unsigned hw_submission)
{
struct amd_gpu_scheduler *sched;
- char name[20] = "gpu_sched[0]";
+ char name[20];
sched = kzalloc(sizeof(struct amd_gpu_scheduler), GFP_KERNEL);
if (!sched)