From b2a14801916ad9dfa2a6b4fa9ceb6de7d2d03e24 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 12 Aug 2021 16:48:12 -0700 Subject: device: Move MIPI panel library from mainboard/google/kukui into common All boards that are trying to use MIPI panels eventually run into the problem that they need to store physical parameters and a list of DCS initialization commands for each panel, and these commands can be very different (e.g. a large amount of very short commands, a few very large commands, etc.). Finding a data format to fit all these different cases efficiently into the same structures keeps being a challenge, and the Kukui mainboard already once put a lot of effort into designing a clean, flexible and efficient solution for this. This patch moves that framework into a common src/device/mipi/ library where it can be used by other boards as well. (Also, this will hopefully allow us to save some duplicated work when using the same panel on different boards at some point.) Signed-off-by: Julius Werner Change-Id: I877f2b0c7ab984412b288e2ed27f37cd93c70863 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56965 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu Reviewed-by: Hung-Te Lin --- src/mainboard/google/kukui/panel.h | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/mainboard/google/kukui/panel.h') diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h index 174956551d..e434d9f5db 100644 --- a/src/mainboard/google/kukui/panel.h +++ b/src/mainboard/google/kukui/panel.h @@ -3,20 +3,9 @@ #ifndef __MAINBOARD_GOOGLE_KUKUI_PANEL_H__ #define __MAINBOARD_GOOGLE_KUKUI_PANEL_H__ -#include +#include #include -/* - * The data that to be serialized and put into CBFS. - * Note some fields, for example edid.mode.name, were actually pointers and - * cannot be really serialized. - */ -struct panel_serializable_data { - struct edid edid; /* edid info of this panel */ - enum lb_fb_orientation orientation; /* Panel orientation */ - u8 init[]; /* A packed array of lcm_init_command */ -}; - struct panel_description { const char *name; /* Panel name for constructing CBFS file name */ struct panel_serializable_data *s; @@ -30,23 +19,6 @@ struct panel_description *get_panel_description(int panel_id); /* Loads panel serializable data from CBFS. */ struct panel_description *get_panel_from_cbfs(struct panel_description *desc); -#define INIT_DCS_CMD(...) \ - LCM_DCS_CMD, \ - sizeof((u8[]){__VA_ARGS__}), \ - __VA_ARGS__ - -#define INIT_GENERIC_CMD(...) \ - LCM_GENERIC_CMD, \ - sizeof((u8[]){__VA_ARGS__}), \ - __VA_ARGS__ - -#define INIT_DELAY_CMD(delay) \ - LCM_DELAY_CMD, \ - delay - -#define INIT_END_CMD \ - LCM_END_CMD - /* GPIO names */ #define GPIO_LCM_RST_1V8 GPIO(LCM_RST) /* 45 */ #define GPIO_MIPIBRDG_PWRDN_L_1V8 GPIO(LCM_RST) /* 45 */ -- cgit v1.2.3