aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorChaithrika U S <chaithrika@ti.com>2009-12-15 19:46:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 10:20:05 -0500
commit312d97152faa30ac4c007937ea09c9c27b10e249 (patch)
tree5ccaeb57210673668bff68546c81773d916c8e97 /drivers/video
parent1d3c6c7b366bdc3406af96bf55d63b4aa24f400a (diff)
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')
-rw-r--r--drivers/video/da8xx-fb.c30
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,
702 return 0; 702 return 0;
703} 703}
704 704
705static int cfb_blank(int blank, struct fb_info *info)
706{
707 struct da8xx_fb_par *par = info->par;
708 int ret = 0;
709
710 if (par->blank == blank)
711 return 0;
712
713 par->blank = blank;
714 switch (blank) {
715 case FB_BLANK_UNBLANK:
716 if (par->panel_power_ctrl)
717 par->panel_power_ctrl(1);
718
719 lcd_enable_raster();
720 break;
721 case FB_BLANK_POWERDOWN:
722 if (par->panel_power_ctrl)
723 par->panel_power_ctrl(0);
724
725 lcd_disable_raster();
726 break;
727 default:
728 ret = -EINVAL;
729 }
730
731 return ret;
732}
733
705static struct fb_ops da8xx_fb_ops = { 734static struct fb_ops da8xx_fb_ops = {
706 .owner = THIS_MODULE, 735 .owner = THIS_MODULE,
707 .fb_check_var = fb_check_var, 736 .fb_check_var = fb_check_var,
@@ -710,6 +739,7 @@ static struct fb_ops da8xx_fb_ops = {
710 .fb_fillrect = cfb_fillrect, 739 .fb_fillrect = cfb_fillrect,
711 .fb_copyarea = cfb_copyarea, 740 .fb_copyarea = cfb_copyarea,
712 .fb_imageblit = cfb_imageblit, 741 .fb_imageblit = cfb_imageblit,
742 .fb_blank = cfb_blank,
713}; 743};
714 744
715static int __init fb_probe(struct platform_device *device) 745static int __init fb_probe(struct platform_device *device)