media: mtk-vcodec: venc: handle firmware version field
authorAlexandre Courbot <acourbot@chromium.org>
Fri, 21 Aug 2020 10:35:56 +0000 (12:35 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:04:39 +0000 (10:04 +0200)
commitc2bc04560ce0b4297f3ea2fec4e4f19848b9d11e
tree9c9cf0ee9f89a2a2f752b057dc175e49fd33ef28
parent0dc4b3286125797a3ff03c4e3d7522e6bebadf63
media: mtk-vcodec: venc: handle firmware version field

Firmwares for encoders 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 is reserved and thus undefined ; 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>
Acked-by: Tiffany Lin <tiffany.lin@mediatek.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_drv.h
drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
drivers/media/platform/mtk-vcodec/venc_ipi_msg.h
drivers/media/platform/mtk-vcodec/venc_vpu_if.c