pan/bi: Fix IDLE register mode packing
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 30 Dec 2020 18:15:13 +0000 (13:15 -0500)
committerMarge Bot <eric+marge@anholt.net>
Fri, 29 Jan 2021 16:55:43 +0000 (16:55 +0000)
Was incorrectly returning zero. Special case like IDLE_1.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8723>

src/panfrost/bifrost/bi_pack.c

index 1c7d14f..f907bb7 100644 (file)
@@ -289,9 +289,9 @@ bi_assign_slots(bi_bundle *now, bi_bundle *prev)
 static enum bifrost_reg_mode
 bi_pack_register_mode(bi_registers r)
 {
-        /* Handle idle special case for first instructions */
-        if (r.first_instruction && !(r.slot23.slot2 | r.slot23.slot3))
-                return BIFROST_IDLE_1;
+        /* Handle idle as a special case */
+        if (!(r.slot23.slot2 | r.slot23.slot3))
+                return r.first_instruction ? BIFROST_IDLE_1 : BIFROST_IDLE;
 
         /* Otherwise, use the LUT */
         for (unsigned i = 0; i < ARRAY_SIZE(bifrost_reg_ctrl_lut); ++i) {