linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 14/18] atyfb: Improve blanking
@ 2005-12-10  6:13 Antonino A. Daplas
  0 siblings, 0 replies; only message in thread
From: Antonino A. Daplas @ 2005-12-10  6:13 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Fbdev development list, Ville Syrjälä

From: Ville Syrjälä <syrjala@sci.fi>

Force blanking signal and disable display requests when blanked.
Don't disable LCD backlight with FB_BLANK_NORMAL.

Signed-off-by: Ville Syrjälä <syrjala@sci.fi>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

 drivers/video/aty/atyfb_base.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 77e7ca3..c4a953c 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2645,16 +2645,16 @@ static int __init store_video_par(char *
 static int atyfb_blank(int blank, struct fb_info *info)
 {
 	struct atyfb_par *par = (struct atyfb_par *) info->par;
-	u8 gen_cntl;
+	u32 gen_cntl;
 
 	if (par->lock_blank || par->asleep)
 		return 0;
 
 #ifdef CONFIG_PMAC_BACKLIGHT
-	if ((_machine == _MACH_Pmac) && blank)
+	if ((_machine == _MACH_Pmac) && blank > FB_BLANK_NORMAL)
 		set_backlight_enable(0);
 #elif defined(CONFIG_FB_ATY_GENERIC_LCD)
-	if (par->lcd_table && blank &&
+	if (par->lcd_table && blank > FB_BLANK_NORMAL &&
 	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
 		u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par);
 		pm &= ~PWR_BLON;
@@ -2662,31 +2662,31 @@ static int atyfb_blank(int blank, struct
 	}
 #endif
 
-	gen_cntl = aty_ld_8(CRTC_GEN_CNTL, par);
+	gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, par);
 	switch (blank) {
         	case FB_BLANK_UNBLANK:
-			gen_cntl &= ~(0x4c);
+			gen_cntl &= ~0x400004c;
 			break;
 		case FB_BLANK_NORMAL:
-			gen_cntl |= 0x40;
+			gen_cntl |= 0x4000040;
 			break;
 		case FB_BLANK_VSYNC_SUSPEND:
-			gen_cntl |= 0x8;
+			gen_cntl |= 0x4000048;
 			break;
 		case FB_BLANK_HSYNC_SUSPEND:
-			gen_cntl |= 0x4;
+			gen_cntl |= 0x4000044;
 			break;
 		case FB_BLANK_POWERDOWN:
-			gen_cntl |= 0x4c;
+			gen_cntl |= 0x400004c;
 			break;
 	}
-	aty_st_8(CRTC_GEN_CNTL, gen_cntl, par);
+	aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par);
 
 #ifdef CONFIG_PMAC_BACKLIGHT
-	if ((_machine == _MACH_Pmac) && !blank)
+	if ((_machine == _MACH_Pmac) && blank <= FB_BLANK_NORMAL)
 		set_backlight_enable(1);
 #elif defined(CONFIG_FB_ATY_GENERIC_LCD)
-	if (par->lcd_table && !blank &&
+	if (par->lcd_table && blank <= FB_BLANK_NORMAL &&
 	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
 		u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par);
 		pm |= PWR_BLON;




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-12-10  6:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-10  6:13 [PATCH 14/18] atyfb: Improve blanking Antonino A. Daplas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).