diff options
author | Fahad Kunnadthadi <fahad.k@linaro.org> | 2013-04-22 21:58:31 +0530 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2013-04-23 05:05:06 +0000 |
commit | 0816984e3cbd7f974d0b35e71abc5a2135ad971b (patch) | |
tree | 17e6238baf589876bed928ea1605a0797411d5f9 | |
parent | f3577e9da89dcb5f399b32b79f6524d32e41e541 (diff) |
ARM: origen_quad, Hack patch to enable video on display.tracking-android-origen-quad
alpha blending code is not present in driver to properly display.
following patch enables video for temporary.
Issue: No seek bar, Need to Fix.
Signed-off-by: Fahad Kunnadthadi <fahad.k@linaro.org>
-rw-r--r-- | drivers/video/s3c-fb.c | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c index c755de750e66..fb6cdfe1aca4 100644 --- a/drivers/video/s3c-fb.c +++ b/drivers/video/s3c-fb.c @@ -68,6 +68,8 @@ struct s3c_fb; #define VIDOSD_D(win, variant) (OSD_BASE(win, variant) + 0x0C) #define S3CFB_WIN_SET_PIXEL_ALPHA _IOW('F', 204, __u32) +#define S3CFB_WIN_OFF _IOW('F', 205, __u32) +#define S3CFB_WIN_ON _IOW('F', 206, __u32) /** * struct s3c_fb_variant - fb variant information @@ -1044,13 +1046,39 @@ int s3cfb_set_alpha_blending(struct s3c_fb *ctrl, int id) return 0; } + +int s3cfb_set_enwin(struct s3c_fb *ctrl, int id,bool flag) +{ + u32 wvalue = 0, cfg; + + if(id == 0){ + dev_err(ctrl->dev, "[fb%d] does not exist to enable or disable win\n", + id); + return -EINVAL; + } + + if(flag==false){ + cfg=readl(ctrl->regs + S3C_WINCON(id)); + cfg= cfg & (~1); + writel(cfg, ctrl->regs + S3C_WINCON(id)); + } + else if(flag== true){ + cfg=readl(ctrl->regs + S3C_WINCON(id)); + cfg= cfg | 0x1; + writel(cfg, ctrl->regs + S3C_WINCON(id)); + } + + return 0; +} + + static int s3c_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { struct s3c_fb_win *win = info->par; struct s3c_fb *sfb = win->parent; int ret; - u32 crtc; + u32 crtc,window; switch (cmd) { case FBIO_WAITFORVSYNC: @@ -1064,6 +1092,20 @@ static int s3c_fb_ioctl(struct fb_info *info, unsigned int cmd, case S3CFB_WIN_SET_PIXEL_ALPHA: ret = s3cfb_set_alpha_blending(sfb, win->index); break; + case S3CFB_WIN_OFF: + if (get_user(window, (u32 __user *)arg)) { + ret = -EFAULT; + break; + } + ret = s3cfb_set_enwin(sfb,window,false); + break; + case S3CFB_WIN_ON: + if (get_user(window, (u32 __user *)arg)) { + ret = -EFAULT; + break; + } + ret = s3cfb_set_enwin(sfb,window,true); + break; default: ret = -ENOTTY; } |