From: yxj Date: Tue, 26 Feb 2013 09:11:20 +0000 (+0800) Subject: rk3188 lcdc:add ioctl RK_FBIOPUT_COLOR_KEY_CFG for color key config X-Git-Tag: firefly_0821_release~7513 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3bc9ce5af684495cb168e86126a2624290798471;p=firefly-linux-kernel-4.4.55.git rk3188 lcdc:add ioctl RK_FBIOPUT_COLOR_KEY_CFG for color key config --- diff --git a/drivers/video/rockchip/lcdc/rk3188_lcdc.c b/drivers/video/rockchip/lcdc/rk3188_lcdc.c index e08c45e54f32..54482424db2e 100644 --- a/drivers/video/rockchip/lcdc/rk3188_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3188_lcdc.c @@ -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; }