* [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 3:04 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-01 3:04 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Dafna Hirschfeld, Daniel Vetter, dri-devel, Irui Wang, Steve Cho,
linux-media, devicetree, linux-kernel, linux-arm-kernel,
srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
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 decode cmd.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
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);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 3:04 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-01 3:04 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Irui Wang, George Sun, Dafna Hirschfeld, srv_heupstream,
devicetree, Project_Global_Chrome_Upstream_Group, linux-kernel,
dri-devel, Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang,
Fritz Koenig, Steve Cho, linux-arm-kernel, linux-media
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 decode cmd.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
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);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 3:04 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-01 3:04 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Dafna Hirschfeld, Daniel Vetter, dri-devel, Irui Wang, Steve Cho,
linux-media, devicetree, linux-kernel, linux-arm-kernel,
srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
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 decode cmd.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
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);
}
--
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 3:04 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-01 3:04 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Dafna Hirschfeld, Daniel Vetter, dri-devel, Irui Wang, Steve Cho,
linux-media, devicetree, linux-kernel, linux-arm-kernel,
srv_heupstream, linux-mediatek,
Project_Global_Chrome_Upstream_Group
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 decode cmd.
Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
---
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);
}
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
2022-04-01 3:04 ` Yunfei Dong
(?)
(?)
@ 2022-04-01 7:50 ` AngeloGioacchino Del Regno
-1 siblings, 0 replies; 28+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-01 7:50 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Il 01/04/22 05:04, Yunfei Dong ha scritto:
> 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 decode cmd.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Hello Yunfei,
this patch is a fix.. hence, this needs an appropriate Fixes: tag.
Please add one.
Thanks,
Angelo
> ---
> 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);
> }
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 7:50 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 28+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-01 7:50 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: Irui Wang, George Sun, Steve Cho, srv_heupstream, devicetree,
Project_Global_Chrome_Upstream_Group, linux-kernel, dri-devel,
Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang, Fritz Koenig,
linux-arm-kernel, linux-media
Il 01/04/22 05:04, Yunfei Dong ha scritto:
> 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 decode cmd.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Hello Yunfei,
this patch is a fix.. hence, this needs an appropriate Fixes: tag.
Please add one.
Thanks,
Angelo
> ---
> 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);
> }
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 7:50 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 28+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-01 7:50 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Il 01/04/22 05:04, Yunfei Dong ha scritto:
> 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 decode cmd.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Hello Yunfei,
this patch is a fix.. hence, this needs an appropriate Fixes: tag.
Please add one.
Thanks,
Angelo
> ---
> 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);
> }
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 7:50 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 28+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-04-01 7:50 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Il 01/04/22 05:04, Yunfei Dong ha scritto:
> 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 decode cmd.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
Hello Yunfei,
this patch is a fix.. hence, this needs an appropriate Fixes: tag.
Please add one.
Thanks,
Angelo
> ---
> 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);
> }
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
2022-04-01 7:50 ` AngeloGioacchino Del Regno
(?)
(?)
@ 2022-04-01 8:27 ` yunfei.dong
-1 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-01 8:27 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Alexandre Courbot, Nicolas Dufresne,
Hans Verkuil, Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Hi AngeloGioacchino,
Thanks for your suggestion.
On Fri, 2022-04-01 at 09:50 +0200, AngeloGioacchino Del Regno wrote:
> Il 01/04/22 05:04, Yunfei Dong ha scritto:
> > 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 decode cmd.
> >
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>
> Hello Yunfei,
>
> this patch is a fix.. hence, this needs an appropriate Fixes: tag.
> Please add one.
>
Add "Fixes: " in patch v2.
> Thanks,
> Angelo
>
Thanks,
Yunfei Dong
> > ---
> > 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);
> > }
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 8:27 ` yunfei.dong
0 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-01 8:27 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Alexandre Courbot, Nicolas Dufresne,
Hans Verkuil, Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Hi AngeloGioacchino,
Thanks for your suggestion.
On Fri, 2022-04-01 at 09:50 +0200, AngeloGioacchino Del Regno wrote:
> Il 01/04/22 05:04, Yunfei Dong ha scritto:
> > 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 decode cmd.
> >
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>
> Hello Yunfei,
>
> this patch is a fix.. hence, this needs an appropriate Fixes: tag.
> Please add one.
>
Add "Fixes: " in patch v2.
> Thanks,
> Angelo
>
Thanks,
Yunfei Dong
> > ---
> > 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);
> > }
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 8:27 ` yunfei.dong
0 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-01 8:27 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Alexandre Courbot, Nicolas Dufresne,
Hans Verkuil, Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: Irui Wang, George Sun, Steve Cho, srv_heupstream, devicetree,
Project_Global_Chrome_Upstream_Group, linux-kernel, dri-devel,
Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang, Fritz Koenig,
linux-arm-kernel, linux-media
Hi AngeloGioacchino,
Thanks for your suggestion.
On Fri, 2022-04-01 at 09:50 +0200, AngeloGioacchino Del Regno wrote:
> Il 01/04/22 05:04, Yunfei Dong ha scritto:
> > 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 decode cmd.
> >
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>
> Hello Yunfei,
>
> this patch is a fix.. hence, this needs an appropriate Fixes: tag.
> Please add one.
>
Add "Fixes: " in patch v2.
> Thanks,
> Angelo
>
Thanks,
Yunfei Dong
> > ---
> > 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);
> > }
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail
@ 2022-04-01 8:27 ` yunfei.dong
0 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-01 8:27 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Alexandre Courbot, Nicolas Dufresne,
Hans Verkuil, Benjamin Gaignard, Tiffany Lin, Andrew-CT Chen,
Mauro Carvalho Chehab, Rob Herring, Matthias Brugger,
Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Hi AngeloGioacchino,
Thanks for your suggestion.
On Fri, 2022-04-01 at 09:50 +0200, AngeloGioacchino Del Regno wrote:
> Il 01/04/22 05:04, Yunfei Dong ha scritto:
> > 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 decode cmd.
> >
> > Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
>
> Hello Yunfei,
>
> this patch is a fix.. hence, this needs an appropriate Fixes: tag.
> Please add one.
>
Add "Fixes: " in patch v2.
> Thanks,
> Angelo
>
Thanks,
Yunfei Dong
> > ---
> > 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);
> > }
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
2022-04-21 10:47 ` Hans Verkuil
(?)
(?)
@ 2022-04-23 7:34 ` yunfei.dong
-1 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-23 7:34 UTC (permalink / raw)
To: Hans Verkuil, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-23 7:34 ` yunfei.dong
0 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-23 7:34 UTC (permalink / raw)
To: Hans Verkuil, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Irui Wang, George Sun, Steve Cho, srv_heupstream, devicetree,
Project_Global_Chrome_Upstream_Group, linux-kernel, dri-devel,
Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang, Fritz Koenig,
linux-arm-kernel, linux-media
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-23 7:34 ` yunfei.dong
0 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-23 7:34 UTC (permalink / raw)
To: Hans Verkuil, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-23 7:34 ` yunfei.dong
0 siblings, 0 replies; 28+ messages in thread
From: yunfei.dong @ 2022-04-23 7:34 UTC (permalink / raw)
To: Hans Verkuil, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
2022-04-06 1:20 ` Yunfei Dong
(?)
(?)
@ 2022-04-21 10:47 ` Hans Verkuil
-1 siblings, 0 replies; 28+ messages in thread
From: Hans Verkuil @ 2022-04-21 10:47 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-21 10:47 ` Hans Verkuil
0 siblings, 0 replies; 28+ messages in thread
From: Hans Verkuil @ 2022-04-21 10:47 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Irui Wang, George Sun, Steve Cho, srv_heupstream, devicetree,
Project_Global_Chrome_Upstream_Group, linux-kernel, dri-devel,
Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang, Fritz Koenig,
linux-arm-kernel, linux-media
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
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-21 10:47 ` Hans Verkuil
0 siblings, 0 replies; 28+ messages in thread
From: Hans Verkuil @ 2022-04-21 10:47 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-21 10:47 ` Hans Verkuil
0 siblings, 0 replies; 28+ messages in thread
From: Hans Verkuil @ 2022-04-21 10:47 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
2022-04-06 1:20 ` Yunfei Dong
(?)
(?)
@ 2022-04-06 13:14 ` Nicolas Dufresne
-1 siblings, 0 replies; 28+ messages in thread
From: Nicolas Dufresne @ 2022-04-06 13:14 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Le mercredi 06 avril 2022 à 09:20 +0800, Yunfei Dong a écrit :
> 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>
Acked-by: Nicolas Dufresne <nicolas.dufresne@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);
> }
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 13:14 ` Nicolas Dufresne
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Dufresne @ 2022-04-06 13:14 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Irui Wang, George Sun, Steve Cho, srv_heupstream, devicetree,
Project_Global_Chrome_Upstream_Group, linux-kernel, dri-devel,
Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang, Fritz Koenig,
linux-arm-kernel, linux-media
Le mercredi 06 avril 2022 à 09:20 +0800, Yunfei Dong a écrit :
> 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>
Acked-by: Nicolas Dufresne <nicolas.dufresne@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);
> }
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 13:14 ` Nicolas Dufresne
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Dufresne @ 2022-04-06 13:14 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Le mercredi 06 avril 2022 à 09:20 +0800, Yunfei Dong a écrit :
> 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>
Acked-by: Nicolas Dufresne <nicolas.dufresne@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);
> }
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 13:14 ` Nicolas Dufresne
0 siblings, 0 replies; 28+ messages in thread
From: Nicolas Dufresne @ 2022-04-06 13:14 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
Le mercredi 06 avril 2022 à 09:20 +0800, Yunfei Dong a écrit :
> 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>
Acked-by: Nicolas Dufresne <nicolas.dufresne@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);
> }
^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 1:20 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-06 1:20 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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);
}
--
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 1:20 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-06 1:20 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: Irui Wang, George Sun, Steve Cho, srv_heupstream, devicetree,
Project_Global_Chrome_Upstream_Group, linux-kernel, dri-devel,
Xiaoyong Lu, linux-mediatek, Hsin-Yi Wang, Fritz Koenig,
linux-arm-kernel, linux-media
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);
}
--
2.18.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 1:20 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-06 1:20 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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);
}
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 28+ messages in thread
* [PATCH] media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail
@ 2022-04-06 1:20 ` Yunfei Dong
0 siblings, 0 replies; 28+ messages in thread
From: Yunfei Dong @ 2022-04-06 1:20 UTC (permalink / raw)
To: Yunfei Dong, Alexandre Courbot, Nicolas Dufresne, Hans Verkuil,
AngeloGioacchino Del Regno, Benjamin Gaignard, Tiffany Lin,
Andrew-CT Chen, Mauro Carvalho Chehab, Rob Herring,
Matthias Brugger, Tomasz Figa
Cc: George Sun, Xiaoyong Lu, Hsin-Yi Wang, Fritz Koenig,
Daniel Vetter, dri-devel, Irui Wang, Steve Cho, linux-media,
devicetree, linux-kernel, linux-arm-kernel, srv_heupstream,
linux-mediatek, Project_Global_Chrome_Upstream_Group
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);
}
--
2.18.0
^ permalink raw reply related [flat|nested] 28+ messages in thread
end of thread, other threads:[~2022-04-23 7:45 UTC | newest]
Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-01 3:04 [PATCH] media: mediatek: vcodec: fix v4l2 compliance decoder cmd test fail Yunfei Dong
2022-04-01 3:04 ` Yunfei Dong
2022-04-01 3:04 ` Yunfei Dong
2022-04-01 3:04 ` Yunfei Dong
2022-04-01 7:50 ` AngeloGioacchino Del Regno
2022-04-01 7:50 ` AngeloGioacchino Del Regno
2022-04-01 7:50 ` AngeloGioacchino Del Regno
2022-04-01 7:50 ` AngeloGioacchino Del Regno
2022-04-01 8:27 ` yunfei.dong
2022-04-01 8:27 ` yunfei.dong
2022-04-01 8:27 ` yunfei.dong
2022-04-01 8:27 ` yunfei.dong
2022-04-06 1:20 [PATCH] media: mediatek: vcodec: Fix " Yunfei Dong
2022-04-06 1:20 ` Yunfei Dong
2022-04-06 1:20 ` Yunfei Dong
2022-04-06 1:20 ` Yunfei Dong
2022-04-06 13:14 ` Nicolas Dufresne
2022-04-06 13:14 ` Nicolas Dufresne
2022-04-06 13:14 ` Nicolas Dufresne
2022-04-06 13:14 ` Nicolas Dufresne
2022-04-21 10:47 ` Hans Verkuil
2022-04-21 10:47 ` Hans Verkuil
2022-04-21 10:47 ` Hans Verkuil
2022-04-21 10:47 ` Hans Verkuil
2022-04-23 7:34 ` yunfei.dong
2022-04-23 7:34 ` yunfei.dong
2022-04-23 7:34 ` yunfei.dong
2022-04-23 7:34 ` yunfei.dong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.