xref: /rk3399_rockchip-uboot/test/rockchip/test-display.c (revision 90a8d4436c3a92cdad55cacda5a86e5b739628d5)
1 /*
2  * (C) Copyright 2019 Rockchip Electronics Co., Ltd
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6 
7 #include <common.h>
8 #include <video_rockchip.h>
9 #include "test-rockchip.h"
10 
11 #ifdef CONFIG_DRM_ROCKCHIP
12 int do_test_display(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
13 {
14 	int ret = 0;
15 
16 	ret |= rockchip_show_logo();
17 	mdelay(2000);
18 	ret |= rockchip_show_bmp("logo.bmp");
19 	mdelay(2000);
20 	ret |= rockchip_show_bmp("logo_kernel.bmp");
21 	mdelay(2000);
22 
23 	return ret;
24 }
25 
26 static cmd_tbl_t sub_cmd[] = {
27 	UNIT_CMD_DEFINE(display, 0),
28 };
29 
30 static const char sub_cmd_help[] =
31 "    [.] rktest display                     - test display\n"
32 ;
33 
34 const struct cmd_group cmd_grp_display = {
35 	.id	= TEST_ID_DISPLAY,
36 	.help	= sub_cmd_help,
37 	.cmd	= sub_cmd,
38 	.cmd_n	= ARRAY_SIZE(sub_cmd),
39 };
40 #else
41 const struct cmd_group cmd_grp_display = {
42 	.id	= TEST_ID_DISPLAY,
43 	.help	= NULL,
44 	.cmd	= NULL,
45 	.cmd_n	= 0,
46 };
47 #endif
48