From bd7584c16bc56fdcb3a7a720c9a857e158f699d2 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Mon, 22 Nov 2021 12:23:13 +0100 Subject: [PATCH] broadcom/compiler: don't allow RF writes from signals after thrend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Writes to physical registers are not allowed after thread end. We were checking this for ALU writes, but we need to check it for signal writes too. Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/compiler/qpu_schedule.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c index f987766a1b9..de71d1372d6 100644 --- a/src/broadcom/compiler/qpu_schedule.c +++ b/src/broadcom/compiler/qpu_schedule.c @@ -1517,6 +1517,11 @@ qpu_inst_valid_in_thrend_slot(struct v3d_compile *c, return false; } + if (v3d_qpu_sig_writes_address(c->devinfo, &inst->sig) && + !inst->sig_magic) { + return false; + } + if (c->devinfo->ver < 40 && inst->alu.add.op == V3D_QPU_A_SETMSF) return false;