From patchwork Fri Nov 27 06:43:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: chaithrika@ti.com X-Patchwork-Id: 63289 Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nAR72DY3019604 for ; Fri, 27 Nov 2009 07:02:14 GMT Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id nAR6xmok005342 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Nov 2009 00:59:48 -0600 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id nAR6xlxb027546; Fri, 27 Nov 2009 00:59:47 -0600 (CST) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id A2F2080627; Fri, 27 Nov 2009 00:59:47 -0600 (CST) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 3EC5680626 for ; Fri, 27 Nov 2009 00:59:45 -0600 (CST) Received: from tidmzi-ftp.india.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with SMTP id nAR6xgLf024584; Fri, 27 Nov 2009 00:59:43 -0600 (CST) Received: from symphonyindia.ti.com (symphony-ftp [192.168.247.11]) by tidmzi-ftp.india.ext.ti.com (Postfix) with SMTP id E76B73886B; Fri, 27 Nov 2009 12:26:30 +0530 (IST) Received: from localhost.localdomain ([192.168.247.76]) by symphonyindia.ti.com (8.13.1/8.12.10) with ESMTP id nAR6rPc8028717; Fri, 27 Nov 2009 12:23:25 +0530 From: Chaithrika U S To: linux-fbdev-devel@lists.sourceforge.net Subject: [PATCH 4/4] davinci: fb: Add framebuffer blank operation Date: Fri, 27 Nov 2009 12:13:47 +0530 Message-Id: <1259304227-19412-1-git-send-email-chaithrika@ti.com> X-Mailer: git-send-email 1.5.6 Cc: akpm@linux-foundation.org, krzysztof.h1@poczta.fm, davinci-linux-open-source@linux.davincidsp.com X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index fcaa344..a2fcd92 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)