mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
soc: mediatek: cmdq: Remove cmdq_pkt_finalize() helper function
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>
This commit is contained in:
parent
48df902974
commit
7f78c081d4
@ -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");
|
||||
|
@ -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__ */
|
||||
|
Loading…
Reference in New Issue
Block a user