Nowadays, lot of customers require contiguous display from app bootloader to kernel/android without black screen or diming panel. It is simple to say that they want bootloader splash image to be seen until Android splash image boots up.
As we know, the initial state of mdp/pixel clock are off by default when linux kernel startup, but as for splash image display during OEMSBL or AP bootloader, the mdp clock, pixel clock, and lcdc are already on, which conflict with the linux kernel's assumption. In linux kernel, there are some control logic and reference count to manage the mdp/pixel clock, the core logic is within function: void mdp_pipe_ctrl(subblock, powerstate, inisr). In the startup process, most of time mdp_pipe_ctrl(poweron) and mdp_pipe_ctrl(poweroff) are using in pair in one function to keep the reference count matched, so it will always try to keep clock in off state to save power consume.
Because linux kernel does not know the initial state of our mdp/pixel clock are on, so if we don't make any changes, the mdp/pixel clock will be disabled at the beginning of of kernel startup, and re-enabled until linux kernel enable display. so we must bypass the mdp/pixel clock control logic until kernel first time enable display.
As there is a time out value (mdp_timer_duration = 1HZ) used to control the disable of mdp/pixel clock, so we can enlarge this value ( 100HZ) to
skip the real operation of mdp/pixel clock off for this backdoor purpose.
The detailed changes are in the file attached.
/*==================================================================*/
1. Changes in mdp.c
/* Add a global flag to indicate supporting of the feature:
continuous display from app bootloader to kernel/android
*/
+ boolean mdp_continues_display = TRUE;
2. Changes in mdp_dma_lcdc.c
+ extern unsigned long mdp_timer_duration;
/* Defined in mdp.c to indicate support appboot logo display*/
+ extern boolean mdp_continues_display;
int mdp_lcdc_on(struct platform_device *pdev)
{
<~put in the end of this function~>
<~snip~>
+ if(mdp_continues_display) {
+ mdp_continues_display = FALSE;
+ mdp_timer_duration = (HZ);
+ }
<~snip~>
}
3. Changes in mdp_hw_init.c
+ extern unsigned long mdp_timer_duration;
+ extern boolean mdp_continues_display;
void mdp_hw_init(void)
{
<~snip~>
mdp_timer_duration = (100 * HZ); /* 100 sec */
<~snip~>
#ifndef CONFIG_FB_MSM_MDP22
+ /* skip the code to avoid LCDC is to be disable */
+ if (!mdp_continues_display) {
MDP_OUTP(MDP_BASE + 0xE0000, 0);
MDP_OUTP(MDP_BASE + 0x100, 0xffffffff);
MDP_OUTP(MDP_BASE + 0x90070, 0);
MDP_OUTP(MDP_BASE + 0x94010, 1);
MDP_OUTP(MDP_BASE + 0x9401c, 2);
+ }
No comments:
Post a Comment