diff options
author | Chun-Kuang Hu <chunkuang.hu@kernel.org> | 2024-02-22 16:41:13 +0100 |
---|---|---|
committer | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2024-04-23 12:16:54 +0200 |
commit | 3d86ced95d8c09d11c172f542edd40f58a4098fa (patch) | |
tree | 6e6feb79492e4a9f21bc92091a28b73f6e9673c6 /drivers/soc/mediatek | |
parent | soc: mediatek: cmdq: Add cmdq_pkt_jump_rel() helper function (diff) | |
download | linux-3d86ced95d8c09d11c172f542edd40f58a4098fa.tar.xz linux-3d86ced95d8c09d11c172f542edd40f58a4098fa.zip |
soc: mediatek: cmdq: Add cmdq_pkt_eoc() helper function
cmdq_pkt_eoc() append eoc command to CMDQ packet. eoc command
would ask GCE to generate IRQ. It's usually appended to the end
of packet to notify all command in the packet is done.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Link: https://lore.kernel.org/r/20240222154120.16959-6-chunkuang.hu@kernel.org
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Diffstat (limited to 'drivers/soc/mediatek')
-rw-r--r-- | drivers/soc/mediatek/mtk-cmdq-helper.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c index 678db09983d4..766dbafaef62 100644 --- a/drivers/soc/mediatek/mtk-cmdq-helper.c +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c @@ -414,6 +414,16 @@ int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset, u8 shift_pa) } EXPORT_SYMBOL(cmdq_pkt_jump_rel); +int cmdq_pkt_eoc(struct cmdq_pkt *pkt) +{ + struct cmdq_instruction inst = { {0} }; + + inst.op = CMDQ_CODE_EOC; + inst.value = CMDQ_EOC_IRQ_EN; + return cmdq_pkt_append_command(pkt, inst); +} +EXPORT_SYMBOL(cmdq_pkt_eoc); + int cmdq_pkt_finalize(struct cmdq_pkt *pkt) { struct cmdq_instruction inst = { {0} }; |