[RAMEN9610-9616][MODAP-11585] drivers: gpu: Fix ui not smooth
authorYoojin Park <yoojin1.park@samsung.com>
Tue, 18 Dec 2018 04:55:51 +0000 (13:55 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:23:09 +0000 (20:23 +0300)
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>
drivers/gpu/arm/tHEx/r10p0/backend/gpu/mali_kbase_jm_rb.c

index ea4d2d7f1522f8f669e580bcb9467bfafaffccb8..7b50662d9361bc9da6c8ae46f224f2ad2f1d7ab9 100644 (file)
@@ -1743,7 +1743,7 @@ bool kbase_backend_soft_hard_stop_slot(struct kbase_device *kbdev,
                        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 */