summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharles.park <charles.park@hardkernel.com>2020-07-13 11:47:09 +0300
committerJoy Cho <joy.cho@hardkernel.com>2020-12-02 10:25:24 +0300
commit6797a5eb3f90bd6e15ff09446195782293dbca82 (patch)
tree8f78e9fbf44c8aec4530be0deb2edcabc221f86b
parent48745a53b3416e23bcfb73a482523e6f7bb313a2 (diff)
downloadu-boot-6797a5eb3f90bd6e15ff09446195782293dbca82.tar.xz
ODROID-GO3 : add lcd logo display & background color bug fix.
Change-Id: Ief32b7662a79a07959ea84fa30fc4e9eb8501a2e
-rw-r--r--board/rockchip/odroidgo3/odroidgo3.c8
-rw-r--r--drivers/video/drm/rockchip_display_cmds.c11
2 files changed, 13 insertions, 6 deletions
diff --git a/board/rockchip/odroidgo3/odroidgo3.c b/board/rockchip/odroidgo3/odroidgo3.c
index 600c78b1f5..9fc965946d 100644
--- a/board/rockchip/odroidgo3/odroidgo3.c
+++ b/board/rockchip/odroidgo3/odroidgo3.c
@@ -14,6 +14,8 @@
#include <fs.h>
#include <version.h>
+#include <rockchip_display_cmds.h>
+
DECLARE_GLOBAL_DATA_PTR;
extern int board_check_power(void);
@@ -118,7 +120,11 @@ int rk_board_late_init(void)
if(board_check_power())
return 0;
- /* display boot logo - TODO */
+ /* show boot logo and version : drivers/video/drm/rockchip_display_cmds.c */
+ lcd_show_logo();
+ lcd_setfg_color("white");
+ lcd_printf(0, 27, 1, " %s", U_BOOT_VERSION);
+ lcd_printf(0, 28, 1, " %s %s", U_BOOT_DATE, U_BOOT_TIME);
return 0;
}
diff --git a/drivers/video/drm/rockchip_display_cmds.c b/drivers/video/drm/rockchip_display_cmds.c
index 2e45012176..10f530e1fa 100644
--- a/drivers/video/drm/rockchip_display_cmds.c
+++ b/drivers/video/drm/rockchip_display_cmds.c
@@ -90,10 +90,9 @@ int lcd_init(void)
lcd->drm_fb_size = (lcd->w * lcd->h * lcd->bpp) >> 3;
lcd->s->crtc_state.format = ROCKCHIP_FMT_RGB888;
-#if defined(CONFIG_TARGET_ODROIDGO2)
+#if defined(CONFIG_PLATFORM_ODROID_GOADV)
lcd->s->crtc_state.rb_swap = true;
-#endif
-#if defined(CONFIG_TARGET_ODROIDGO3)
+#else
lcd->s->crtc_state.rb_swap = false;
#endif
lcd->s->crtc_state.ymirror = 0;
@@ -403,13 +402,13 @@ int lcd_setfg_color(const char *color)
int lcd_setbg_color(const char *color)
{
if (!strcmp(color ,"red"))
- lcd_setbg(0x00, 0x00, 0xff);
+ lcd_setbg(0xff, 0x00, 0x00);
if (!strcmp(color ,"green"))
lcd_setbg(0x00, 0xff, 0x00);
if (!strcmp(color ,"yellow"))
lcd_setbg(0xff, 0xff, 0x00);
if (!strcmp(color ,"blue"))
- lcd_setbg(0xff, 0x00, 0x00);
+ lcd_setbg(0x00, 0x00, 0xff);
if (!strcmp(color ,"magenta"))
lcd_setbg(0xff, 0x00, 0xff);
if (!strcmp(color ,"cyan"))
@@ -440,8 +439,10 @@ int lcd_show_logo(void)
if (lcd_init()) {
printf("%s : lcd init error!\n", __func__);
+#if defined(CONFIG_TARGET_ODROIDGO2)
odroid_drop_errorlog("lcd init fail, check dtb file", 29);
odroid_alert_leds();
+#endif
return -1;
}