6/02/2012

An easy way to enable logo display during linux booting up

Recently, many customer requested display logo during linux booting up.
Actually, there are 2 codes place to implement log display in linux:
1. In init process, code is in /system/core/init.c, logo.c, which is linux standard method logo display.
2. In kernel framebuffer driver, code is in msm_fb.c, which is Qualcomm provided method logo display in an earlier time.

The second method can display logo as soon as framebuffer driver reister, but it is reported not work in many customer case.
The following patch can solve this problem.

In /kernel/drivers/video/msm/msm_fb.c
+ static int internal_fb_refcnt=0;
static int msm_fb_register(struct msm_fb_data_type *mfd)
{
<~snip~>
#ifdef CONFIG_FB_MSM_LOGO
- if (!load_565rle_image(INIT_IMAGE_FILE)) ; /* Flip buffer */
+ if (!load_565rle_image(INIT_IMAGE_FILE))
+ {
+ msm_fb_open(fbi, 0); // call msm_fb_open() internally to display logo at the first time point
+ internal_fb_refcnt = 1;
+ }

No comments:

Post a Comment