]> git.baikalelectronics.ru Git - kernel.git/commit
media: allegro: add explicit mail encoding and decoding
authorMichael Tretter <m.tretter@pengutronix.de>
Mon, 13 Jul 2020 14:42:20 +0000 (16:42 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 12:00:31 +0000 (14:00 +0200)
commit9d9c076d4cc38ca290e75243323f972853a8ff9b
tree08e23e0e798acc0fb0fdf04849c8eef46ea49f5b
parent1a40ecdfb251c57d02a2b127f387933befb970ce
media: allegro: add explicit mail encoding and decoding

The message format in the mailboxes differ between firmware versions.
Therefore, it is necessary to decouple the mailbox format of the driver
from the message format of the firmware. This allows to keep a
consistent message format in the driver while still supporting various
firmware versions.

Add an intermediate step to encode and decode message before writing the
mails to the mailboxes.

On the other hand, this allows to handle optional fields in the
messages, which is required for advanced features of the encoder and was
not possible until now.

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/staging/media/allegro-dvt/allegro-core.c
drivers/staging/media/allegro-dvt/allegro-mail.c
drivers/staging/media/allegro-dvt/allegro-mail.h