forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media: allegro: move mail definitions to separate file
Move the mail definitions from the driver core to a dedicated file. The mails that are exchanged between driver and firmware are not stable across firmware versions. This is in preparation to make the driver able to handle multiple firmware version by having dedicated code for handling mails. Signed-off-by: Michael Tretter <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
- Loading branch information
Showing
4 changed files
with
302 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# SPDX-License-Identifier: GPL-2.0 | ||
|
||
allegro-objs := allegro-core.o nal-h264.o | ||
allegro-objs := allegro-core.o nal-h264.o allegro-mail.o | ||
|
||
obj-$(CONFIG_VIDEO_ALLEGRO_DVT) += allegro.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Copyright (C) 2019 Pengutronix, Michael Tretter <[email protected]> | ||
* | ||
* Helper functions for handling messages that are send via mailbox to the | ||
* Allegro VCU firmware. | ||
*/ | ||
|
||
#include <linux/export.h> | ||
|
||
#include "allegro-mail.h" | ||
|
||
const char *msg_type_name(enum mcu_msg_type type) | ||
{ | ||
static char buf[9]; | ||
|
||
switch (type) { | ||
case MCU_MSG_TYPE_INIT: | ||
return "INIT"; | ||
case MCU_MSG_TYPE_CREATE_CHANNEL: | ||
return "CREATE_CHANNEL"; | ||
case MCU_MSG_TYPE_DESTROY_CHANNEL: | ||
return "DESTROY_CHANNEL"; | ||
case MCU_MSG_TYPE_ENCODE_FRAME: | ||
return "ENCODE_FRAME"; | ||
case MCU_MSG_TYPE_PUT_STREAM_BUFFER: | ||
return "PUT_STREAM_BUFFER"; | ||
case MCU_MSG_TYPE_PUSH_BUFFER_INTERMEDIATE: | ||
return "PUSH_BUFFER_INTERMEDIATE"; | ||
case MCU_MSG_TYPE_PUSH_BUFFER_REFERENCE: | ||
return "PUSH_BUFFER_REFERENCE"; | ||
default: | ||
snprintf(buf, sizeof(buf), "(0x%04x)", type); | ||
return buf; | ||
} | ||
} | ||
EXPORT_SYMBOL(msg_type_name); |
Oops, something went wrong.