Skip to contentSkip to conversation

media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail

PATCH Superseded Yunfei Dong 2 participants 2 messages Apr 1, 2022 – Apr 5, 2022

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Yunfei Dong

author maintainer
#0 lore raw

PATCH v2 1/1 media: mediatek: vcodec: Fix v4l2 compliance decoder cmd test fail

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")

---
changes compared with v1:
- add Fixes: tag

---
 drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +1 -2
index 3859e4c651c6..69b0e797d342 100644
@@ -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);
 }
Signature · 1 line
2.18.0
maintainer Reviewed-by on v2 1/1
#1 lore raw

Il 01/04/22 10:13, Yunfei Dong ha scritto:

Quoted 8 lines

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")