#endif
sprintf(name, "lcdc%d",lcdc_id);
- for(i = 0; i < inf->num_lcdc; i++) //find the driver the display device connected to
+ for(i = 0; i < inf->num_lcdc; i++) //find the driver for the extend display device
{
- if(!strcmp(inf->lcdc_dev_drv[i]->name,name))
+ if(inf->lcdc_dev_drv[i]->screen_ctr_info->prop == EXTEND)
{
dev_drv = inf->lcdc_dev_drv[i];
+ printk("hdmi connect to lcdc%d\n",dev_drv->id);
break;
}
}
}
- if((lcdc_id == 0) || (inf->num_lcdc == 1))
+ if(inf->num_lcdc == 1)
{
info = inf->fb[0];
}
- else if((lcdc_id == 1)&&(inf->num_lcdc == 2))
+ else if(inf->num_lcdc == 2)
{
info = inf->fb[dev_drv->num_layer]; //the main fb of lcdc1
}
sprintf(name, "lcdc%d",lcdc_id);
for(i = 0; i < inf->num_lcdc; i++)
{
- if(!strcmp(inf->lcdc_dev_drv[i]->name,name))
+ if(inf->lcdc_dev_drv[i]->screen_ctr_info->prop == EXTEND)
{
dev_drv = inf->lcdc_dev_drv[i];
break;
}
- if((lcdc_id == 0) || (inf->num_lcdc == 1))
+ if(inf->num_lcdc == 1)
{
info = inf->fb[0];
}
- else if( (inf->num_lcdc == 2)&&(lcdc_id == 1))
+ else if(inf->num_lcdc == 2)
{
info = inf->fb[dev_drv->num_layer];
}