aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/kukui/panel.h
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2019-08-15 09:43:55 +0800
committerJulius Werner <jwerner@chromium.org>2019-08-21 22:58:45 +0000
commit9ede2ffee845d243d8e1515effbc206152fbc7fd (patch)
treedd6ce81539ff0698f6d41c357d55497dbdd5be6a /src/mainboard/google/kukui/panel.h
parente804695c6a327b7e9d1ac0838dcd818520224f26 (diff)
mb/google/kukui: Move panel description to CBFS files
The panel description may be pretty large (for example, 1.3k for BOE TV101) due to init commands and we should only load the right config when display is needed. BUG=None TEST=make -j; boots and see display on Krane. Change-Id: I2560a11ecf7badfd0605ab189d57ec9456850f75 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34877 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/mainboard/google/kukui/panel.h')
-rw-r--r--src/mainboard/google/kukui/panel.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h
index 321e3662a3..0156cd68bf 100644
--- a/src/mainboard/google/kukui/panel.h
+++ b/src/mainboard/google/kukui/panel.h
@@ -19,15 +19,28 @@
#include <edid.h>
#include <soc/dsi.h>
-struct panel_description {
+/*
+ * 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 */
+ 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;
void (*power_on)(void); /* Callback to turn on panel */
- u8 init[]; /* a packed array of lcm_init_command */
};
/* Returns the panel description from given ID. */
-extern struct panel_description *get_panel_description(int panel_id);
+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, \