MIDCET-1863 : Don't evict NEXT atom on soft stop if it's from a different context
This commit changes the behaviour of the job manager on a soft stop
request. Before this commit, if the atom to stop was on the HEAD of a
job slot and an atom from a different context was on the NEXT slot, both
atoms would be removed. This was once required due to ordering
restrictions in an older job scheduler implementation.
It has the side-effect that if these were the only two contexts
attempting to schedule on this slot, then there was a chance that they
would be removed from the job manager and re-submitted in exactly the
same order. If the soft stop was due to the scheduler attempting to
schedule out the HEAD atom so that the NEXT atom could run, then this
would be entirely counter productive.
Change-Id: I9b85bf10b3d720f248f5976f24a4ecac9d5203bb
Signed-off-by: Yoojin Park <yoojin1.park@samsung.com>
katom_idx0->kctx->blocked_js[js][prio_idx0] = true;
} else {
/* katom_idx0 is on GPU */
- if (katom_idx1 && katom_idx1->gpu_rb_state ==
+ if (katom_idx1_valid && katom_idx1->gpu_rb_state ==
KBASE_ATOM_GPU_RB_SUBMITTED) {
/* katom_idx0 and katom_idx1 are on GPU */