From bca242c78520eb48e68f0101b2273ef5208e282b Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 30 Dec 2020 13:15:13 -0500 Subject: [PATCH] pan/bi: Fix IDLE register mode packing Was incorrectly returning zero. Special case like IDLE_1. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_pack.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/panfrost/bifrost/bi_pack.c b/src/panfrost/bifrost/bi_pack.c index 1c7d14f9e6d..f907bb77b6a 100644 --- a/src/panfrost/bifrost/bi_pack.c +++ b/src/panfrost/bifrost/bi_pack.c @@ -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) {