From: Grazvydas Ignotas Date: Sun, 3 May 2009 12:43:15 +0000 (+0300) Subject: DSS2: add support for FBIO_WAITFORVSYNC X-Git-Tag: Release-2010-05/1~2^2~80 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=b6c3e2451731605ac2603e4f73161beaaff8a6a2 DSS2: add support for FBIO_WAITFORVSYNC FBIO_WAITFORVSYNC is semi-stardard ioctl for waiting vsync, already used by some userspace, so add it as an alias for OMAPFB_WAITFORVSYNC. Signed-off-by: Grazvydas Ignotas --- diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index 79d891678c34..c893fc9229b5 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c @@ -450,6 +450,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) enum omapfb_update_mode update_mode; int test_num; struct omapfb_memory_read memory_read; + u_int32_t crt; } p; int r = 0; @@ -590,6 +591,17 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) r = -EFAULT; break; + case FBIO_WAITFORVSYNC: + if (get_user(p.crt, (u_int32_t __user *)arg)) { + r = -EFAULT; + break; + } + if (p.crt != 0) { + r = -ENODEV; + break; + } + /* FALLTHROUGH */ + case OMAPFB_WAITFORVSYNC: DBG("ioctl WAITFORVSYNC\n"); if (!display) { diff --git a/include/linux/omapfb.h b/include/linux/omapfb.h index 7a34f22a2171..f7f34d2dc1e5 100644 --- a/include/linux/omapfb.h +++ b/include/linux/omapfb.h @@ -53,6 +53,10 @@ #define OMAPFB_WAITFORVSYNC OMAP_IO(57) #define OMAPFB_MEMORY_READ OMAP_IOR(58, struct omapfb_memory_read) +#ifndef FBIO_WAITFORVSYNC +#define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) +#endif + #define OMAPFB_CAPS_GENERIC_MASK 0x00000fff #define OMAPFB_CAPS_LCDC_MASK 0x00fff000 #define OMAPFB_CAPS_PANEL_MASK 0xff000000