diff options
| author | Benet Clark <benetc@codeaurora.org> | 2014-02-05 02:27:58 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:27:03 -0700 |
| commit | 90824b647392077f98c8ba7f073d660f6cb18577 (patch) | |
| tree | fb9ebc0eff73bc9294fb648c6f6329bf3e52275d | |
| parent | 858ae4372a222a72e26a8a6dd4c7a357e77faa24 (diff) | |
msm: mdss: Add calib DCM compat ioctl to PP compat layer
Added calib DCM state compat structures to PP compat ioctl.
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Change-Id: I1fcb00490f598a4091845fa19153a0d10e5f378f
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_compat_utils.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/video/fbdev/msm/mdss_compat_utils.c b/drivers/video/fbdev/msm/mdss_compat_utils.c index fb281753222c..9f173205ffd3 100644 --- a/drivers/video/fbdev/msm/mdss_compat_utils.c +++ b/drivers/video/fbdev/msm/mdss_compat_utils.c @@ -1594,6 +1594,21 @@ static int __to_user_calib_config_buffer( return 0; } +static int __from_user_calib_dcm_state( + struct mdp_calib_dcm_state32 __user *calib_dcm32, + struct mdp_calib_dcm_state __user *calib_dcm) +{ + if (copy_in_user(&calib_dcm->ops, + &calib_dcm32->ops, + sizeof(uint32_t)) || + copy_in_user(&calib_dcm->dcm_state, + &calib_dcm32->dcm_state, + sizeof(uint32_t))) + return -EFAULT; + + return 0; +} + static int __pp_compat_alloc(struct msmfb_mdp_pp32 __user *pp32, struct msmfb_mdp_pp __user **pp, uint32_t op) @@ -1862,6 +1877,14 @@ static int mdss_compat_pp_ioctl(struct fb_info *info, unsigned int cmd, compat_ptr((uintptr_t)&pp32->data.calib_buffer), &pp->data.calib_buffer); break; + case mdp_op_calib_dcm_state: + ret = __from_user_calib_dcm_state( + compat_ptr((uintptr_t)&pp32->data.calib_dcm), + &pp->data.calib_dcm); + if (ret) + goto pp_compat_exit; + ret = mdss_fb_do_ioctl(info, cmd, (unsigned long) pp); + break; default: break; } |
