<html><body><p>
<pre>
Hi, Benjamin:

On Thu, 2024-06-06 at 14:09 +0200, Benjamin Gaignard wrote:
> Le 22/02/2024 à 16:41, Chun-Kuang Hu a écrit :
> > 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>
> > ---
> > drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 3 ++-
> > drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c | 2 ++
> > drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h | 1 +
> > 3 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> > index 6adac857a477..b720e69b341d 100644
> > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-cmdq.c
> > @@ -471,7 +471,8 @@ int mdp_cmdq_send(struct mdp_dev *mdp, struct mdp_cmdq_param *param)
> > dev_err(dev, "mdp_path_config error\n");
> > goto err_free_path;
> > }
> > -cmdq_pkt_finalize(&cmd->pkt);
> > +cmdq_pkt_eoc(&cmd->pkt);
> > +cmdq_pkt_jump_rel(&cmd->pkt, CMDQ_INST_SIZE, mdp->cmdq_shift_pa);
> >
> > for (i = 0; i < num_comp; i++)
> > memcpy(&comps[i], path->comps[i].comp,
> > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
> > index 94f4ed78523b..2214744c937c 100644
> > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
> > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.c
> > @@ -231,6 +231,8 @@ static int mdp_probe(struct platform_device *pdev)
> > goto err_put_scp;
> > }
> >
> > +mdp->cmdq_shift_pa = cmdq_get_shift_pa(mdp->cmdq_clt->chan);
> > +
> > init_waitqueue_head(&mdp->callback_wq);
> > ida_init(&mdp->mdp_ida);
> > platform_set_drvdata(pdev, mdp);
> > diff --git a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h
> > index 7e21d226ceb8..ed61e0bb69ee 100644
> > --- a/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h
> > +++ b/drivers/media/platform/mediatek/mdp3/mtk-mdp3-core.h
> > @@ -83,6 +83,7 @@ struct mdp_dev {
> > u32id_count;
> > struct idamdp_ida;
> > struct cmdq_client*cmdq_clt;
> > +u8cmdq_shift_pa;
>
> Can send a new version of this series because this patch can't
> be applied on media_tree/master branch.
> The code look correct for me but we need to be able to applied it
> to perform more checks.

New version has been sent.

[1] https://patchwork.kernel.org/project/linux-media/patch/20240810090918.7457-4-chunkuang.hu@kernel.org/

Regards,
CK

>
> Regards,
> Benjamin
>
> > wait_queue_head_tcallback_wq;
> >
> > struct v4l2_devicev4l2_dev;
>
>

</pre>
</p></body></html><!--type:text--><!--{--><pre>************* MEDIATEK Confidentiality Notice ********************
The information contained in this e-mail message (including any 
attachments) may be confidential, proprietary, privileged, or otherwise
exempt from disclosure under applicable laws. It is intended to be 
conveyed only to the designated recipient(s). Any use, dissemination, 
distribution, printing, retaining or copying of this e-mail (including its 
attachments) by unintended recipient(s) is strictly prohibited and may 
be unlawful. If you are not an intended recipient of this e-mail, or believe 
that you have received this e-mail in error, please notify the sender 
immediately (by replying to this e-mail), delete any and all copies of 
this e-mail (including any attachments) from your system, and do not
disclose the content of this e-mail to any other person. Thank you!
</pre><!--}-->