diff options
author | Ville Syrjälä <syrjala@sci.fi> | 2006-01-09 23:53:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:49 -0500 |
commit | 480913fe42ae2ff2c821a9e12e6e3eac28d7d730 (patch) | |
tree | 8e4e577dd0f07a636e821a937c8b76407f7976a0 /drivers/video | |
parent | 25163c56ed88a3009e7c1d808d3a052357301d63 (diff) |
[PATCH] atyfb: Improve blanking
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>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | 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 209d44680862..8a10ebf47c22 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 *video_str, unsigned char m64_num) | |||
2645 | static int atyfb_blank(int blank, struct fb_info *info) | 2645 | static int atyfb_blank(int blank, struct fb_info *info) |
2646 | { | 2646 | { |
2647 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 2647 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
2648 | u8 gen_cntl; | 2648 | u32 gen_cntl; |
2649 | 2649 | ||
2650 | if (par->lock_blank || par->asleep) | 2650 | if (par->lock_blank || par->asleep) |
2651 | return 0; | 2651 | return 0; |
2652 | 2652 | ||
2653 | #ifdef CONFIG_PMAC_BACKLIGHT | 2653 | #ifdef CONFIG_PMAC_BACKLIGHT |
2654 | if ((_machine == _MACH_Pmac) && blank) | 2654 | if ((_machine == _MACH_Pmac) && blank > FB_BLANK_NORMAL) |
2655 | set_backlight_enable(0); | 2655 | set_backlight_enable(0); |
2656 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) | 2656 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) |
2657 | if (par->lcd_table && blank && | 2657 | if (par->lcd_table && blank > FB_BLANK_NORMAL && |
2658 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { | 2658 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { |
2659 | u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par); | 2659 | u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par); |
2660 | pm &= ~PWR_BLON; | 2660 | pm &= ~PWR_BLON; |
@@ -2662,31 +2662,31 @@ static int atyfb_blank(int blank, struct fb_info *info) | |||
2662 | } | 2662 | } |
2663 | #endif | 2663 | #endif |
2664 | 2664 | ||
2665 | gen_cntl = aty_ld_8(CRTC_GEN_CNTL, par); | 2665 | gen_cntl = aty_ld_le32(CRTC_GEN_CNTL, par); |
2666 | switch (blank) { | 2666 | switch (blank) { |
2667 | case FB_BLANK_UNBLANK: | 2667 | case FB_BLANK_UNBLANK: |
2668 | gen_cntl &= ~(0x4c); | 2668 | gen_cntl &= ~0x400004c; |
2669 | break; | 2669 | break; |
2670 | case FB_BLANK_NORMAL: | 2670 | case FB_BLANK_NORMAL: |
2671 | gen_cntl |= 0x40; | 2671 | gen_cntl |= 0x4000040; |
2672 | break; | 2672 | break; |
2673 | case FB_BLANK_VSYNC_SUSPEND: | 2673 | case FB_BLANK_VSYNC_SUSPEND: |
2674 | gen_cntl |= 0x8; | 2674 | gen_cntl |= 0x4000048; |
2675 | break; | 2675 | break; |
2676 | case FB_BLANK_HSYNC_SUSPEND: | 2676 | case FB_BLANK_HSYNC_SUSPEND: |
2677 | gen_cntl |= 0x4; | 2677 | gen_cntl |= 0x4000044; |
2678 | break; | 2678 | break; |
2679 | case FB_BLANK_POWERDOWN: | 2679 | case FB_BLANK_POWERDOWN: |
2680 | gen_cntl |= 0x4c; | 2680 | gen_cntl |= 0x400004c; |
2681 | break; | 2681 | break; |
2682 | } | 2682 | } |
2683 | aty_st_8(CRTC_GEN_CNTL, gen_cntl, par); | 2683 | aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par); |
2684 | 2684 | ||
2685 | #ifdef CONFIG_PMAC_BACKLIGHT | 2685 | #ifdef CONFIG_PMAC_BACKLIGHT |
2686 | if ((_machine == _MACH_Pmac) && !blank) | 2686 | if ((_machine == _MACH_Pmac) && blank <= FB_BLANK_NORMAL) |
2687 | set_backlight_enable(1); | 2687 | set_backlight_enable(1); |
2688 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) | 2688 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) |
2689 | if (par->lcd_table && !blank && | 2689 | if (par->lcd_table && blank <= FB_BLANK_NORMAL && |
2690 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { | 2690 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { |
2691 | u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par); | 2691 | u32 pm = aty_ld_lcd(POWER_MANAGEMENT, par); |
2692 | pm |= PWR_BLON; | 2692 | pm |= PWR_BLON; |