diff options
author | Wayne Zou <b36644@freescale.com> | 2013-02-20 13:46:01 +0800 |
---|---|---|
committer | Wayne Zou <b36644@freescale.com> | 2013-02-20 13:57:36 +0800 |
commit | 74dd3ca09cc25edebb59ecb698037f8aaf2743ec (patch) | |
tree | cdb941ba47662bca2a81e994628764167d0cd84e /drivers/video | |
parent | 6e9d71d11be3f96eafbe4f7be82fe78ffe46462a (diff) |
ENGR00251015-2 FB/IPU: Add mxcfb ioctrl to update IPU DP CSC matrix
Add mxcfb ioctrl MXCFB_CSC_UPDATE to update IPU DP CSC matrix
for display adjustment.
This patch implements the ioctrl interface.
Signed-off-by: Wayne Zou <b36644@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc/mxc_ipuv3_fb.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c index e8a33987280c..f8dd59e355ea 100644 --- a/drivers/video/mxc/mxc_ipuv3_fb.c +++ b/drivers/video/mxc/mxc_ipuv3_fb.c @@ -1320,6 +1320,20 @@ static int mxcfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) break; } + case MXCFB_CSC_UPDATE: + { + struct mxcfb_csc_matrix csc; + + if (copy_from_user(&csc, (void *) arg, sizeof(csc))) + return -EFAULT; + + if ((mxc_fbi->ipu_ch != MEM_FG_SYNC) && + (mxc_fbi->ipu_ch != MEM_BG_SYNC) && + (mxc_fbi->ipu_ch != MEM_BG_ASYNC0)) + return -EFAULT; + ipu_set_csc_coefficients(mxc_fbi->ipu, mxc_fbi->ipu_ch, + csc.param); + } default: retval = -EINVAL; } |