2020-07-07 15:47:29

by Dennis-YC Hsieh

[permalink] [raw]
Subject: [PATCH v3 1/9] soc: mediatek: cmdq: add address shift in jump

Add address shift when compose jump instruction
to compatible with 35bit format.

Change since v1:
- Rename cmdq_mbox_shift() to cmdq_get_shift_pa().

Signed-off-by: Dennis YC Hsieh <[email protected]>
---
drivers/soc/mediatek/mtk-cmdq-helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
index dc644cfb6419..9faf78fbed3a 100644
--- a/drivers/soc/mediatek/mtk-cmdq-helper.c
+++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
@@ -329,7 +329,8 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt)

/* JUMP to end */
inst.op = CMDQ_CODE_JUMP;
- inst.value = CMDQ_JUMP_PASS;
+ inst.value = CMDQ_JUMP_PASS >>
+ cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan);
err = cmdq_pkt_append_command(pkt, inst);

return err;
--
1.7.9.5


2020-07-08 07:29:59

by Bibby Hsieh

[permalink] [raw]
Subject: Re: [PATCH v3 1/9] soc: mediatek: cmdq: add address shift in jump

Reviewed-by: Bibby Hsieh <[email protected]>


On Tue, 2020-07-07 at 23:45 +0800, Dennis YC Hsieh wrote:
> Add address shift when compose jump instruction
> to compatible with 35bit format.
>
> Change since v1:
> - Rename cmdq_mbox_shift() to cmdq_get_shift_pa().
>
> Signed-off-by: Dennis YC Hsieh <[email protected]>
> ---
> drivers/soc/mediatek/mtk-cmdq-helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index dc644cfb6419..9faf78fbed3a 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -329,7 +329,8 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
>
> /* JUMP to end */
> inst.op = CMDQ_CODE_JUMP;
> - inst.value = CMDQ_JUMP_PASS;
> + inst.value = CMDQ_JUMP_PASS >>
> + cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan);
> err = cmdq_pkt_append_command(pkt, inst);
>
> return err;

2020-09-21 16:16:45

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH v3 1/9] soc: mediatek: cmdq: add address shift in jump



On 07/07/2020 17:45, Dennis YC Hsieh wrote:
> Add address shift when compose jump instruction
> to compatible with 35bit format.
>
> Change since v1:
> - Rename cmdq_mbox_shift() to cmdq_get_shift_pa().
>
> Signed-off-by: Dennis YC Hsieh <[email protected]>

Now pushed to v5.9-next/soc

Thanks!

> ---
> drivers/soc/mediatek/mtk-cmdq-helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/soc/mediatek/mtk-cmdq-helper.c b/drivers/soc/mediatek/mtk-cmdq-helper.c
> index dc644cfb6419..9faf78fbed3a 100644
> --- a/drivers/soc/mediatek/mtk-cmdq-helper.c
> +++ b/drivers/soc/mediatek/mtk-cmdq-helper.c
> @@ -329,7 +329,8 @@ int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
>
> /* JUMP to end */
> inst.op = CMDQ_CODE_JUMP;
> - inst.value = CMDQ_JUMP_PASS;
> + inst.value = CMDQ_JUMP_PASS >>
> + cmdq_get_shift_pa(((struct cmdq_client *)pkt->cl)->chan);
> err = cmdq_pkt_append_command(pkt, inst);
>
> return err;
>