Thread (32 messages) 32 messages, 4 authors, 9d ago

Re: [PATCH v6 09/14] media: mediatek: vcodec: add decoder compatible to support mt8196

From: sashiko-bot@kernel.org
Date: 2026-07-20 01:36:07

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The newly added MT8196 chip was added to the `mtk_vcodec_dec_chip_name` enum, but its V4L2 capability limits were not updated in the stateless decoder's control setup, causing the driver to advertise artificially limited fallback capabilities to userspace.
--
--- Patch [9]: [PATCH v6 09/14] media: mediatek: vcodec: add decoder compatible to support mt8196 ---
commit 33685e9d98f41bca9dad07f1a7aa64db22f658cd
Author: Kyrie Wu [off-list ref]

media: mediatek: vcodec: add decoder compatible to support mt8196

MT8196 is lat single core architecture. Support its compatible and
use `mtk_lat_sig_core_pdata` to initialize platform data.
quoted hunk ↗ jump to hunk
diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h
index 15e437323af5a..53d1708b012b7 100644
--- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h
+++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h
@@ -29,6 +29,7 @@ enum mtk_vcodec_dec_chip_name {
 	MTK_VDEC_MT8188 = 8188,
 	MTK_VDEC_MT8192 = 8192,
 	MTK_VDEC_MT8195 = 8195,
+	MTK_VDEC_MT8196 = 8196,
[Severity: High]
Does adding this new chip name without updating the stateless decoder's
control limits restrict the MT8196 capabilities to their lowest defaults?

For example, in drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c:

mtk_vcodec_dec_fill_h265_profile() {
	switch (ctx->dev->chip_name) {
	case MTK_VDEC_MT8188:
	case MTK_VDEC_MT8195:
		cfg->max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10;
		break;
	default:
		cfg->max = V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_STILL_PICTURE;
		break;
	}
}

Will this cause the HEVC max profile for MT8196 to fall to the default
MAIN_STILL_PICTURE limit, preventing standard Main profile and 10-bit decoding?

A similar fallback to defaults seems to occur for MT8196 in:
- mtk_vcodec_dec_fill_h265_level() (limits HEVC level to 4 instead of 5.1/5.2)
- mtk_vcodec_dec_fill_vp9_profile() (limits VP9 to Profile 1)
- mtk_vcodec_dec_fill_h264_level() (limits H.264 to Level 4.1)

Should the MT8196 chip be added to the capability limit setups for the stateless
decoder controls?
 };
-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260720012056.1026551-1-kyrie.wu@mediatek.com?part=9
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help