]> www.infradead.org Git - users/jedix/linux-maple.git/commit
soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation
authorJason-JH.Lin <jason-jh.lin@mediatek.com>
Tue, 25 Jun 2024 08:39:57 +0000 (16:39 +0800)
committerAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Thu, 27 Jun 2024 10:41:51 +0000 (12:41 +0200)
commit58de63ddd0ecc84548b8fd24c72deb3739365c78
treeac54af14ff4a56c45ae2cccd00459ae77b55d9b3
parent7cc069d9286c21e0acb399da26a181bafdca4d7e
soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operation

Add cmdq_pkt_logic_command to support math operation.

cmdq_pkt_logic_command can append logic command to the CMDQ packet,
ask GCE to execute a arithmetic calculate instruction,
such as add, subtract, multiply, AND, OR and NOT, etc.

Note that all arithmetic instructions are unsigned calculations.
If there are any overflows, GCE will sent the invalid IRQ to notify
CMDQ driver.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Signed-off-by: Hsiao Chien Sung <shawn.sung@mediatek.com>
Link: https://lore.kernel.org/r/20240625083957.3540-1-jason-jh.lin@mediatek.com
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
drivers/soc/mediatek/mtk-cmdq-helper.c
include/linux/soc/mediatek/mtk-cmdq.h