linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
	 Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	 Mauro Carvalho Chehab <mchehab@kernel.org>,
	 Hans Verkuil <hverkuil@xs4all.nl>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	 Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	 Yunfei Dong <yunfei.dong@mediatek.com>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-mediatek@lists.infradead.org, kernel@collabora.com,
	 linux-media@vger.kernel.org,
	 Sebastian Fricke <sebastian.fricke@collabora.com>,
	 Nicolas Dufresne <nicolas.dufresne@collabora.com>
Subject: [PATCH v3 5/5] media: mtk-vcodec: Don't try to decode 422/444 VP9
Date: Wed, 04 Jun 2025 16:09:39 -0400	[thread overview]
Message-ID: <20250604-sebastianfricke-vcodec_manual_request_completion_with_state_machine-v3-5-603db4749d90@collabora.com> (raw)
In-Reply-To: <20250604-sebastianfricke-vcodec_manual_request_completion_with_state_machine-v3-0-603db4749d90@collabora.com>

This is not supported by the hardware and trying to decode
these leads to LAT timeout errors.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
 .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c     | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
index eea0050eacc1c41abd8e0a1cd546c1ecce90a311..65bd344a12f65d4cb3a81d34f41710f0089a2349 100644
--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c
@@ -551,6 +551,12 @@ static int mtk_vdec_s_ctrl(struct v4l2_ctrl *ctrl)
 			mtk_v4l2_vdec_err(ctx, "VP9: bit_depth:%d", frame->bit_depth);
 			return -EINVAL;
 		}
+
+		if (!(frame->flags & V4L2_VP9_FRAME_FLAG_X_SUBSAMPLING) ||
+		    !(frame->flags & V4L2_VP9_FRAME_FLAG_Y_SUBSAMPLING)) {
+			mtk_v4l2_vdec_err(ctx, "VP9: only 420 subsampling is supported");
+			return -EINVAL;
+		}
 		break;
 	case V4L2_CID_STATELESS_AV1_SEQUENCE:
 		seq = (struct v4l2_ctrl_av1_sequence *)hdr_ctrl->p_new.p;

-- 
2.49.0


      parent reply	other threads:[~2025-06-04 20:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 20:09 [PATCH v3 0/5] Add manual request completion to the MediaTek VCodec driver Nicolas Dufresne
2025-06-04 20:09 ` [PATCH v3 1/5] media: mc: add manual request completion Nicolas Dufresne
2025-06-04 21:04   ` Sakari Ailus
2025-06-04 23:19     ` Nicolas Dufresne
2025-06-05  6:51       ` Sakari Ailus
2025-06-05  9:37         ` Hans Verkuil
2025-06-05  9:48           ` Sakari Ailus
2025-06-05 12:41             ` Nicolas Dufresne
2025-06-09  9:42               ` Sakari Ailus
2025-06-09  9:49                 ` Hans Verkuil
2025-06-04 20:09 ` [PATCH v3 2/5] media: vicodec: add support for manual completion Nicolas Dufresne
2025-06-04 20:09 ` [PATCH v3 3/5] media: mc: add debugfs node to keep track of requests Nicolas Dufresne
2025-06-04 21:33   ` Sakari Ailus
2025-06-04 23:08     ` Nicolas Dufresne
2025-06-09 10:28       ` Sakari Ailus
2025-06-09 10:46         ` Hans Verkuil
2025-06-04 20:09 ` [PATCH v3 4/5] media: vcodec: Implement manual request completion Nicolas Dufresne
2025-06-11  8:33   ` AngeloGioacchino Del Regno
2025-06-04 20:09 ` Nicolas Dufresne [this message]

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=20250604-sebastianfricke-vcodec_manual_request_completion_with_state_machine-v3-5-603db4749d90@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.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=sakari.ailus@linux.intel.com \
    --cc=sebastian.fricke@collabora.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=yunfei.dong@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).