summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/cmd_showlogo.c14
-rw-r--r--drivers/display/vout/vout.c31
-rw-r--r--include/amlogic/vmode.h1
3 files changed, 35 insertions, 11 deletions
diff --git a/common/cmd_showlogo.c b/common/cmd_showlogo.c
index 1bcc8a7f5b..ae854cae7d 100644
--- a/common/cmd_showlogo.c
+++ b/common/cmd_showlogo.c
@@ -62,15 +62,15 @@ static int display_logo(const char* mode, const char* bmp_width, const char* bmp
int ret = 0;
int i = 0;
- if (!strcmp("custombuilt", mode)) {
- run_command("osd clear", 0);
- return 1;
- }
-
for (i = 0; i < ARRAY_SIZE(c2_res_list); ++i) {
if (!strcmp(c2_res_list[i].name, mode)) {
- setenv("display_width", simple_itoa(c2_res_list[i].display_width));
- setenv("display_height", simple_itoa(c2_res_list[i].display_height));
+ if (!strcmp(mode, "custombuilt")) {
+ setenv("display_width", getenv("customwidth"));
+ setenv("display_height", getenv("customheight"));
+ } else {
+ setenv("display_width", simple_itoa(c2_res_list[i].display_width));
+ setenv("display_height", simple_itoa(c2_res_list[i].display_height));
+ }
break;
}
}
diff --git a/drivers/display/vout/vout.c b/drivers/display/vout/vout.c
index 21ffdb4927..6d014bb13d 100644
--- a/drivers/display/vout/vout.c
+++ b/drivers/display/vout/vout.c
@@ -249,6 +249,12 @@ static const vout_set_t vout_sets[] = {
.width = 640,
.height = 480,
},
+ { /* custombuilt */
+ .name = "custombuilt",
+ .mode = VMODE_CUSTOMBUILT,
+ .width = 0,
+ .height = 0,
+ },
};
vidinfo_t tv_info = {
@@ -296,8 +302,14 @@ static int vout_find_width_by_name(const char* name)
for (i = 0; i < sizeof(vout_sets) / sizeof(struct vout_set_s); i++) {
if (strncmp(name, vout_sets[i].name, strlen(vout_sets[i].name)) == 0) {
- width = vout_sets[i].width;
- return width;
+ /* check custombuilt */
+ if (strncmp(name, "custombuilt", 11) == 0) {
+ width = simple_strtoul(getenv("customwidth"), NULL, 0);
+ return width;
+ } else {
+ width = vout_sets[i].width;
+ return width;
+ }
}
}
@@ -311,8 +323,14 @@ static int vout_find_height_by_name(const char* name)
for (i = 0; i < sizeof(vout_sets) / sizeof(struct vout_set_s); i++) {
if (strncmp(name, vout_sets[i].name, strlen(vout_sets[i].name)) == 0) {
- height = vout_sets[i].height;
- return height;
+ /* check custombuilt */
+ if (strncmp(name, "custombuilt", 11) == 0) {
+ height = simple_strtoul(getenv("customheight"), NULL, 0);
+ return height;
+ } else {
+ height = vout_sets[i].height;
+ return height;
+ }
}
}
@@ -512,6 +530,11 @@ static int get_window_axis(int *axis)
axis[1] = getenv_int("640x480p_y", 0);
axis[2] = getenv_int("640x480p_w", 640);
axis[3] = getenv_int("640x480p_h", 480);
+ } else if (strncmp(mode, "custombuilt", 11) == 0) {
+ axis[0] = 0;
+ axis[1] = 0;
+ axis[2] = getenv_int("customwidth", 1920);
+ axis[3] = getenv_int("customheight", 1080);
} else {
axis[0] = getenv_int("1080p_x", 0);
axis[1] = getenv_int("1080p_y", 0);
diff --git a/include/amlogic/vmode.h b/include/amlogic/vmode.h
index b4da4a6e37..245a01bb60 100644
--- a/include/amlogic/vmode.h
+++ b/include/amlogic/vmode.h
@@ -65,6 +65,7 @@ typedef enum vmode_e {
VMODE_1024X768P_60HZ,
VMODE_800X600P_60HZ,
VMODE_640X480P_60HZ,
+ VMODE_CUSTOMBUILT,
VMODE_MAX,
VMODE_INIT_NULL,
VMODE_MASK = 0xFF,