hantro: h264: Refuse to decode unsupported bitstream
authorEzequiel Garcia <ezequiel@collabora.com>
Thu, 9 Jul 2020 16:36:35 +0000 (18:36 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 11:37:49 +0000 (13:37 +0200)
commitd70cca7323442026e20c474314518c446cb4766f
treeab960b5d3d8671c433a54dde6a979ebcbdffb9fa
parent9363aa33f6a9acfd16f98c749f17f6c65d184670
hantro: h264: Refuse to decode unsupported bitstream

The hardware only supports 4:2:0 or 4:0:0 (monochrome),
8-bit depth content.

Verify that the SPS refers to a supported bitstream, and refuse
unsupported bitstreams by failing at TRY_EXT_CTRLS time.

Given the JPEG compression level control is the only one
that needs setting, a specific ops is provided.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/hantro/hantro_drv.c