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>
This commit is contained in:
Julius Werner 2021-09-14 15:50:08 -07:00
parent 184d5d0429
commit 90ca4aed31
1 changed files with 9 additions and 4 deletions

View File

@ -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; const char *cbfs_filename = NULL;
int panel_id = sku_id() >> 8; int panel_id = sku_id() >> 8;
@ -109,9 +109,11 @@ static struct panel_serializable_data *get_mipi_panel(void)
switch (panel_id) { switch (panel_id) {
case 3: case 3:
cbfs_filename = "panel-BOE_TV101WUM_N53"; cbfs_filename = "panel-BOE_TV101WUM_N53";
*orientation = LB_FB_ORIENTATION_LEFT_UP;
break; break;
case 6: case 6:
cbfs_filename = "panel-AUO_B101UAN08_3"; cbfs_filename = "panel-AUO_B101UAN08_3";
*orientation = LB_FB_ORIENTATION_LEFT_UP;
break; break;
} }
} }
@ -156,6 +158,7 @@ static void display_startup(void)
{ {
struct panel_serializable_data edp_panel = {0}; struct panel_serializable_data edp_panel = {0};
struct panel_serializable_data *panel = &edp_panel; struct panel_serializable_data *panel = &edp_panel;
enum lb_fb_orientation orientation = LB_FB_ORIENTATION_NORMAL;
if (!display_init_required()) { if (!display_init_required()) {
printk(BIOS_INFO, "Skipping display init.\n"); printk(BIOS_INFO, "Skipping display init.\n");
@ -164,7 +167,7 @@ static void display_startup(void)
if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) { if (CONFIG(TROGDOR_HAS_MIPI_PANEL)) {
configure_mipi_panel(); configure_mipi_panel();
panel = get_mipi_panel(); panel = get_mipi_panel(&orientation);
if (!panel) if (!panel)
return; return;
} else { } else {
@ -179,8 +182,10 @@ static void display_startup(void)
printk(BIOS_INFO, "display init!\n"); printk(BIOS_INFO, "display init!\n");
edid_set_framebuffer_bits_per_pixel(&panel->edid, 32, 0); edid_set_framebuffer_bits_per_pixel(&panel->edid, 32, 0);
if (display_init(panel) == CB_SUCCESS) if (display_init(panel) == CB_SUCCESS) {
fb_new_framebuffer_info_from_edid(&panel->edid, 0); 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) static void mainboard_init(struct device *dev)