yongqiang niu has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31517
Change subject: kukui/mainboard: Add mt8183 display usecase ......................................................................
kukui/mainboard: Add mt8183 display usecase
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui
Change-Id: I4b3f04cc2d044789bab4c3f0f03b3a904714158f Signed-off-by: Yongqiang Niu yongqiang.niu@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 28 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/31517/1
diff --git a/src/mainboard/google/kukui/mainboard.c b/src/mainboard/google/kukui/mainboard.c index e1d8f5f..950dca4 100644 --- a/src/mainboard/google/kukui/mainboard.c +++ b/src/mainboard/google/kukui/mainboard.c @@ -13,9 +13,14 @@ * GNU General Public License for more details. */
+#include <bootmode.h> +#include <console/console.h> #include <device/device.h> +#include <edid.h> +#include <soc/ddp.h> #include <soc/gpio.h> #include <soc/mmu_operations.h> +#include <soc/mtcmos.h> #include <soc/usb.h>
static void configure_emmc(void) @@ -37,8 +42,31 @@ setup_usb_host(); }
+static void display_startup(void) +{ + struct edid edid; + + edid_set_framebuffer_bits_per_pixel(&edid, 32, 0); + + mtk_ddp_init(); + + mtk_ddp_mode_set(&edid); + + set_vbe_mode_info_valid(&edid, (uintptr_t)0); +} + static void mainboard_init(struct device *dev) { + if (display_init_required()) { + printk(BIOS_INFO, "Starting display init.\n"); + mtcmos_display_power_on(); + mtcmos_protect_display_bus(); + + display_startup(); + } else { + printk(BIOS_INFO, "Skipping display init.\n"); + } + configure_emmc(); configure_usb(); }
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: kukui/mainboard: Add mt8183 display usecase ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/31517/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31517/1//COMMIT_MSG@7 PS1, Line 7: kukui/mainboard "google/kukui" or "mb/google/kukui"
Hello Julius Werner, Hung-Te Lin, build bot (Jenkins), Chun-ta Lin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31517
to look at the new patch set (#2).
Change subject: googe/kukui: Add mt8183 display usecase ......................................................................
googe/kukui: Add mt8183 display usecase
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui
Change-Id: I4b3f04cc2d044789bab4c3f0f03b3a904714158f Signed-off-by: Yongqiang Niu yongqiang.niu@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 28 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/31517/2
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: googe/kukui: Add mt8183 display usecase ......................................................................
Patch Set 2:
(4 comments)
https://review.coreboot.org/#/c/31517/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31517/2//COMMIT_MSG@7 PS2, Line 7: Add mt8183 display usecase Enable display on internal panel
https://review.coreboot.org/#/c/31517/2/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/2/src/mainboard/google/kukui/mainboard... PS2, Line 50: remove the blank line here
https://review.coreboot.org/#/c/31517/2/src/mainboard/google/kukui/mainboard... PS2, Line 52: remove the blank line here
https://review.coreboot.org/#/c/31517/2/src/mainboard/google/kukui/mainboard... PS2, Line 54: remove the blank line here
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: googe/kukui: Add mt8183 display usecase ......................................................................
Patch Set 2:
(2 comments)
https://review.coreboot.org/#/c/31517/2//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31517/2//COMMIT_MSG@7 PS2, Line 7: googe google
https://review.coreboot.org/#/c/31517/2//COMMIT_MSG@11 PS2, Line 11: TEST=Boots correctly on Kukui The depthcharge menu is shown? Please describe the actual test, as I guess booting worked before.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: googe/kukui: Add mt8183 display usecase ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/#/c/31517/5/src/mainboard/google/kukui/mainboard... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/5/src/mainboard/google/kukui/mainboard... PS5, Line 50: I think there's no good reason to put blank lines in each of the function call here and below. Please remove the blank lines.
https://review.coreboot.org/#/c/31517/5/src/mainboard/google/kukui/mainboard... PS5, Line 61: printk(BIOS_INFO, "Starting display init.\n"); You've removed this in follow up CLs. What about just remove it now?
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: googe/kukui: Add mt8183 display usecase ......................................................................
Patch Set 5:
(2 comments)
https://review.coreboot.org/#/c/31517/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/#/c/31517/5//COMMIT_MSG@7 PS5, Line 7: Add mt8183 display usecase Sorry, I do not know, what you mean.
https://review.coreboot.org/#/c/31517/5//COMMIT_MSG@8 PS5, Line 8: Please elaborate.
Hello Julius Werner, jitao shi, Hung-Te Lin, build bot (Jenkins), Chun-ta Lin,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/31517
to look at the new patch set (#6).
Change subject: google/kukui: Enable display on internal panel ......................................................................
google/kukui: Enable display on internal panel
Enable display on internal panel
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui The depthcharge menu is shown ok and bootup to kernel home ui shown ok
Change-Id: I4b3f04cc2d044789bab4c3f0f03b3a904714158f Signed-off-by: Yongqiang Niu yongqiang.niu@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/31517/6
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 6: Code-Review+1
jitao shi has uploaded a new patch set (#8) to the change originally created by yongqiang niu. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
google/kukui: Enable display on internal panel
Enable display on internal panel
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui The depthcharge menu is shown ok and bootup to kernel home ui shown ok
Change-Id: I4b3f04cc2d044789bab4c3f0f03b3a904714158f Signed-off-by: Yongqiang Niu yongqiang.niu@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/31517/8
jitao shi has uploaded a new patch set (#9) to the change originally created by yongqiang niu. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
google/kukui: Enable display on internal panel
Enable display on internal panel
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui The depthcharge menu is shown ok and bootup to kernel home ui shown ok
Change-Id: I4b3f04cc2d044789bab4c3f0f03b3a904714158f Signed-off-by: Yongqiang Niu yongqiang.niu@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/31517/9
jitao shi has uploaded a new patch set (#11) to the change originally created by yongqiang niu. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
google/kukui: Enable display on internal panel
Enable display on internal panel
BUG=b:80501386,b:117254947 BRANCH=none TEST=Boots correctly on Kukui The depthcharge menu is shown ok and bootup to kernel home ui shown ok
Change-Id: I4b3f04cc2d044789bab4c3f0f03b3a904714158f Signed-off-by: Yongqiang Niu yongqiang.niu@mediatek.com --- M src/mainboard/google/kukui/mainboard.c 1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/31517/11
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... PS11, Line 64: set_vbe_mode_info_valid this function needs KConfig to include MAINBOARD_DO_NATIVE_VGA_INIT or it will fail to compile.
please add that to Kconfig, or reorder this patch to be latter.
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... PS11, Line 57: static void display_startup(void) why is the display init here and not in src/soc ? It looks like there's nothing mainboard specific on it.
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... PS11, Line 57: display_startup maybe change this to mtk_display_init and move to src/soc/mediatek/mt8183/display.c
It may even include mtcmos_* calls inside.
So we can just call mtk_display_init() here.
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... PS11, Line 57: static void display_startup(void)
why is the display init here and not in src/soc ? […]
I think this is fine and probably cleaner than the boards where we put it in soc.c (like Gru). Whether a board has a display or not is an entirely mainboard-specific thing. On most boards we still end up having to put some display stuff (like power sequencing) in mainboard.c, and then it's oddly disjoint from the display controller initialization. Having it all in one place makes more sense, I think.
yongqiang niu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
(2 comments)
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... File src/mainboard/google/kukui/mainboard.c:
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... PS11, Line 57: display_startup
maybe change this to mtk_display_init and move to src/soc/mediatek/mt8183/display.c […]
this function already moved into src/soc/mediatek/mt8183/display.c https://review.coreboot.org/c/coreboot/+/32511/14/src/mainboard/google/kukui...
https://review.coreboot.org/#/c/31517/11/src/mainboard/google/kukui/mainboar... PS11, Line 57: static void display_startup(void)
I think this is fine and probably cleaner than the boards where we put it in soc.c (like Gru). […]
this function already moved into src/soc/mediatek/mt8183/display.c https://review.coreboot.org/c/coreboot/+/32511/14/src/mainboard/google/kukui...
You-Cheng Syu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
Do we still need this CL? It seems like we only need https://review.coreboot.org/c/coreboot/+/32511
Peichao Li has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
Patch Set 11:
Do we still need this CL? It seems like we only need https://review.coreboot.org/c/coreboot/+/32511
This CL need abandon since we have better way to probe display. Thanks a lot!
Hung-Te Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Patch Set 11:
please abandon this. it's already implemented in the new series.
yongqiang niu has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/31517 )
Change subject: google/kukui: Enable display on internal panel ......................................................................
Abandoned