Skip to content

Commit 312d971

Browse files
Chaithrika U Storvalds
authored andcommitted
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>
1 parent 1d3c6c7 commit 312d971

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎drivers/video/da8xx-fb.c‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,35 @@ static int fb_ioctl(struct fb_info *info, unsigned int cmd,
702702
return 0;
703703
}
704704

705+
static 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+
705734
static struct fb_ops da8xx_fb_ops = {
706735
.owner = THIS_MODULE,
707736
.fb_check_var = fb_check_var,
@@ -710,6 +739,7 @@ static struct fb_ops da8xx_fb_ops = {
710739
.fb_fillrect = cfb_fillrect,
711740
.fb_copyarea = cfb_copyarea,
712741
.fb_imageblit = cfb_imageblit,
742+
.fb_blank = cfb_blank,
713743
};
714744

715745
static int __init fb_probe(struct platform_device *device)

0 commit comments

Comments
 (0)