int lcd_enable(void) { //debug("%s\n", __FUNCTION__); //lcd_setup_gama_table(&tcon_config); /* aml_8726m_bl_init(); lcd_io_init(); tcon_probe(); osd_init_hw(); osd_hw_setup(); */ mdelay(10); // power_off_backlight(); lcd_setup_gama_table(&tcon_config); //t13_io_init(); lcd_io_init(); tcon_probe(); osd_init_hw(); osd_hw_setup(); //video_dac_disable(); // power_on_lcd(); // power_on_backlight(); //disable when required power sequence. return 0; }
int lcd_enable(void) { sn7325_init(); lcd_setup_gama_table(&tcon_config); aml_8726m_bl_init(); lcd_io_init(); tcon_probe(); osd_init_hw(); osd_hw_setup(); return 0; }
static int osd_transfer(logo_object_t *plogo) { src_dst_info_t op_info; ge2d_context_t *context; config_para_t ge2d_config; int screen_mem_start; int screen_size ; u32 canvas_index; canvas_t canvas; if(!plogo->dev->hw_initialized) // hardware need initialized first . { if(osd_hw_setup(plogo)) return -OUTPUT_DEV_SETUP_FAIL; amlog_mask_level(LOG_MASK_DEVICE,LOG_LEVEL_LOW,"osd hardware initiate success\n"); } if (plogo->need_transfer==FALSE) return -EDEV_NO_TRANSFER_NEED; ge2d_config.src_dst_type=plogo->dev->idx?OSD1_OSD1:OSD0_OSD0; ge2d_config.alu_const_color=0x000000ff; context=dev_ge2d_setup(&ge2d_config); //we use ge2d to strechblit pic. if(NULL==context) return -OUTPUT_DEV_SETUP_FAIL; amlog_mask_level(LOG_MASK_DEVICE,LOG_LEVEL_LOW,"logo setup ge2d device OK\n"); plogo->dev->ge2d_context=context; //clear dst rect op_info.color=0x000000ff; op_info.dst_rect.x=0; op_info.dst_rect.y=0; op_info.dst_rect.w=plogo->dev->vinfo->width; op_info.dst_rect.h=plogo->dev->vinfo->height; dev_ge2d_cmd(context,CMD_FILLRECT,&op_info); amlog_mask_level(LOG_MASK_DEVICE,LOG_LEVEL_LOW,"fill==dst:%d-%d-%d-%d\n",op_info.dst_rect.x,op_info.dst_rect.y,op_info.dst_rect.w,op_info.dst_rect.h); op_info.src_rect.x=0; //setup origin src rect op_info.src_rect.y=0; op_info.src_rect.w=plogo->parser->logo_pic_info.width; op_info.src_rect.h=plogo->parser->logo_pic_info.height; switch (plogo->para.dis_mode) { case DISP_MODE_ORIGIN: op_info.dst_rect.x=op_info.src_rect.x; op_info.dst_rect.y=op_info.src_rect.y; op_info.dst_rect.w=op_info.src_rect.w; op_info.dst_rect.h=op_info.src_rect.h; break; case DISP_MODE_CENTER: //maybe offset is useful op_info.dst_rect.x= (plogo->dev->vinfo->width - plogo->parser->logo_pic_info.width)>>1; op_info.dst_rect.y=(plogo->dev->vinfo->height - plogo->parser->logo_pic_info.height)>>1; op_info.dst_rect.w=op_info.src_rect.w; op_info.dst_rect.h=op_info.src_rect.h; break; case DISP_MODE_FULL_SCREEN: op_info.dst_rect.x=0; op_info.dst_rect.y=0; op_info.dst_rect.w=plogo->dev->vinfo->width; op_info.dst_rect.h=plogo->dev->vinfo->height; break; } if(strcmp(plogo->parser->name,"bmp")==0) { screen_mem_start = plogo->platform_res[plogo->para.output_dev_type].mem_start; screen_size=plogo->dev->vinfo->width*plogo->dev->vinfo->height*(plogo->parser->decoder.bmp.color_depth>>3); ge2d_config.src_dst_type=plogo->dev->idx?ALLOC_OSD1:ALLOC_OSD0; ge2d_config.alu_const_color=0x000000ff; ge2d_config.src_format=GE2D_FORMAT_S24_RGB; ge2d_config.src_planes[0].addr = screen_mem_start+screen_size; ge2d_config.src_planes[0].w = plogo->parser->logo_pic_info.width; ge2d_config.src_planes[0].h = plogo->parser->logo_pic_info.height; context=dev_ge2d_setup(&ge2d_config); if(NULL==context) return -OUTPUT_DEV_SETUP_FAIL; amlog_mask_level(LOG_MASK_DEVICE,LOG_LEVEL_LOW,"logo setup ge2d device OK\n"); plogo->dev->ge2d_context=context; }