From c2003535b9960718f4137acd57d89bd814ea5603 Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Tue, 25 Apr 2023 09:32:27 +0200 Subject: [PATCH] broadcom/compiler: return early for SFU op latency calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we are returning a fixed latency for these check for them earlier and return early if they match. Reviewed-by: Alejandro PiƱeiro Part-of: --- src/broadcom/compiler/qpu_schedule.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/broadcom/compiler/qpu_schedule.c b/src/broadcom/compiler/qpu_schedule.c index 9061d2ed4f9..1b0d21463c4 100644 --- a/src/broadcom/compiler/qpu_schedule.c +++ b/src/broadcom/compiler/qpu_schedule.c @@ -1460,6 +1460,9 @@ instruction_latency(const struct v3d_device_info *devinfo, after_inst->type != V3D_QPU_INSTR_TYPE_ALU) return latency; + if (v3d_qpu_instr_is_sfu(before_inst)) + return 2; + if (before_inst->alu.add.op != V3D_QPU_A_NOP && before_inst->alu.add.magic_write) { latency = MAX2(latency, @@ -1476,9 +1479,6 @@ instruction_latency(const struct v3d_device_info *devinfo, after_inst)); } - if (v3d_qpu_instr_is_sfu(before_inst)) - return 2; - return latency; }