diff options
author | Fancy Fang <chen.fang@freescale.com> | 2015-10-14 17:37:13 +0800 |
---|---|---|
committer | Fancy Fang <chen.fang@freescale.com> | 2015-10-16 15:50:03 +0800 |
commit | 4bfbf67a384f1292d217769b77858c08f38fe658 (patch) | |
tree | dd2bbffe46e9ef138acec631fc53523067bb34c0 /drivers | |
parent | f46d113a02f5375c38fc9aba88c587fd672a30c4 (diff) |
MLK-11687 video: mxsfb: remove timestamp in wait for vsync ioctl
Remove the timestamp usage in the 'MXCFB_WAIT_FOR_VSYNC'
ioctl handler, since the 64 bit timestamp would cause
data overflow when writing it to user memory.
Signed-off-by: Fancy Fang <chen.fang@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/mxsfb.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index 3fa83dbb8629..b69ee3539712 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c @@ -216,7 +216,6 @@ struct mxsfb_info { struct regulator *reg_lcd; bool wait4vsync; struct completion vsync_complete; - ktime_t vsync_nf_timestamp; struct completion flip_complete; int cur_blank; int restore_blank; @@ -413,7 +412,6 @@ static irqreturn_t mxsfb_irq_handler(int irq, void *dev_id) writel(CTRL1_VSYNC_EDGE_IRQ_EN, host->base + LCDC_CTRL1 + REG_CLR); host->wait4vsync = 0; - host->vsync_nf_timestamp = ktime_get(); complete(&host->vsync_complete); } @@ -870,16 +868,7 @@ static int mxsfb_ioctl(struct fb_info *fb_info, unsigned int cmd, switch (cmd) { case MXCFB_WAIT_FOR_VSYNC: - { - long long timestamp; - struct mxsfb_info *host = to_imxfb_host(fb_info); - ret = mxsfb_wait_for_vsync(fb_info); - timestamp = ktime_to_ns(host->vsync_nf_timestamp); - if ((ret == 0) && copy_to_user((void *)arg, - ×tamp, sizeof(timestamp))) { - ret = -EFAULT; - } - } + ret = mxsfb_wait_for_vsync(fb_info); break; default: break; |