coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
panel.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __MIPI_PANEL_H__
4 #define __MIPI_PANEL_H__
5 
6 #include <edid.h>
7 #include <mipi/dsi.h>
8 #include <types.h>
9 
10 /* Definitions for cmd in panel_init_command */
16 };
17 
21  u8 data[];
22 };
23 
24 /*
25  * The data to be serialized and put into CBFS.
26  * Note some fields, for example edid.mode.name, were actually pointers and
27  * cannot be really serialized.
28  */
30  struct edid edid; /* edid info of this panel */
31  u8 init[]; /* A packed array of panel_init_command */
32 };
33 
34 typedef enum cb_err (*mipi_cmd_func_t)(enum mipi_dsi_transaction type, const u8 *data, u8 len);
35 
36 /* Parse a command array and call cmd_func() for each entry. Delays get handled internally. */
37 enum cb_err mipi_panel_parse_init_commands(const void *buf, mipi_cmd_func_t cmd_func);
38 
39 #define PANEL_DCS(...) \
40  PANEL_CMD_DCS, \
41  sizeof((u8[]){__VA_ARGS__}), \
42  __VA_ARGS__
43 
44 #define PANEL_GENERIC(...) \
45  PANEL_CMD_GENERIC, \
46  sizeof((u8[]){__VA_ARGS__}), \
47  __VA_ARGS__
48 
49 #define PANEL_DELAY(delay) \
50  PANEL_CMD_DELAY, \
51  delay
52 
53 #define PANEL_END \
54  PANEL_CMD_END
55 
56 #endif /* __MIPI_PANEL_H__ */
cb_err
coreboot error codes
Definition: cb_err.h:15
mipi_dsi_transaction
Definition: dsi.h:7
panel_init_cmd
Definition: panel.h:11
@ PANEL_CMD_DCS
Definition: panel.h:15
@ PANEL_CMD_GENERIC
Definition: panel.h:14
@ PANEL_CMD_END
Definition: panel.h:12
@ PANEL_CMD_DELAY
Definition: panel.h:13
enum cb_err(* mipi_cmd_func_t)(enum mipi_dsi_transaction type, const u8 *data, u8 len)
Definition: panel.h:34
enum cb_err mipi_panel_parse_init_commands(const void *buf, mipi_cmd_func_t cmd_func)
Definition: panel.c:7
unsigned int type
Definition: edid.c:57
static uint8_t * buf
Definition: uart.c:7
uint8_t u8
Definition: stdint.h:45
Definition: edid.h:49