[PATCH 0/2] mailbox: mtk-cmdq: Fix error resume address and early task completion

From: Jason-JH Lin

Date: Tue Dec 01 2026 - 06:27:49 EST


From: Jason-jh Lin <jason-jh.lin@xxxxxxxxxxxx>

This series fixes two problems in the CMDQ mailbox driver's thread irq
handling.

Patch 1 makes the error path use cmdq_convert_gce_addr() when it
resumes the thread at the next task, so mminfra_offset is applied like
in every other write to CMDQ_THR_CURR_ADDR. Without it the thread
resumes from a wrong PC on SoCs with a non-zero mminfra_offset, such as
MT8196.

Patch 2 makes the irq handler wait until GCE has taken the trailing
jump of a finished task before completing it. A client that frees the
task buffer in its callback could otherwise cause an SMMU read fault
when GCE fetches the jump from the freed buffer.

The two patches touch adjacent code in cmdq_task_handle_error() and
need to be applied in this order.

Jason-jh Lin (1):
mailbox: mtk-cmdq: Add mminfra_offset to the error resume address

Olivia Wen (1):
mailbox: mtk-cmdq: Wait for GCE to take the chained jump

drivers/mailbox/mtk-cmdq-mailbox.c | 50 +++++++++++++++++++++++++++++-
1 file changed, 49 insertions(+), 1 deletion(-)

--
2.43.0