diff options
author | Hung-Te Lin <hungte@chromium.org> | 2019-08-15 09:43:55 +0800 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2019-08-21 22:58:45 +0000 |
commit | 9ede2ffee845d243d8e1515effbc206152fbc7fd (patch) | |
tree | dd6ce81539ff0698f6d41c357d55497dbdd5be6a /src/mainboard/google/kukui/panel_ps8640.c | |
parent | e804695c6a327b7e9d1ac0838dcd818520224f26 (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_ps8640.c')
-rw-r--r-- | src/mainboard/google/kukui/panel_ps8640.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/mainboard/google/kukui/panel_ps8640.c b/src/mainboard/google/kukui/panel_ps8640.c index d2f65a8d95..83358d366a 100644 --- a/src/mainboard/google/kukui/panel_ps8640.c +++ b/src/mainboard/google/kukui/panel_ps8640.c @@ -43,16 +43,18 @@ static void dummy_power_on(void) */ } -static struct panel_description ps8640_panel = { - .power_on = dummy_power_on, +static struct panel_serializable_data ps8640_data = { .orientation = LB_FB_ORIENTATION_NORMAL, .init = { INIT_END_CMD }, }; +static struct panel_description ps8640_panel = { + .s = &ps8640_data, + .power_on = dummy_power_on, +}; + struct panel_description *get_panel_description(int panel_id) { - static char mode_name[64]; - /* To read panel EDID, we have to first power on PS8640. */ power_on_ps8640(); @@ -60,14 +62,10 @@ struct panel_description *get_panel_description(int panel_id) mtk_i2c_bus_init(i2c_bus); ps8640_init(i2c_bus, i2c_addr); - struct edid *edid = &ps8640_panel.edid; + struct edid *edid = &ps8640_data.edid; if (ps8640_get_edid(i2c_bus, i2c_addr, edid)) { printk(BIOS_ERR, "Can't get panel's edid\n"); return NULL; } - /* TODO(hungte) Move this to ps8640_get_edid */ - snprintf(mode_name, sizeof(mode_name), "%dx%d@%dHz", edid->x_resolution, - edid->y_resolution, edid->mode.refresh); - ps8640_panel.edid.mode.name = mode_name; return &ps8640_panel; } |