diff options
author | Julius Werner <jwerner@chromium.org> | 2021-09-01 16:27:58 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2021-09-02 21:43:11 +0000 |
commit | 1f84b2c02597ef7a373478cc97caf07c69f1ae3a (patch) | |
tree | 18df8236084383006a3a10b42a8631609e4d582b /src/mainboard/google/kukui | |
parent | 14bb6f5dab90500c7d37b06f0588123bd4c58ffd (diff) | |
download | coreboot-1f84b2c02597ef7a373478cc97caf07c69f1ae3a.tar.gz coreboot-1f84b2c02597ef7a373478cc97caf07c69f1ae3a.tar.bz2 coreboot-1f84b2c02597ef7a373478cc97caf07c69f1ae3a.zip |
drivers/mipi: Make orientation a property of the mainboard, not panel
It doesn't make sense to store the orientation field directly in the
panel information structure, which is supposed to be reuseable between
different boards. The thing that determines orientation is how that
panel is built into the board in question, which only the board itself
can know. The same portrait panel could be rotated left to be used as
landscape in one board and rotated right to be used as landscape in
another. This patch moves the orientation field out of the panel
structure back into the mainboards to reflect this.
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: If2b716aa4dae036515730c12961fdd8a9ac34753
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57324
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/mainboard/google/kukui')
-rw-r--r-- | src/mainboard/google/kukui/mainboard.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel.h | 1 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_anx7625.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_flapjack.c | 8 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_kakadu.c | 2 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_katsu.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_kodama.c | 4 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_krane.c | 7 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_kukui.c | 1 | ||||
-rw-r--r-- | src/mainboard/google/kukui/panel_ps8640.c | 2 |
10 files changed, 18 insertions, 15 deletions
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 4affa1631c68..9357b6746889 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -176,7 +176,7 @@ static bool configure_display(void) mtk_ddp_mode_set(edid); struct fb_info *info = fb_new_framebuffer_info_from_edid(edid, 0); if (info) - fb_set_orientation(info, panel->s->orientation); + fb_set_orientation(info, panel->orientation); return true; } diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h index 17c19837bb42..c5bc43e5fb87 100644 --- a/src/mainboard/google/kukui/panel.h +++ b/src/mainboard/google/kukui/panel.h @@ -11,6 +11,7 @@ struct panel_description { struct panel_serializable_data *s; void (*power_on)(void); /* Callback to turn on panel */ void (*post_power_on)(void); /* Callback to run after panel is turned on */ + enum lb_fb_orientation orientation; }; /* Returns the panel description from given ID. */ diff --git a/src/mainboard/google/kukui/panel_anx7625.c b/src/mainboard/google/kukui/panel_anx7625.c index fb3c9b7eb8e2..90a041b42a38 100644 --- a/src/mainboard/google/kukui/panel_anx7625.c +++ b/src/mainboard/google/kukui/panel_anx7625.c @@ -13,7 +13,6 @@ #define ANX7625_I2C_BUS 4 static struct panel_serializable_data anx7625_data = { - .orientation = LB_FB_ORIENTATION_NORMAL, .init = { PANEL_END }, }; @@ -33,6 +32,7 @@ static void start_anx7625(void) static struct panel_description anx7625_panel = { .s = &anx7625_data, + .orientation = LB_FB_ORIENTATION_NORMAL, .power_on = dummy_power_on, .post_power_on = start_anx7625, }; diff --git a/src/mainboard/google/kukui/panel_flapjack.c b/src/mainboard/google/kukui/panel_flapjack.c index 16a949d2f8d0..3ad9d6a4a18e 100644 --- a/src/mainboard/google/kukui/panel_flapjack.c +++ b/src/mainboard/google/kukui/panel_flapjack.c @@ -3,10 +3,10 @@ #include "panel.h" static struct panel_description flapjack_panels[] = { - [0] = { .name = "BOE_TV101WUM_NG0", }, - [1] = { .name = "BOE_TV080WUM_NG0", }, - [2] = { .name = "INX_OTA7290D10P", }, - [3] = { .name = "AUO_NT51021D8P", }, + [0] = { .name = "BOE_TV101WUM_NG0", .orientation = LB_FB_ORIENTATION_NORMAL}, + [1] = { .name = "BOE_TV080WUM_NG0", .orientation = LB_FB_ORIENTATION_NORMAL}, + [2] = { .name = "INX_OTA7290D10P", .orientation = LB_FB_ORIENTATION_NORMAL}, + [3] = { .name = "AUO_NT51021D8P", .orientation = LB_FB_ORIENTATION_NORMAL}, }; struct panel_description *get_panel_description(int panel_id) diff --git a/src/mainboard/google/kukui/panel_kakadu.c b/src/mainboard/google/kukui/panel_kakadu.c index f01c28bdcf1e..df9a92ebda28 100644 --- a/src/mainboard/google/kukui/panel_kakadu.c +++ b/src/mainboard/google/kukui/panel_kakadu.c @@ -3,7 +3,7 @@ #include "panel.h" static struct panel_description kakadu_panels[] = { - [1] = { .name = "BOE_TV105WUM_NW0", }, + [1] = { .name = "BOE_TV105WUM_NW0", .orientation = LB_FB_ORIENTATION_LEFT_UP}, }; struct panel_description *get_panel_description(int panel_id) diff --git a/src/mainboard/google/kukui/panel_katsu.c b/src/mainboard/google/kukui/panel_katsu.c index f2a20701460a..eeb957341e8c 100644 --- a/src/mainboard/google/kukui/panel_katsu.c +++ b/src/mainboard/google/kukui/panel_katsu.c @@ -3,8 +3,8 @@ #include "panel.h" static struct panel_description katsu_panels[] = { - [1] = { .name = "BOE_TV105WUM_NW0", }, - [2] = { .name = "STA_2081101QFH032011_53G", }, + [1] = { .name = "BOE_TV105WUM_NW0", .orientation = LB_FB_ORIENTATION_LEFT_UP}, + [2] = { .name = "STA_2081101QFH032011_53G", .orientation = LB_FB_ORIENTATION_LEFT_UP}, }; struct panel_description *get_panel_description(int panel_id) diff --git a/src/mainboard/google/kukui/panel_kodama.c b/src/mainboard/google/kukui/panel_kodama.c index efabfa2ba55d..35d3d91495be 100644 --- a/src/mainboard/google/kukui/panel_kodama.c +++ b/src/mainboard/google/kukui/panel_kodama.c @@ -3,8 +3,8 @@ #include "panel.h" static struct panel_description kodama_panels[] = { - [1] = { .name = "AUO_B101UAN08_3", }, - [2] = { .name = "BOE_TV101WUM_N53", }, + [1] = { .name = "AUO_B101UAN08_3", .orientation = LB_FB_ORIENTATION_LEFT_UP}, + [2] = { .name = "BOE_TV101WUM_N53", .orientation = LB_FB_ORIENTATION_LEFT_UP}, }; struct panel_description *get_panel_description(int panel_id) diff --git a/src/mainboard/google/kukui/panel_krane.c b/src/mainboard/google/kukui/panel_krane.c index 6228bcbec03e..30887182d7e4 100644 --- a/src/mainboard/google/kukui/panel_krane.c +++ b/src/mainboard/google/kukui/panel_krane.c @@ -3,9 +3,10 @@ #include "panel.h" static struct panel_description krane_panels[] = { - [0] = { .name = "AUO_KD101N80_45NA", }, - [1] = { .name = "BOE_TV101WUM_NL6", }, /* Only Rev3, can be reused. */ - [11] = { .name = "BOE_TV101WUM_NL6", }, + [0] = { .name = "AUO_KD101N80_45NA", .orientation = LB_FB_ORIENTATION_LEFT_UP}, + /* [1] is only Rev3, can be reused. */ + [1] = { .name = "BOE_TV101WUM_NL6", .orientation = LB_FB_ORIENTATION_LEFT_UP}, + [11] = { .name = "BOE_TV101WUM_NL6", .orientation = LB_FB_ORIENTATION_LEFT_UP}, }; struct panel_description *get_panel_description(int panel_id) diff --git a/src/mainboard/google/kukui/panel_kukui.c b/src/mainboard/google/kukui/panel_kukui.c index ae002e6f34ab..283b641ee667 100644 --- a/src/mainboard/google/kukui/panel_kukui.c +++ b/src/mainboard/google/kukui/panel_kukui.c @@ -25,6 +25,7 @@ static void power_on_ssd2858(void) static struct panel_description kukui_panel = { .name = "CMN_P097PFG_SSD2858", + .orientation = LB_FB_ORIENTATION_NORMAL, .power_on = power_on_ssd2858, }; diff --git a/src/mainboard/google/kukui/panel_ps8640.c b/src/mainboard/google/kukui/panel_ps8640.c index f169254428be..c4e90ea81c88 100644 --- a/src/mainboard/google/kukui/panel_ps8640.c +++ b/src/mainboard/google/kukui/panel_ps8640.c @@ -34,12 +34,12 @@ static void dummy_power_on(void) } static struct panel_serializable_data ps8640_data = { - .orientation = LB_FB_ORIENTATION_NORMAL, .init = { PANEL_END }, }; static struct panel_description ps8640_panel = { .s = &ps8640_data, + .orientation = LB_FB_ORIENTATION_NORMAL, .power_on = dummy_power_on, }; |