media: mtk-vcodec: vdec: handle firmware version field

Firmwares for decoders newer than MT8173 will include an ABI version
number in their initialization ack message. Add the capacity to manage
it and make initialization fail if the firmware ABI is of a version that
we don't support.

For MT8173, this ABI version field does not exist ; thus ignore it on
this chip. There should only be one firmware version available for it
anyway.

Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Tzung-Bi Shih <tzungbi@google.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Alexandre Courbot
2021-08-06 06:15:23 +02:00
committed by Mauro Carvalho Chehab
parent fd00d90330
commit 34754adb8e
4 changed files with 29 additions and 2 deletions

View File

@@ -328,6 +328,8 @@ enum mtk_chip {
* @vdec_framesizes: supported video decoder frame sizes
* @num_framesizes: count of video decoder frame sizes
*
* @chip: chip this decoder is compatible with
*
* @uses_stateless_api: whether the decoder uses the stateless API with requests
*/
@@ -347,6 +349,8 @@ struct mtk_vcodec_dec_pdata {
const struct mtk_codec_framesizes *vdec_framesizes;
const int num_framesizes;
enum mtk_chip chip;
bool uses_stateless_api;
};