From 8d20ade09b63d47303156429c36a5b85c797ac83 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 14 Aug 2024 15:36:53 -0500 Subject: [PATCH] nouveau/mme: Don't allow PRMT and MTHD in the same op on Turing+ Part-of: --- src/nouveau/mme/mme_tu104_builder.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nouveau/mme/mme_tu104_builder.c b/src/nouveau/mme/mme_tu104_builder.c index 98e601e0636..8a5ac0751b7 100644 --- a/src/nouveau/mme/mme_tu104_builder.c +++ b/src/nouveau/mme/mme_tu104_builder.c @@ -423,6 +423,14 @@ mme_tu104_next_inst_can_add_mthd(struct mme_tu104_builder *tb, return false; } + /* We can't have a mthd in an op with STATE */ + struct mme_tu104_inst *cur = mme_tu104_cur_inst(tb); + if (((tb->inst_parts & MME_TU104_INSTR_PART_ALU0) && + cur->alu[0].op == MME_TU104_ALU_OP_STATE) || + ((tb->inst_parts & MME_TU104_INSTR_PART_ALU1) && + cur->alu[1].op == MME_TU104_ALU_OP_STATE)) + return false; + if (out == MME_TU104_OUT_OP_IMM0 && (tb->inst_parts & MME_TU104_INSTR_PART_IMM0) && (tb->inst_parts & MME_TU104_INSTR_PART_IMM1))