diff options
author | Chaithrika U S <chaithrika@ti.com> | 2009-12-16 03:46:39 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 18:20:05 +0300 |
commit | 312d97152faa30ac4c007937ea09c9c27b10e249 (patch) | |
tree | 5ccaeb57210673668bff68546c81773d916c8e97 /drivers/video/da8xx-fb.c | |
parent | 1d3c6c7b366bdc3406af96bf55d63b4aa24f400a (diff) | |
download | linux-312d97152faa30ac4c007937ea09c9c27b10e249.tar.xz |
davinci: fb: add framebuffer blank operation
Implement frame buffer blank operation feature for DA8xx/OMAP-L1xx driver.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/da8xx-fb.c')
-rw-r--r-- | drivers/video/da8xx-fb.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 36574bf61d06..369a5b3ac649 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -702,6 +702,35 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd, return 0; } +static int cfb_blank(int blank, struct fb_info *info) +{ + struct da8xx_fb_par *par = info->par; + int ret = 0; + + if (par->blank == blank) + return 0; + + par->blank = blank; + switch (blank) { + case FB_BLANK_UNBLANK: + if (par->panel_power_ctrl) + par->panel_power_ctrl(1); + + lcd_enable_raster(); + break; + case FB_BLANK_POWERDOWN: + if (par->panel_power_ctrl) + par->panel_power_ctrl(0); + + lcd_disable_raster(); + break; + default: + ret = -EINVAL; + } + + return ret; +} + static struct fb_ops da8xx_fb_ops = { .owner = THIS_MODULE, .fb_check_var = fb_check_var, @@ -710,6 +739,7 @@ static struct fb_ops da8xx_fb_ops = { .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, + .fb_blank = cfb_blank, }; static int __init fb_probe(struct platform_device *device) |