From: ywj Date: Wed, 22 Aug 2012 04:44:13 +0000 (+0800) Subject: amend size of bmp logo and zoom out display X-Git-Tag: firefly_0821_release~8876 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=519499b58a1227c487c27b9326fa4ae75625c7fb;p=firefly-linux-kernel-4.4.55.git amend size of bmp logo and zoom out display --- diff --git a/drivers/video/logo/logo_bmp.bmp b/drivers/video/logo/logo_bmp.bmp index df5298e35b05..0af3b87d0f1e 100644 Binary files a/drivers/video/logo/logo_bmp.bmp and b/drivers/video/logo/logo_bmp.bmp differ diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 902192ffd2d6..6ef24eb62a18 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -884,9 +884,9 @@ static int init_lcdc_device_driver(struct rk_lcdc_device_driver *dev_drv, return 0; } - + #ifdef CONFIG_LOGO_LINUX_BMP -static const struct linux_logo *bmp_logo; +static struct linux_logo *bmp_logo; static int fb_prepare_bmp_logo(struct fb_info *info, int rotate) { bmp_logo = fb_find_logo(24); @@ -899,7 +899,19 @@ static int fb_prepare_bmp_logo(struct fb_info *info, int rotate) static void fb_show_bmp_logo(struct fb_info *info, int rotate) { - memcpy(info->screen_base, bmp_logo->data, bmp_logo->width * bmp_logo->height * 4); + unsigned char *src=bmp_logo->data; + unsigned char *dst=info->screen_base; + int i; + + if(bmp_logo->width>info->var.xres) + bmp_logo->width=info->var.xres; + + if(bmp_logo->height>info->var.yres) + bmp_logo->height=info->var.yres; + + for(i=0;iheight;i++) + memcpy(dst+info->var.xres*i*4, src+bmp_logo->width*i*4, bmp_logo->width*4); + } #endif