video/drm: rockchip_display: add return value for automatic test
Change-Id: I6cd4f7d4bd738c7f4cf59af3a2daf46365e7c1e9 Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
parent
e7b6c6a93f
commit
a2d2b88ee1
|
|
@ -1047,37 +1047,43 @@ void rockchip_show_fbbase(ulong fbbase)
|
|||
}
|
||||
}
|
||||
|
||||
void rockchip_show_bmp(const char *bmp)
|
||||
int rockchip_show_bmp(const char *bmp)
|
||||
{
|
||||
struct display_state *s;
|
||||
int ret = 0;
|
||||
|
||||
if (!bmp) {
|
||||
list_for_each_entry(s, &rockchip_display_list, head)
|
||||
display_disable(s);
|
||||
return;
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
list_for_each_entry(s, &rockchip_display_list, head) {
|
||||
s->logo.mode = s->charge_logo_mode;
|
||||
if (load_bmp_logo(&s->logo, bmp))
|
||||
continue;
|
||||
display_logo(s);
|
||||
ret = display_logo(s);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void rockchip_show_logo(void)
|
||||
int rockchip_show_logo(void)
|
||||
{
|
||||
struct display_state *s;
|
||||
int ret = 0;
|
||||
|
||||
list_for_each_entry(s, &rockchip_display_list, head) {
|
||||
s->logo.mode = s->logo_mode;
|
||||
if (load_bmp_logo(&s->logo, s->ulogo_name))
|
||||
printf("failed to display uboot logo\n");
|
||||
else
|
||||
display_logo(s);
|
||||
ret = display_logo(s);
|
||||
|
||||
/* Load kernel bmp in rockchip_display_fixup() later */
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
enum {
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
#define DRM_ROCKCHIP_FB_SIZE \
|
||||
VNBYTES(DRM_ROCKCHIP_FB_BPP) * DRM_ROCKCHIP_FB_WIDTH * DRM_ROCKCHIP_FB_HEIGHT
|
||||
|
||||
void rockchip_show_bmp(const char *bmp);
|
||||
void rockchip_show_logo(void);
|
||||
int rockchip_show_bmp(const char *bmp);
|
||||
int rockchip_show_logo(void);
|
||||
void rockchip_display_fixup(void *blob);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue