diff mbox

da8xx-fb: do not turn ON LCD backlight unless LCDC is enabled

Message ID 1343103325-7313-1-git-send-email-prakash.pm@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Manjunathappa, Prakash July 24, 2012, 4:15 a.m. UTC
LCD blink is observed during suspend/resume and blank/unblank
operations as backlight is ON during LCDC disable and enable.
So make sure to turn OFF backlight before disabling and turn
it ON after enabling.

Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>
---
 drivers/video/da8xx-fb.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

Comments

Florian Tobias Schandinat July 29, 2012, 9:16 p.m. UTC | #1
On 07/24/2012 04:15 AM, Manjunathappa, Prakash wrote:
> LCD blink is observed during suspend/resume and blank/unblank
> operations as backlight is ON during LCDC disable and enable.
> So make sure to turn OFF backlight before disabling and turn
> it ON after enabling.
> 
> Signed-off-by: Manjunathappa, Prakash <prakash.pm@ti.com>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/da8xx-fb.c |    9 +++++----
>  1 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
> index 0fb4d7d..1a569ae 100644
> --- a/drivers/video/da8xx-fb.c
> +++ b/drivers/video/da8xx-fb.c
> @@ -1056,10 +1056,10 @@ static int cfb_blank(int blank, struct fb_info *info)
>  	par->blank = blank;
>  	switch (blank) {
>  	case FB_BLANK_UNBLANK:
> +		lcd_enable_raster();
> +
>  		if (par->panel_power_ctrl)
>  			par->panel_power_ctrl(1);
> -
> -		lcd_enable_raster();
>  		break;
>  	case FB_BLANK_POWERDOWN:
>  		if (par->panel_power_ctrl)
> @@ -1417,11 +1417,12 @@ static int fb_resume(struct platform_device *dev)
>  	struct da8xx_fb_par *par = info->par;
>  
>  	console_lock();
> +	clk_enable(par->lcdc_clk);
> +	lcd_enable_raster();
> +
>  	if (par->panel_power_ctrl)
>  		par->panel_power_ctrl(1);
>  
> -	clk_enable(par->lcdc_clk);
> -	lcd_enable_raster();
>  	fb_set_suspend(info, 0);
>  	console_unlock();
>  

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index 0fb4d7d..1a569ae 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -1056,10 +1056,10 @@  static int cfb_blank(int blank, struct fb_info *info)
 	par->blank = blank;
 	switch (blank) {
 	case FB_BLANK_UNBLANK:
+		lcd_enable_raster();
+
 		if (par->panel_power_ctrl)
 			par->panel_power_ctrl(1);
-
-		lcd_enable_raster();
 		break;
 	case FB_BLANK_POWERDOWN:
 		if (par->panel_power_ctrl)
@@ -1417,11 +1417,12 @@  static int fb_resume(struct platform_device *dev)
 	struct da8xx_fb_par *par = info->par;
 
 	console_lock();
+	clk_enable(par->lcdc_clk);
+	lcd_enable_raster();
+
 	if (par->panel_power_ctrl)
 		par->panel_power_ctrl(1);
 
-	clk_enable(par->lcdc_clk);
-	lcd_enable_raster();
 	fb_set_suspend(info, 0);
 	console_unlock();