Beispiel #1
0
static int rk3188_lcdc_set_par(struct rk_lcdc_device_driver *dev_drv,int layer_id)
{
	struct rk3188_lcdc_device *lcdc_dev = 
			container_of(dev_drv,struct rk3188_lcdc_device,driver);
	struct layer_par *par = NULL;
	rk_screen *screen = dev_drv->cur_screen;

	if(!screen)
	{
		dev_err(dev_drv->dev,"screen is null!\n");
		return -ENOENT;
	}
	if(layer_id==0)
	{
		par = dev_drv->layer_par[0];
		win0_set_par(lcdc_dev,screen,par);
	}
	else if(layer_id==1)
	{
		par = dev_drv->layer_par[1];
		win1_set_par(lcdc_dev,screen,par);
	}
	else
	{
		dev_err(dev_drv->dev,"unsupported win number:%d\n",layer_id);
		return -EINVAL;
	}
	
	return 0;
}
Beispiel #2
0
static int rk30_lcdc_set_par(struct rk_lcdc_device_driver *dev_drv,int layer_id)
{
	struct rk30_lcdc_device *lcdc_dev = container_of(dev_drv,struct rk30_lcdc_device,driver);
	struct layer_par *par = NULL;
	rk_screen *screen = dev_drv->cur_screen;
	
	if(!screen)
	{
		printk(KERN_ERR "screen is null!\n");
		return -ENOENT;
	}
	if(layer_id==0)
	{
		par = dev_drv->layer_par[0];
        	win0_set_par(lcdc_dev,screen,par);
	}
	else if(layer_id==1)
	{
		par = dev_drv->layer_par[1];
        	win1_set_par(lcdc_dev,screen,par);
	}
	else if(layer_id == 2)
	{
		par = dev_drv->layer_par[2];
        	win2_set_par(lcdc_dev,screen,par);
	}
	
	return 0;
}