rk3188 lcdc:add ioctl RK_FBIOPUT_COLOR_KEY_CFG for color key config
authoryxj <yxj@rock-chips.com>
Tue, 26 Feb 2013 09:11:20 +0000 (17:11 +0800)
committeryxj <yxj@rock-chips.com>
Tue, 26 Feb 2013 09:12:45 +0000 (17:12 +0800)
drivers/video/rockchip/lcdc/rk3188_lcdc.c

index e08c45e54f321b7c0bc91b015b2b5b545eaf51dd..54482424db2e462f5e396dc9b2a8ffda5908749f 100644 (file)
@@ -879,6 +879,7 @@ static int rk3188_lcdc_ioctl(struct rk_lcdc_device_driver *dev_drv, unsigned int
        u32 panel_size[2];
        void __user *argp = (void __user *)arg;
        int enable;
+       struct color_key_cfg clr_key_cfg;
        
        switch(cmd)
        {
@@ -888,6 +889,13 @@ static int rk3188_lcdc_ioctl(struct rk_lcdc_device_driver *dev_drv, unsigned int
                        if(copy_to_user(argp, panel_size, 8)) 
                                return -EFAULT;
                        break;
+               case RK_FBIOPUT_COLOR_KEY_CFG:
+                       if(copy_from_user(&clr_key_cfg,argp,sizeof(struct color_key_cfg ))) 
+                               return -EFAULT;
+                       lcdc_writel(lcdc_dev,WIN0_COLOR_KEY,clr_key_cfg.win0_color_key_cfg);
+                       lcdc_writel(lcdc_dev,WIN1_COLOR_KEY,clr_key_cfg.win1_color_key_cfg);
+                       break;
+                       
                default:
                        break;
        }