History log of /linux-master/drivers/media/platform/allegro-dvt/allegro-mail.c
Revision Date Author Comments
# 41c4c6fd 23-Sep-2023 Hans Verkuil <hverkuil-cisco@xs4all.nl>

media: allegro-dvt: increase buffer size in msg_type_name()

Fixes this compile error

drivers/media/platform/allegro-dvt/allegro-mail.c: In function 'msg_type_name':
drivers/media/platform/allegro-dvt/allegro-mail.c:37:48: warning: '%04x' directive output may be truncated writing between 4 and 8 bytes into a region of size 6 [-Wformat-truncation=]
37 | snprintf(buf, sizeof(buf), "(0x%04x)", type);
| ^~~~
drivers/media/platform/allegro-dvt/allegro-mail.c:37:44: note: directive argument in the range [1, 4294967295]
37 | snprintf(buf, sizeof(buf), "(0x%04x)", type);
| ^~~~~~~~~~
drivers/media/platform/allegro-dvt/allegro-mail.c:37:17: note: 'snprintf' output between 9 and 13 bytes into a destination of size 9
37 | snprintf(buf, sizeof(buf), "(0x%04x)", type);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Michael Tretter <m.tretter@pengutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>


# 436ee4b5 08-Sep-2021 Michael Tretter <m.tretter@pengutronix.de>

media: allegro: fix row and column in response message

The fields for the number of rows and columns in the encode frame
response message are switched. This causes broken PPS, if the encoder
uses tiles for encoding and the number of rows and columns differ.

Write the fields of the response message into the correct fields of the
the internal data structure when parsing the response message.

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>


# 98f1cbf6 08-Sep-2021 Michael Tretter <m.tretter@pengutronix.de>

media: allegro: add encoder buffer support

The encoder buffer serves as a cache for reference frames during the
encoding process. The encoder buffer significantly reduces the bandwidth
requirement for read accesses on the AXI ports of the VCU, but slightly
reduces the quality of the encoded video.

The encoder buffer must be configured as a whole during the firmware
initialization and later explicitly enabled for every channel that shall
use the encoder buffer.

Prior to firmware version 2019.2, it was necessary to explicitly set the
size of the encoder buffer for every channel. Since 2019.2 it is
sufficient to enable the encoder buffer and leave the rest to the
firmware. Therefore, only support the encoder buffer for firmware 2019.2
and later.

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>


# b08797d1 02-Dec-2020 Michael Tretter <m.tretter@pengutronix.de>

media: allegro: add support for HEVC encoding

The Allegro Codec supports HEVC encoding. The messages to the MCU are
the same for H.264 and HEVC, but some options have to be changed. These
are actually only a few options.

The driver, however, must add the HEVC VPS/SPS/PPS NAL Units to the
coded stream and must properly provide the HEVC format and controls to
user space.

[hverkuil: fix warning for wrong enum type (h264 instead of hevc)]

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>


# e7cd9098 02-Dec-2020 Michael Tretter <m.tretter@pengutronix.de>

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>


# ecd07f4b 02-Dec-2020 Michael Tretter <m.tretter@pengutronix.de>

media: allegro: rename stream_id to dst_handle

The dst_handle field in the PUT_STREAM_BUFFER and ENCODE_FRAME_RESPONSE
is used to retrieve the V4L2 CAPTURE buffer. Calling it stream_id is
confusing. Call it dst_handle inspired by src_handle for the OUTPUT
buffer.

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>


# d74d4e23 02-Dec-2020 Michael Tretter <m.tretter@pengutronix.de>

media: allegro: move driver out of staging

The stateful encoder API was finalized. Nothing is blocking the driver
from being moved out of staging.

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>