コード例 #1
0
static int __init mipi_video_lead_wvga_pt_init(void)
{
	int ret;


	if (msm_fb_detect_client("video_wvga_pt"))
			return 0;


printk("wangminrong the lcd is video_wvga_pt\r\n");
#if (defined CONFIG_PROJECT_P825F01 ) || ( defined CONFIG_PROJECT_P825A31 ) || ( defined CONFIG_PROJECT_P865F01 ) || ( defined CONFIG_PROJECT_P865V30 )
#ifdef CONFIG_QHD_LCM
	pinfo.xres = 540;
	pinfo.yres = 960;
#else
	pinfo.xres = 480;
	pinfo.yres = 854;
#endif
#elif ( defined CONFIG_PROJECT_P865F02 )
	pinfo.xres = 540;
	pinfo.yres = 960;	
#else
	pinfo.xres = 480;
	pinfo.yres = 800;
#endif
	pinfo.type = MIPI_VIDEO_PANEL;
	pinfo.pdest = DISPLAY_1;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 24;
#if (defined CONFIG_PROJECT_P825F01 ) || ( defined CONFIG_PROJECT_P825A31 ) || ( defined CONFIG_PROJECT_P865F01 ) || ( defined CONFIG_PROJECT_P865V30 )//wangminrong 20120926 modify for cts fps test fail clk = fps*v_peroid*hperoid*bpp*8/lanes
	pinfo.lcdc.h_back_porch = 80;//100
	pinfo.lcdc.h_front_porch = 80;//100

#elif defined (CONFIG_PROJECT_P825T20)
	pinfo.lcdc.h_back_porch = 50;
	pinfo.lcdc.h_front_porch = 165;

#else
	pinfo.lcdc.h_back_porch = 100;//100
	pinfo.lcdc.h_front_porch = 100;//100
#endif
	pinfo.lcdc.h_pulse_width = 10;

#if defined (CONFIG_PROJECT_P825T20)
	pinfo.lcdc.v_back_porch = 12;
	pinfo.lcdc.v_front_porch = 12;
	pinfo.lcdc.v_pulse_width = 2;
#else
	pinfo.lcdc.v_back_porch = 26;//26;//lead panel must use 26
	pinfo.lcdc.v_front_porch = 10;
	pinfo.lcdc.v_pulse_width = 10;
#endif

	pinfo.clk_rate = 420000000;//499000000;

	pinfo.lcdc.border_clr = 0;	/* blk */
	pinfo.lcdc.underflow_clr = 0xff;	/* blue */
	pinfo.lcdc.hsync_skew = 0;
	pinfo.bl_max = 32;
	pinfo.bl_min = 1;
	pinfo.fb_num = 2;

	pinfo.mipi.mode = DSI_VIDEO_MODE;
	pinfo.mipi.pulse_mode_hsa_he = TRUE;
	pinfo.mipi.hfp_power_stop = TRUE;
	pinfo.mipi.hbp_power_stop = TRUE;
	pinfo.mipi.hsa_power_stop = TRUE;
	pinfo.mipi.eof_bllp_power_stop = TRUE;
	pinfo.mipi.bllp_power_stop = TRUE;

#if defined (CONFIG_PROJECT_P825T20)
	pinfo.mipi.traffic_mode = 2;
#else
	pinfo.mipi.traffic_mode = 0; 
#endif

	pinfo.mipi.dst_format =  DSI_VIDEO_DST_FORMAT_RGB888;
	pinfo.mipi.vc = 0;
	pinfo.mipi.rgb_swap = DSI_RGB_SWAP_RGB;
	pinfo.mipi.data_lane0 = TRUE;
	pinfo.mipi.data_lane1 = TRUE;
	pinfo.mipi.t_clk_post = 0x20;
	pinfo.mipi.t_clk_pre = 0x2F;
	pinfo.mipi.stream = 0; /* dma_p */
	pinfo.mipi.mdp_trigger = DSI_CMD_TRIGGER_NONE;
	pinfo.mipi.dma_trigger = DSI_CMD_TRIGGER_SW;
	pinfo.mipi.frame_rate = 60;
	pinfo.mipi.dsi_phy_db = &dsi_video_mode_phy_db;
	pinfo.mipi.dlane_swap = 0x01;
	pinfo.mipi.tx_eot_append = 0x01;


	ret = mipi_lead_device_register(&pinfo, MIPI_DSI_PRIM,
						MIPI_DSI_PANEL_WVGA_PT);
	if (ret)
		printk(KERN_ERR "%s: failed to register device!\n", __func__);

	return ret;
}
コード例 #2
0
static int __init mipi_video_lead_wvga_pt_init(void)
{
	int ret;

#ifdef CONFIG_FB_MSM_MIPI_PANEL_DETECT
	if (msm_fb_detect_client("mipi_video_coeus_wvga"))
		return 0;
#endif

	pinfo.xres = 540;
	pinfo.yres = 960;
	pinfo.pdest = DISPLAY_1;
	pinfo.wait_cycle = 0;
	pinfo.bpp = 24;
	pinfo.lcdc.h_back_porch = 80;
	pinfo.lcdc.h_front_porch = 80;
	pinfo.lcdc.h_pulse_width = 8;
	pinfo.lcdc.v_back_porch =32;
	pinfo.lcdc.v_front_porch = 32;
	pinfo.lcdc.v_pulse_width = 4;
	pinfo.lcdc.border_clr = 0;	/* blk */
	pinfo.lcdc.underflow_clr = 0xff;	/* blue */
	pinfo.lcdc.hsync_skew = 0;
#ifdef CONFIG_MACH_OCEANUS
#ifdef USE_CABC_PANEL
	pinfo.bl_max = 254;
#else
	pinfo.bl_max = 31;
#endif
#else
	pinfo.bl_max = 240;
#endif
	pinfo.bl_min = 1;
	pinfo.fb_num = 2; 
	pinfo.clk_rate = 526000000;
#ifdef USE_CMD_MODE
		pinfo.lcd.vsync_enable = TRUE;
		pinfo.lcd.hw_vsync_mode = TRUE;
		pinfo.lcd.refx100 = 5900; /* adjust refx100 to prevent tearing */
		pinfo.mipi.te_sel = 1; /* TE from vsycn gpio */
		pinfo.mipi.interleave_max = 1;
		pinfo.mipi.insert_dcs_cmd = TRUE;
		pinfo.mipi.wr_mem_continue = 0x3c;
		pinfo.mipi.wr_mem_start = 0x2c;
		pinfo.lcd.v_back_porch = 32;
		pinfo.lcd.v_front_porch = 32;
		pinfo.lcd.v_pulse_width = 4;
	
		pinfo.type =MIPI_CMD_PANEL;
		pinfo.mipi.mode =DSI_CMD_MODE;
		pinfo.mipi.dst_format = DSI_CMD_DST_FORMAT_RGB888;
		pinfo.mipi.mdp_trigger =DSI_CMD_TRIGGER_SW_TE;
#else	//video mode
		pinfo.type =MIPI_VIDEO_PANEL;
		pinfo.mipi.mode = DSI_VIDEO_MODE;
		pinfo.mipi.dst_format = DSI_VIDEO_DST_FORMAT_RGB888;
		pinfo.mipi.mdp_trigger =DSI_CMD_TRIGGER_SW;
#endif

	pinfo.mipi.pulse_mode_hsa_he = TRUE;
	pinfo.mipi.hfp_power_stop = TRUE;
	pinfo.mipi.hbp_power_stop = TRUE;
	pinfo.mipi.hsa_power_stop = TRUE;
	pinfo.mipi.eof_bllp_power_stop = TRUE;
	pinfo.mipi.bllp_power_stop = TRUE;
	pinfo.mipi.traffic_mode = DSI_BURST_MODE;
	pinfo.mipi.vc = 0;
	pinfo.mipi.rgb_swap = DSI_RGB_SWAP_BGR;
	pinfo.mipi.data_lane0 = TRUE;
	pinfo.mipi.data_lane1 = TRUE;
	pinfo.mipi.t_clk_post = 0x22;	//0x03;
	pinfo.mipi.t_clk_pre = 0x3d;	//0x24;
	pinfo.mipi.stream = 0; /* dma_p */
	pinfo.mipi.dma_trigger = DSI_CMD_TRIGGER_SW;
	pinfo.mipi.frame_rate = 60;
	pinfo.mipi.esc_byte_ratio = 4;
	pinfo.mipi.dlane_swap = 0x01;
	pinfo.mipi.rx_eot_ignore = 0;
	pinfo.mipi.tx_eot_append = TRUE;	
	pinfo.mipi.dsi_phy_db =&dsi_video_mode_phy_db;// dsi_video_mode_phy_dbs;
	//pinfo.mipi.dsi_phy_db_count = ARRAY_SIZE(dsi_video_mode_phy_dbs);
	ret = mipi_lead_device_register(&pinfo, MIPI_DSI_PRIM, MIPI_DSI_PANEL_WVGA_PT);
	
	if (ret)
		printk(KERN_ERR "%s: failed to register device!\n", __func__);

	return ret;
}