media: mtk-vcodec: vdec: handle firmware version field
authorAlexandre Courbot <acourbot@chromium.org>
Fri, 6 Aug 2021 04:15:23 +0000 (06:15 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 30 Sep 2021 08:07:41 +0000 (10:07 +0200)
commit34754adb8eba715b054b2c6e243eec526a5e856c
tree251e6a2ed290f927ee7e2fe42335b882f38f2f3e
parentfd00d90330d1d2a962d010fc93515e2d77739ad8
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>
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_stateful.c
drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h
drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h
drivers/media/platform/mtk-vcodec/vdec_vpu_if.c