]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function
authorChun-Kuang Hu <chunkuang.hu@kernel.org>
Sun, 1 Sep 2024 14:32:59 +0000 (14:32 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Fri, 13 Dec 2024 16:30:58 +0000 (17:30 +0100)
In order to have fine-grained control, use cmdq_pkt_eoc() and
cmdq_pkt_jump_rel() to replace cmdq_pkt_finalize().

Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/soc/mediatek/mtk-cmdq-helper.c
include/linux/soc/mediatek/mtk-cmdq.h

index 0a05ee87a0fce836f16a0a86508bd72e50b8e801..455221e8de24f27e8ed9c8957eec5f638b94d5d6 100644 (file)
@@ -524,23 +524,5 @@ int cmdq_pkt_eoc(struct cmdq_pkt *pkt)
 }
 EXPORT_SYMBOL(cmdq_pkt_eoc);
 
-int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
-{
-       struct cmdq_instruction inst = { {0} };
-       int err;
-
-       /* insert EOC and generate IRQ for each command iteration */
-       err = cmdq_pkt_eoc(pkt);
-       if (err < 0)
-               return err;
-
-       /* JUMP to end */
-       inst.op = CMDQ_CODE_JUMP;
-       inst.value = CMDQ_JUMP_PASS >>
-               cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan);
-       return cmdq_pkt_append_command(pkt, inst);
-}
-EXPORT_SYMBOL(cmdq_pkt_finalize);
-
 MODULE_DESCRIPTION("MediaTek Command Queue (CMDQ) driver");
 MODULE_LICENSE("GPL v2");
index 5bee6f7fc400e6681c3b8a8e88dd3cae4a47f902..0c3906e8ad19c56cc06ac2742260df53bbbeaa75 100644 (file)
@@ -391,14 +391,6 @@ int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset, u8 shift_pa);
  */
 int cmdq_pkt_eoc(struct cmdq_pkt *pkt);
 
-/**
- * cmdq_pkt_finalize() - Append EOC and jump command to pkt.
- * @pkt:       the CMDQ packet
- *
- * Return: 0 for success; else the error code is returned
- */
-int cmdq_pkt_finalize(struct cmdq_pkt *pkt);
-
 #else /* IS_ENABLED(CONFIG_MTK_CMDQ) */
 
 static inline int cmdq_dev_get_client_reg(struct device *dev,
@@ -519,11 +511,6 @@ static inline int cmdq_pkt_eoc(struct cmdq_pkt *pkt)
        return -EINVAL;
 }
 
-static inline int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
-{
-       return -EINVAL;
-}
-
 #endif /* IS_ENABLED(CONFIG_MTK_CMDQ) */
 
 #endif /* __MTK_CMDQ_H__ */