lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6f6c2bb63b4d0a2a5efa295b756ccfda5a0f3ac4.camel@mediatek.com>
Date: Wed, 21 Aug 2024 03:44:00 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: "linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
	Jason-JH Lin (林睿祥) <Jason-JH.Lin@...iatek.com>,
	"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>, "mchehab@...nel.org"
	<mchehab@...nel.org>, Moudy Ho (何宗原)
	<Moudy.Ho@...iatek.com>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "benjamin.gaignard@...labora.com"
	<benjamin.gaignard@...labora.com>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com"
	<matthias.bgg@...il.com>, "angelogioacchino.delregno@...labora.com"
	<angelogioacchino.delregno@...labora.com>
Subject: Re: [PATCH v2 10/12] media: platform: mtk-mdp3: Get fine-grain
 control of cmdq_pkt_finalize()

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@...nel.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 {
> >   	u32					id_count;
> >   	struct ida				mdp_ida;
> >   	struct cmdq_client			*cmdq_clt;
> > +	u8					cmdq_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_t			callback_wq;
> >   
> >   	struct v4l2_device			v4l2_dev;
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ