Example #1
0
static void mipi_dispc_set_timing(struct panel_spec *panel)
{
	uint32_t timing_h = 0;
	uint32_t timing_v = 0;

	pr_debug("autotst_dispc: [%s]\n", __FUNCTION__);

	timing_h = rgb_calc_h_timing(panel->info.mipi->timing);
	timing_v = rgb_calc_v_timing(panel->info.mipi->timing);

	dispc_write(timing_h, DISPC_DPI_H_TIMING);
	dispc_write(timing_v, DISPC_DPI_V_TIMING);
}
static void sprdfb_mipi_panel_mount(struct sprdfb_device *dev)
{
	if((NULL == dev) || (NULL == dev->panel)){
		printk(KERN_ERR "sprdfb: [%s]: Invalid Param\n", __FUNCTION__);
		return;
	}

	pr_debug(KERN_INFO "sprdfb: [%s], dev_id = %d\n",__FUNCTION__, dev->dev_id);

	if(SPRDFB_MIPI_MODE_CMD == dev->panel->info.mipi->work_mode){
		dev->panel_if_type = SPRDFB_PANEL_IF_EDPI;
	}else{
		dev->panel_if_type = SPRDFB_PANEL_IF_DPI;
	}

	dev->panel->info.mipi->ops = &sprdfb_mipi_ops;

	if(NULL == dev->panel->ops->panel_readid){
		dev->panel->ops->panel_readid = mipi_readid;
	}

	dev->panel_timing.rgb_timing[RGB_LCD_H_TIMING] = rgb_calc_h_timing(dev->panel->info.mipi->timing);
	dev->panel_timing.rgb_timing[RGB_LCD_V_TIMING] = rgb_calc_v_timing(dev->panel->info.mipi->timing);
}