video: rockchip: rga3: fix load imbalance

Fix wrong matching core when todo_list has 0 jobs.

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iaecbe6457a5076a5fe39b26e03fef44cf3c6ecd9
This commit is contained in:
Yu Qiaowei
2022-06-09 20:45:52 +08:00
committed by Tao Huang
parent fb5930538f
commit 65bcc903ef

View File

@@ -214,7 +214,7 @@ int rga_job_assign(struct rga_job *job)
int optional_cores = RGA_NONE_CORE;
int specified_cores = RGA_NONE_CORE;
int i;
int min_of_job_count = 0;
int min_of_job_count = -1;
unsigned long flags;
/* assigned by userspace */
@@ -333,8 +333,8 @@ int rga_job_assign(struct rga_job *job)
flags);
break;
} else {
if ((min_of_job_count > scheduler->job_count) ||
(min_of_job_count == 0)) {
if ((min_of_job_count == -1) ||
(min_of_job_count > scheduler->job_count)) {
min_of_job_count = scheduler->job_count;
core = scheduler->core;
job->scheduler = scheduler;