1 /* 2 * Copyright (C) 2013 Samsung Electronics 3 * Przemyslaw Marczak <p.marczak@samsung.com> 4 * 5 * SPDX-License-Identifier: GPL-2.0+ 6 */ 7 8 #include <common.h> 9 #include <lcd.h> 10 #include <libtizen.h> 11 #include <samsung/misc.h> 12 13 #ifdef CONFIG_CMD_BMP 14 void draw_logo(void) 15 { 16 int x, y; 17 ulong addr; 18 19 addr = panel_info.logo_addr; 20 if (!addr) { 21 error("There is no logo data."); 22 return; 23 } 24 25 if (panel_info.vl_width >= panel_info.logo_width) { 26 x = ((panel_info.vl_width - panel_info.logo_width) >> 1); 27 x += panel_info.logo_x_offset; /* For X center align */ 28 } else { 29 x = 0; 30 printf("Warning: image width is bigger than display width\n"); 31 } 32 33 if (panel_info.vl_height >= panel_info.logo_height) { 34 y = ((panel_info.vl_height - panel_info.logo_height) >> 1); 35 y += panel_info.logo_y_offset; /* For Y center align */ 36 } else { 37 y = 0; 38 printf("Warning: image height is bigger than display height\n"); 39 } 40 41 bmp_display(addr, x, y); 42 } 43 #endif /* CONFIG_CMD_BMP */ 44