|
发表于 2015-2-11 18:16:52
|
显示全部楼层
如下修改可以运行么?将原始的代码屏蔽掉,换用自己的代码试试。。。。
static void LCD_cfg_panel_info(__panel_para_t * info)
{
__u32 i = 0, j=0;
memset(info,0,sizeof(__panel_para_t));
//interface
info->lcd_if = 3; //0:hv; 1:cpu/8080; 2:reserved; 3:lvds
info->lcd_lvds_ch = 0; //0:single link 1:dual link
info->lcd_lvds_bitwidth = 1; //0:24bit; 1:18bit;
//timing
info->lcd_x = 1280; //Hor Pixels
info->lcd_y = 800; //Ver Pixels
info->lcd_dclk_freq = 77; //Pixel Data Cycle,in MHz
info->lcd_ht = 1450; //Hor Total Time
info->lcd_hbp = 40; //Hor Back Porch
info->lcd_vt = 930*2; //Ver Total Time*2
info->lcd_vbp = 40; //Ver Back Porch
info->lcd_hv_hspw = 10; //Hor Sync Time
info->lcd_hv_vspw = 10; //Ver Sync Time
info->lcd_io_cfg0 = 0x00000000; //Clock Phase
//color
info->lcd_frm = 1; //0: direct; 1: rgb666 dither; 2:rgb656 dither
info->lcd_gamma_correction_en = 0;
info->lcd_pwm_not_used = 0;
info->lcd_pwm_ch = 0;
info->lcd_pwm_freq = 12500; //Hz
info->lcd_pwm_pol = 0;
// info->lcd_x = 800;
// info->lcd_y = 480;
// info->lcd_dclk_freq = 33; //MHz
// info->lcd_pwm_not_used = 0;
// info->lcd_pwm_ch = 0;
// info->lcd_pwm_freq = 10000; //Hz
// info->lcd_pwm_pol = 0;
//
// info->lcd_if = 0; //0:hv(sync+de); 1:8080; 2:ttl; 3:lvds
//
// info->lcd_hbp = 215; //hsync back porch
// info->lcd_ht = 1055; //hsync total cycle
// info->lcd_hspw = 0; //hsync plus width
// info->lcd_vbp = 34; //vsync back porch
// info->lcd_vt = 2 * 525; //vysnc total cycle *2
// info->lcd_vspw = 0; //vysnc plus width
//
// info->lcd_hv_if = 0; //0:hv parallel 1:hv serial
// info->lcd_hv_smode = 0; //0:RGB888 1:CCIR656
// info->lcd_hv_s888_if = 0; //serial RGB format
// info->lcd_hv_syuv_if = 0; //serial YUV format
//
// info->lcd_cpu_if = 0; //0:18bit 4:16bit
// info->lcd_frm = 0; //0: disable; 1: enable rgb666 dither; 2:enable rgb656 dither
//
// info->lcd_lvds_ch = 0; //0:single channel; 1:dual channel
// info->lcd_lvds_mode = 0; //0:NS mode; 1:JEIDA mode
// info->lcd_lvds_bitwidth = 0; //0:24bit; 1:18bit
// info->lcd_lvds_io_cross = 0; //0:normal; 1:pn cross
//
// info->lcd_io_cfg0 = 0x10000000;
//
// info->lcd_gamma_correction_en = 0;
// if(info->lcd_gamma_correction_en)
// {
// __u32 items = sizeof(g_gamma_tbl)/2;
//
// for(i=0; i<items-1; i++)
// {
// __u32 num = g_gamma_tbl[i+1][0] - g_gamma_tbl[i][0];
//
// //__inf("handling{%d,%d}\n", g_gamma_tbl[i][0], g_gamma_tbl[i][1]);
// for(j=0; j<num; j++)
// {
// __u32 value = 0;
//
// value = g_gamma_tbl[i][1] + ((g_gamma_tbl[i+1][1] - g_gamma_tbl[i][1]) * j)/num;
// info->lcd_gamma_tbl[g_gamma_tbl[i][0] + j] = (value<<16) + (value<<8) + value;
// //__inf("----gamma %d, %d\n", g_gamma_tbl[i][0] + j, value);
// }
// }
// info->lcd_gamma_tbl[255] = (g_gamma_tbl[items-1][1]<<16) + (g_gamma_tbl[items-1][1]<<8) + g_gamma_tbl[items-1][1];
// //__inf("----gamma 255, %d\n", g_gamma_tbl[items-1][1]);
// }
}
#endif
|
|