atyfb: Blank LCD by turning off backlight voltage
PATCH 1/1 atyfb: Blank LCD by turning off backlight voltage
This patch makes the blanking code turn the backlight voltage on/off.
Signature · 3 lines
Ville Syrjälä [email protected] http://www.sci.fi/~syrjala/
drivers/video/aty/atyfb_base.c +17 -2
@@ -2464,7 +2464,14 @@#ifdef CONFIG_PMAC_BACKLIGHT if ((_machine == _MACH_Pmac) && blank)set_backlight_enable (0 ); -#endif /* CONFIG_PMAC_BACKLIGHT */ +#elif defined(CONFIG_FB_ATY_GENERIC_LCD ) +if (par->lcd_table && blank && + (aty_ld_lcd (LCD_GEN_CNTL , par) &LCD_ON )) { +u32 pm =aty_ld_lcd (POWER_MANAGEMENT , par); + pm &= ~PWR_BLON ; +aty_st_lcd (POWER_MANAGEMENT , pm, par); + } +#endif gen_cntl =aty_ld_8 (CRTC_GEN_CNTL , par);if (blank >0 )
@@ -2488,7 +2495,15 @@#ifdef CONFIG_PMAC_BACKLIGHT if ((_machine == _MACH_Pmac) && !blank)set_backlight_enable (1 ); -#endif /* CONFIG_PMAC_BACKLIGHT */ +#elif defined(CONFIG_FB_ATY_GENERIC_LCD ) +if (par->lcd_table && !blank && + (aty_ld_lcd (LCD_GEN_CNTL , par) &LCD_ON )) { +u32 pm =aty_ld_lcd (POWER_MANAGEMENT , par); + pm |=PWR_BLON ; +aty_st_lcd (POWER_MANAGEMENT , pm, par); + } +#endif +return 0 ; }