summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoy Cho <joy.cho@hardkernel.com>2017-12-21 07:06:38 +0300
committerGerrit Code Review <gerrit@almond.hardkernel.com>2017-12-21 07:06:38 +0300
commit31a278801f46762c068e340c72ae498bad3e6314 (patch)
treee3fe661c2fd8d56050987b59f49966de432ce21f
parentf1df1a98f85ac22d465ed05acbe4900892fbc758 (diff)
parent1f3ed0c9d9ae39d58983e97c15df415136136808 (diff)
downloadu-boot-31a278801f46762c068e340c72ae498bad3e6314.tar.xz
Merge "ODROID-C2: adjust showlogo logic" into odroidc2-v2015.01
-rw-r--r--common/cmd_showlogo.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/common/cmd_showlogo.c b/common/cmd_showlogo.c
index 0cd71f82f6..db8f3bdad8 100644
--- a/common/cmd_showlogo.c
+++ b/common/cmd_showlogo.c
@@ -66,6 +66,10 @@ static int display_logo(const char* mode, const char* bmp_width, const char* bmp
for (i = 0; i < ARRAY_SIZE(c2_res_list); ++i) {
if (!strcmp(c2_res_list[i].name, mode)) {
if (!strcmp(mode, "custombuilt")) {
+ if (NULL == getenv("customwidth")) {
+ setenv("customwidth", "1920");
+ setenv("customheight", "1080");
+ }
setenv("display_width", getenv("customwidth"));
setenv("display_height", getenv("customheight"));
} else {
@@ -116,11 +120,24 @@ display_logo:
setenv("fb_width", bmp_width);
setenv("fb_height", bmp_height);
- if (NULL == getenv("vout_mode"))
- setenv("vout_mode", "hdmi");
-
run_command("hdmitx hpd; osd open; osd clear", 0);
- run_command("vout output ${outputmode}; hdmitx mode ${vout_mode}; hdmitx output ${outputmode}", 0);
+ run_command("vout output ${outputmode}", 0);
+ /*
+ * The env parameter to switch hdmi or dvi is defined differently
+ * on Ubuntu and Android.
+ * To distinguish os system, an env "androidopt" will be used.
+ */
+ if ((NULL == getenv("vout")) && (NULL == getenv("vout_mode")))
+ run_command("hdmitx mode hdmi", 0);
+ else if (NULL == getenv("androidopt"))
+ run_command("hdmitx mode ${vout}", 0); /* Ubuntu */
+ else
+ run_command("hdmitx mode ${vout_mode}", 0); /* Android */
+
+ if (!strcmp(mode, "custombuilt"))
+ run_command("hdmitx output 1080p60hz", 0);
+ else
+ run_command("hdmitx output ${outputmode}", 0);
run_command("bmp display ${bootlogo_addr}", 0);
run_command("bmp scale", 0);
run_command("setenv logoopt ${display_layer},loaded,${fb_addr},${hdmimode}", 0);