diff options
author | Julius Werner <jwerner@chromium.org> | 2021-09-14 15:50:08 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2021-09-15 23:16:59 +0000 |
commit | 90ca4aed31c86bce9df86e8d08a869a8786c8ac2 (patch) | |
tree | a3479e66359e4a095c0769a736f25cc046a35131 /src/mainboard/google | |
parent | 184d5d04296cbbd035247b8830a18ffad29abb22 (diff) |
google/trogdor: Fix Mrbland panels to point LEFT_UP
CB:57324 moved panel orientation from panel_serializable_data to the
responsibility of the mainboard, but in parallel to that patch we landed
support for some new panels on the Trogdor mainboard that should be
pointing LEFT_UP. This patch fixes up the panel orientation for those.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I416b6c8804a88b36f723c4690ed78aff928a0f8d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57649
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Bob Moragues <moragues@google.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/trogdor/mainboard.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mainboard/google/trogdor/mainboard.c b/src/mainboard/google/trogdor/mainboard.c index 6ef8837879..c99f1c5ae1 100644 --- a/src/mainboard/google/trogdor/mainboard.c +++ b/src/mainboard/google/trogdor/mainboard.c @@ -100,7 +100,7 @@ static void configure_mipi_panel(void) } } -static struct panel_serializable_data *get_mipi_panel(void) +static struct panel_serializable_data *get_mipi_panel(enum lb_fb_orientation *orientation) { const char *cbfs_filename = NULL; int panel_id = sku_id() >> 8; @@ -109,9 +109,11 @@ static struct panel_serializable_data *get_mipi_panel(void) switch (panel_id) { case 3: cbfs_filename = "panel-BOE_TV101WUM_N53"; + *orientation = LB_FB_ORIENTATION_LEFT_UP; break; case 6: cbfs_filename = "panel-AUO_B101UAN08_3"; + *orientation = LB_FB_ORIENTATION_LEFT_UP; break; } } @@ -156,6 +158,7 @@ static void display_startup(void) { struct panel_serializable_data edp_panel = {0}; struct panel_serializable_data *panel = &edp_panel; + enum lb_fb_orientation orientation = LB_FB_ORIENTATION_NORMAL; if (!display_init_required()) { printk(BIOS_INFO, "Skipping display init.\n"); @@ -164,7 +167,7 @@ static void display_startup(void) if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) { configure_mipi_panel(); - panel = get_mipi_panel(); + panel = get_mipi_panel(&orientation); if (!panel) return; } else { @@ -179,8 +182,10 @@ static void display_startup(void) printk(BIOS_INFO, "display init!\n"); edid_set_framebuffer_bits_per_pixel(&panel->edid, 32, 0); - if (display_init(panel) == CB_SUCCESS) - fb_new_framebuffer_info_from_edid(&panel->edid, 0); + if (display_init(panel) == CB_SUCCESS) { + struct fb_info *fb = fb_new_framebuffer_info_from_edid(&panel->edid, 0); + fb_set_orientation(fb, orientation); + } } static void mainboard_init(struct device *dev) |