jitao shi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel require dsi signal output before mipirx enable.
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 30 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/1
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index 268b7ca..6ac0530 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -96,6 +96,12 @@ mdelay(6); }
+static void post_power_on_panel(struct panel_description *panel) +{ + if (panel->post_power_on) + panel->post_power_on(); +} + struct panel_description *get_panel_from_cbfs(struct panel_description *desc) { /* The CBFS name will be panel-{MANUFACTURER}-${PANEL_NAME}, @@ -168,6 +174,9 @@ printk(BIOS_ERR, "%s: Failed in DSI init.\n", __func__); return false; } + + post_power_on_panel(panel); + mtk_ddp_mode_set(edid); set_vbe_mode_info_valid(edid, 0); set_vbe_framebuffer_orientation(panel->s->orientation); diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h index 7ae31dd..c60c577 100644 --- a/src/mainboard/google/kukui/panel.h +++ b/src/mainboard/google/kukui/panel.h @@ -21,6 +21,7 @@ const char *name; /* Panel name for constructing CBFS file name */ struct panel_serializable_data *s; void (*power_on)(void); /* Callback to turn on panel */ + void (*post_power_on)(void); /* Callback to run after turn on panel */ };
/* 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 cc41c86..d9df6f0 100644 --- a/src/mainboard/google/kukui/panel_anx7625.c +++ b/src/mainboard/google/kukui/panel_anx7625.c @@ -27,21 +27,33 @@ gpio_output(GPIO_PP3300_LCM_EN, 1); }
-static void dummy_power_on(void) -{ - /* The panel has been already powered on when getting panel information - * so we should do nothing here. - */ -} - static struct panel_serializable_data anx7625_data = { .orientation = LB_FB_ORIENTATION_NORMAL, .init = { INIT_END_CMD }, };
+static void dummy_power_on(void) +{ + /* The panel has been already powered on when getting panel information + * so we should do nothing here. + */ +} + +static void start_anx7625(void) +{ + u8 i2c_bus = 4; + struct edid *edid = &anx7625_data.edid; + + printk(BIOS_ERR, "start display start_anx7625\n"); + + if (anx7625_dp_start(i2c_bus, edid) < 0) + printk(BIOS_ERR, "Can't start display via ANX7625.\n"); +} + static struct panel_description anx7625_panel = { .s = &anx7625_data, - .power_on = dummy_power_on, + .power_on = dummy_power_on, + .post_power_on = start_anx7625, };
struct panel_description *get_panel_description(int panel_id) @@ -61,9 +73,5 @@ printk(BIOS_ERR, "Can't get panel's edid.\n"); return NULL; } - if (anx7625_dp_start(i2c_bus, edid) < 0) { - printk(BIOS_ERR, "Can't start display via ANX7625.\n"); - return NULL; - } return &anx7625_panel; }
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 1:
(9 comments)
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 101: if (panel->post_power_on) please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 101: if (panel->post_power_on) suspect code indent for conditional statements (7, 15)
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 102: panel->post_power_on(); code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 102: panel->post_power_on(); please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 38: * so we should do nothing here. code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 39: */ code indent should use tabs where possible
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 47: printk(BIOS_ERR, "start display start_anx7625\n"); Prefer using '"%s...", __func__' to using 'start_anx7625', this function's name, in a string
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 55: .power_on = dummy_power_on, please, no spaces at the start of a line
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 56: .post_power_on = start_anx7625, please, no spaces at the start of a line
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#2).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel require dsi signal output before mipirx enable.
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 20 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/2
Chen-Tsung Hsieh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47380/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47380/2//COMMIT_MSG@11 PS2, Line 11: BUG=b:168728787
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 2:
(4 comments)
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 99: static void post_power_on_panel(struct panel_description *panel) : { : if (panel->post_power_on) : panel->post_power_on(); : } If this is two lines, won't be used anywhere else, and no default (unlink power_on_panel) actions needed, I think you can just move this to configure_display.
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel.h:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 24: turn on panel panel is turned on
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 44: u8 i2c_bus = 4; If this will be used in multiple functions I'd like to replace it with a enum or const, e.g..
enum { ANX7625_I2C_BUS = 4, };
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 45: struct edid *edid = &anx7625_data.edid; I think you don't need to do this if it'll be only used one time (the original code did that because it was used twice).
Just do
if (anx7625_dp_start(i2c_bus, &anx7625_data.edid) < 0)
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#3).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel require dsi signal output before mipirx enable.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 17 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/3
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#4).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel require dsi signal output before mipirx enable.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 17 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/4
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 4:
(14 comments)
https://review.coreboot.org/c/coreboot/+/47380/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47380/2//COMMIT_MSG@11 PS2, Line 11:
BUG=b:168728787
Done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 101: if (panel->post_power_on)
suspect code indent for conditional statements (7, 15)
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 101: if (panel->post_power_on)
please, no spaces at the start of a line
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 102: panel->post_power_on();
please, no spaces at the start of a line
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 102: panel->post_power_on();
code indent should use tabs where possible
done
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 99: static void post_power_on_panel(struct panel_description *panel) : { : if (panel->post_power_on) : panel->post_power_on(); : }
If this is two lines, won't be used anywhere else, and no default (unlink power_on_panel) actions ne […]
Done
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel.h:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 24: turn on panel
panel is turned on
Done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 38: * so we should do nothing here.
code indent should use tabs where possible
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 39: */
code indent should use tabs where possible
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 47: printk(BIOS_ERR, "start display start_anx7625\n");
Prefer using '"%s... […]
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 55: .power_on = dummy_power_on,
please, no spaces at the start of a line
done
https://review.coreboot.org/c/coreboot/+/47380/1/src/mainboard/google/kukui/... PS1, Line 56: .post_power_on = start_anx7625,
please, no spaces at the start of a line
done
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 44: u8 i2c_bus = 4;
If this will be used in multiple functions I'd like to replace it with a enum or const, e.g.. […]
Done
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 45: struct edid *edid = &anx7625_data.edid;
I think you don't need to do this if it'll be only used one time (the original code did that because […]
Done
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 4:
(1 comment)
just some nits, thanks!
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... PS4, Line 11: #define ANX7625_I2C_BUS 4 please add a blank line between #include, #define and function blocks, e.g.
#include "panel.h"
#define ANX7625_I2C_BUS 4
static void power_on_anx7625(void)
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 4:
(4 comments)
https://review.coreboot.org/c/coreboot/+/47380/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47380/4//COMMIT_MSG@9 PS4, Line 9: require requires
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 45: struct edid *edid = &anx7625_data.edid;
Done
This is not done.
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... PS4, Line 47: i2c_bus Simply "ANX7625_I2C_BUS" and remove the local variable.
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... PS4, Line 62: u8 const u8
Jitao Shi has uploaded a new patch set (#5) to the change originally created by jitao shi. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before mipirx enable.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 17 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/5
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 5:
(3 comments)
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... PS4, Line 11: #define ANX7625_I2C_BUS 4
please add a blank line between #include, #define and function blocks, e.g. […]
Done
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... PS4, Line 47: i2c_bus
Simply "ANX7625_I2C_BUS" and remove the local variable.
Will fix next version
https://review.coreboot.org/c/coreboot/+/47380/4/src/mainboard/google/kukui/... PS4, Line 62: u8
const u8
I'll remove this line.
Use ANX7625_I2C_BUS, Ex, anx7625_init(ANX7625_I2C_BUS)
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#6).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before mipirx enable.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 18 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/6
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47380/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47380/4//COMMIT_MSG@9 PS4, Line 9: require
requires
Done
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/2/src/mainboard/google/kukui/... PS2, Line 45: struct edid *edid = &anx7625_data.edid;
This is not done.
Done
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#7).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before mipirx enable.
BUG=b:168728787 Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 18 insertions(+), 10 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/7
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 7:
(4 comments)
https://review.coreboot.org/c/coreboot/+/47380/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47380/7//COMMIT_MSG@9 PS7, Line 9: mipirx : enable enabling mipirx
Where is mipirx enabled BTW?
https://review.coreboot.org/c/coreboot/+/47380/7//COMMIT_MSG@12 PS7, Line 12: BUG=b:168728787 Add a blank line after BUG=...
https://review.coreboot.org/c/coreboot/+/47380/7/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/7/src/mainboard/google/kukui/... PS7, Line 8: #include "panel.h" Please do not move it. Local headers should be put in a separate section (unless you write <panel.h>).
https://review.coreboot.org/c/coreboot/+/47380/7/src/mainboard/google/kukui/... PS7, Line 43: start_anx7625 Can we adjust the order to match the initialization of anx7625_panel?
static struct panel_serializable_data anx7625_data = ... dummy_power_on start_anx7625
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#8).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before dsi receiver works.
BUG=b:168728787
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 35 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/8
Jitao Shi has uploaded a new patch set (#9) to the change originally created by jitao shi. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before dsi receiver works.
BUG=b:168728787 TEST=Display is normal on Kukui
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 35 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/9
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#10).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before dsi receiver works.
BUG=b:168728787 TEST=Display is normal on Kukui
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 35 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/10
Jitao Shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 10:
(4 comments)
https://review.coreboot.org/c/coreboot/+/47380/7//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/47380/7//COMMIT_MSG@9 PS7, Line 9: mipirx : enable
enabling mipirx […]
it should be dsi receiver. Some bridge chip or panel requires dsi signal output before dsi receiver works.
https://review.coreboot.org/c/coreboot/+/47380/7//COMMIT_MSG@12 PS7, Line 12: BUG=b:168728787
Add a blank line after BUG=...
Done
https://review.coreboot.org/c/coreboot/+/47380/7/src/mainboard/google/kukui/... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/7/src/mainboard/google/kukui/... PS7, Line 8: #include "panel.h"
Please do not move it. Local headers should be put in a separate section (unless you write <panel. […]
Done
https://review.coreboot.org/c/coreboot/+/47380/7/src/mainboard/google/kukui/... PS7, Line 43: start_anx7625
Can we adjust the order to match the initialization of anx7625_panel? […]
Done
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 10:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47380/10/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/10/src/mainboard/google/kukui... PS10, Line 21: /* The Take the chance to fix the format?
/* * The panel ... * ... here. */
Hello Hung-Te Lin, build bot (Jenkins), Chen-Tsung Hsieh, Yu-Ping Wu,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/47380
to look at the new patch set (#11).
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before dsi receiver works.
BUG=b:168728787 BRANCH=kukui TEST=Display is normal on Kukui
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 36 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/47380/11
jitao shi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/47380/10/src/mainboard/google/kukui... File src/mainboard/google/kukui/panel_anx7625.c:
https://review.coreboot.org/c/coreboot/+/47380/10/src/mainboard/google/kukui... PS10, Line 21: /* The
Take the chance to fix the format? […]
Done
Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
Patch Set 11: Code-Review+2
Hung-Te Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/47380 )
Change subject: mb/google/kukui: Add panel api after dsi start ......................................................................
mb/google/kukui: Add panel api after dsi start
Some bridge chip or panel requires dsi signal output before dsi receiver works.
BUG=b:168728787 BRANCH=kukui TEST=Display is normal on Kukui
Signed-off-by: Jitao Shi jitao.shi@mediatek.com Change-Id: I3bded27087490f32ee233e615cfad1fd05fb582d Reviewed-on: https://review.coreboot.org/c/coreboot/+/47380 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Yu-Ping Wu yupingso@google.com --- M src/mainboard/google/kukui/mainboard.c M src/mainboard/google/kukui/panel.h M src/mainboard/google/kukui/panel_anx7625.c 3 files changed, 36 insertions(+), 26 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index a197a7f..7efa01b 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -168,6 +168,10 @@ printk(BIOS_ERR, "%s: Failed in DSI init.\n", __func__); return false; } + + if (panel->post_power_on) + panel->post_power_on(); + mtk_ddp_mode_set(edid); struct fb_info *info = fb_new_framebuffer_info_from_edid(edid, 0); if (info) diff --git a/src/mainboard/google/kukui/panel.h b/src/mainboard/google/kukui/panel.h index 7ae31dd..1749565 100644 --- a/src/mainboard/google/kukui/panel.h +++ b/src/mainboard/google/kukui/panel.h @@ -21,6 +21,7 @@ const char *name; /* Panel name for constructing CBFS file name */ 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 */ };
/* 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 cc41c86..aa22cf3 100644 --- a/src/mainboard/google/kukui/panel_anx7625.c +++ b/src/mainboard/google/kukui/panel_anx7625.c @@ -9,6 +9,33 @@
#include "panel.h"
+#define ANX7625_I2C_BUS 4 + +static struct panel_serializable_data anx7625_data = { + .orientation = LB_FB_ORIENTATION_NORMAL, + .init = { INIT_END_CMD }, +}; + +static void dummy_power_on(void) +{ + /* + * The panel has been already powered on when getting panel information + * so we should do nothing here. + */ +} + +static void start_anx7625(void) +{ + if (anx7625_dp_start(ANX7625_I2C_BUS, &anx7625_data.edid) < 0) + printk(BIOS_ERR, "Can't start display via ANX7625.\n"); +} + +static struct panel_description anx7625_panel = { + .s = &anx7625_data, + .power_on = dummy_power_on, + .post_power_on = start_anx7625, +}; + static void power_on_anx7625(void) { /* Disable backlight before turning on bridge */ @@ -27,43 +54,21 @@ gpio_output(GPIO_PP3300_LCM_EN, 1); }
-static void dummy_power_on(void) -{ - /* The panel has been already powered on when getting panel information - * so we should do nothing here. - */ -} - -static struct panel_serializable_data anx7625_data = { - .orientation = LB_FB_ORIENTATION_NORMAL, - .init = { INIT_END_CMD }, -}; - -static struct panel_description anx7625_panel = { - .s = &anx7625_data, - .power_on = dummy_power_on, -}; - struct panel_description *get_panel_description(int panel_id) { /* To read panel EDID, we have to first power on anx7625. */ power_on_anx7625();
- u8 i2c_bus = 4; - mtk_i2c_bus_init(i2c_bus); + mtk_i2c_bus_init(ANX7625_I2C_BUS);
- if (anx7625_init(i2c_bus)) { + if (anx7625_init(ANX7625_I2C_BUS)) { printk(BIOS_ERR, "Can't init ANX7625 bridge.\n"); return NULL; } - struct edid *edid = &anx7625_data.edid; - if (anx7625_dp_get_edid(i2c_bus, edid)) { + + if (anx7625_dp_get_edid(ANX7625_I2C_BUS, &anx7625_data.edid)) { printk(BIOS_ERR, "Can't get panel's edid.\n"); return NULL; } - if (anx7625_dp_start(i2c_bus, edid) < 0) { - printk(BIOS_ERR, "Can't start display via ANX7625.\n"); - return NULL; - } return &anx7625_panel; }