lima/gpir: fix crash in schedule_insert_ready_list()
authorVasily Khoruzhick <anarsoul@gmail.com>
Tue, 10 Mar 2020 08:53:57 +0000 (01:53 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Mon, 16 Mar 2020 23:28:33 +0000 (16:28 -0700)
Fix crash if node is already at position we want. Otherwise we remove
it from list (and list->prev becomes NULL) and then we dereference list->prev
in list_addtail()

Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4126>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4126>

.gitlab-ci/deqp-lima-skips.txt
src/gallium/drivers/lima/ir/gp/reduce_scheduler.c

index 83b241f34d1fdbc440c088fe370699e5e45b0fb1..f866ece29a6e2a926906f82f38c99694e67f7c80 100644 (file)
@@ -9,11 +9,6 @@ dEQP-GLES[0-9]*.stress
 # These are really slow on tiling architectures (including llvmpipe).
 dEQP-GLES[0-9]*.functional.flush_finish
 
-# Crashes
-dEQP-GLES2.functional.shaders.invariance.highp.common_subexpression_1
-dEQP-GLES2.functional.shaders.invariance.mediump.common_subexpression_1
-dEQP-GLES2.functional.shaders.invariance.lowp.common_subexpression_1
-
 # Flaky
 dEQP-GLES2.functional.clipping.triangle_vertex.clip_three.clip_neg_x_neg_z_and_pos_x_pos_z_and_neg_x_neg_y_pos_z
 dEQP-GLES2.functional.default_vertex_attrib.*
index 8b4f559330d87d7d49d6c673fe6b8ebc5a97d212..47cc6109e01086e705cafb5566096dcaf04e6732 100644 (file)
@@ -118,6 +118,8 @@ static void schedule_insert_ready_list(struct list_head *ready_list,
             (insert_node->rsched.reg_pressure == node->rsched.reg_pressure &&
              (insert_node->rsched.est >= node->rsched.est))))) {
          insert_pos = &node->list;
+         if (node == insert_node)
+            return;
          break;
       }
    }