media: allegro: fix log2_max_poc in firmware 2019.1
authorMichael Tretter <m.tretter@pengutronix.de>
Thu, 3 Dec 2020 11:00:55 +0000 (12:00 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 Jan 2021 15:06:19 +0000 (16:06 +0100)
commite7cd90988b9d03c3a886a23f015c41c71371bc4f
tree3c5c4b61a80aea063b70125535e4be4edff8a1f4
parent83a4b7fd7f6f95da2905b7751cec4ad4dc6c222f
media: allegro: fix log2_max_poc in firmware 2019.1

The log2_max_poc field is used to set log2_max_pic_order_cnt_lsb_minus4
for the coded stream. It has an allowed range of 0 to 12.

param contains the value without the minus4, but since firmware
version 2019.1, the value has to be log2_max_pic_order_cnt_lsb - 1,
presumably to fit the maximum value of 16 into a 4 bit field.

The driver does not support firmware version 2019.1. Thus, change the
behaviour starting from firmware version 2019.2.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/allegro-dvt/allegro-mail.c