broadcom/qpu: set VC5_QPU_RADDR_A out of the switch at _pack_branch
authorNeil Roberts <nroberts@igalia.com>
Sun, 5 Jul 2020 13:45:19 +0000 (15:45 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Tue, 7 Jul 2020 19:40:16 +0000 (21:40 +0200)
Detected after mesa added Wimplicit-fallthrough project wide.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5769>

src/broadcom/qpu/qpu_pack.c

index e70daf55a9fd86a0433059d4ef9cec4dfe583b62..7502bbfb9d65dcd74387fdc3f3170ae5888a38f2 100644 (file)
@@ -1452,14 +1452,14 @@ v3d_qpu_instr_pack_branch(const struct v3d_device_info *devinfo,
 
                 *packed_instr |= QPU_SET_FIELD(instr->branch.offset >> 24,
                                                VC5_QPU_BRANCH_ADDR_HIGH);
+        default:
+                break;
+        }
 
-        case V3D_QPU_BRANCH_DEST_REGFILE:
+        if (instr->branch.bdi == V3D_QPU_BRANCH_DEST_REGFILE ||
+            instr->branch.bdu == V3D_QPU_BRANCH_DEST_REGFILE) {
                 *packed_instr |= QPU_SET_FIELD(instr->branch.raddr_a,
                                                VC5_QPU_RADDR_A);
-                break;
-
-        default:
-                break;
         }
 
         return true;