devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "yunfei.dong@mediatek.com" <yunfei.dong@mediatek.com>
To: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Alexandre Courbot <acourbot@chromium.org>,
	Nicolas Dufresne <nicolas@ndufresne.ca>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tomasz Figa <tfiga@google.com>
Cc: George Sun <george.sun@mediatek.com>,
	Xiaoyong Lu <xiaoyong.lu@mediatek.com>,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	"Fritz Koenig" <frkoenig@chromium.org>,
	Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Irui Wang <irui.wang@mediatek.com>,
	"Steve Cho" <stevecho@chromium.org>,
	<linux-media@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<srv_heupstream@mediatek.com>,
	<linux-mediatek@lists.infradead.org>,
	<Project_Global_Chrome_Upstream_Group@mediatek.com>
Subject: Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
Date: Sat, 23 Apr 2022 15:34:02 +0800	[thread overview]
Message-ID: <ad60061db14c9f08e6b1aed3389d3744d8a12be0.camel@mediatek.com> (raw)
In-Reply-To: <678a06f5-0519-dab3-35ac-5915b47d422e@xs4all.nl>

Hi Hans,

Thanks for your suggestion, I will resend patch v4 according to your
suggestion.

Best Regards,
Yunfei Dong
On Thu, 2022-04-21 at 12:47 +0200, Hans Verkuil wrote:
> On 06/04/2022 03:20, Yunfei Dong wrote:
> > Will return -EINVAL using standard framework api when test
> > stateless
> > decoder with cmd VIDIOC_(TRY)DECODER_CMD.
> > 
> > Using another return value to adjust v4l2 compliance test for user
> > driver(GStreamer/Chrome) won't use decoder cmd.
> > 
> > Fixes: 8cdc3794b2e3 ("media: mtk-vcodec: vdec: support stateless
> > API")
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> > Reviewed-by: AngeloGioacchino Del Regno <
> > angelogioacchino.delregno@collabora.com>
> > ---
> > changes compared with v2:
> > - add reviewed-by tag
> > changes compared with v1:
> > - add Fixes: tag
> > ---
> >  drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git
> > a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > index 3859e4c651c6..69b0e797d342 100644
> > --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c
> > @@ -51,8 +51,7 @@ static int vidioc_try_decoder_cmd(struct file
> > *file, void *priv,
> >  
> >  	/* Use M2M stateless helper if relevant */
> >  	if (ctx->dev->vdec_pdata->uses_stateless_api)
> > -		return v4l2_m2m_ioctl_stateless_try_decoder_cmd(file,
> > priv,
> > -								cmd);
> > +		return -ENOTTY;
> >  	else
> >  		return v4l2_m2m_ioctl_try_decoder_cmd(file, priv, cmd);
> >  }
> 
> So in other words, if the stateless api is used, then
> (TRY_)DECODER_CMD
> is not implemented. And that's because this driver doesn't set the
> V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability as that's not
> needed.
> And so there is no need for (TRY_)DECODER_CMD to be implemented.
> 
> If that's the case, then it is much better to just disable these two
> ioctls with v4l2_disable_ioctl() if the stateless API is used.
> 
> And just drop the uses_stateless_api checks in both
> vidioc_try_decoder_cmd
> and vidioc_decoder_cmd. This patch only changed
> vidioc_try_decoder_cmd,
> but of course vidioc_decoder_cmd needs to be modified as well.
> 
> Regards,
> 
> 	Hans


  reply	other threads:[~2022-04-23  7:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06  1:20 [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail Yunfei Dong
2022-04-06 13:14 ` Nicolas Dufresne
2022-04-21 10:47 ` Hans Verkuil
2022-04-23  7:34   ` yunfei.dong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-04-01  3:04 [PATCH] media: mediatek: vcodec: fix " Yunfei Dong
2022-04-01  7:50 ` AngeloGioacchino Del Regno
2022-04-01  8:27   ` yunfei.dong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ad60061db14c9f08e6b1aed3389d3744d8a12be0.camel@mediatek.com \
    --to=yunfei.dong@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frkoenig@chromium.org \
    --cc=george.sun@mediatek.com \
    --cc=hsinyi@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=irui.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=nicolas@ndufresne.ca \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=stevecho@chromium.org \
    --cc=tfiga@google.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=xiaoyong.lu@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).