Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 17648
b: refs/heads/master
c: 480913f
h: refs/heads/master
v: v3
  • Loading branch information
Ville Syrj�l� authored and Linus Torvalds committed Jan 10, 2006
1 parent 0c936d2 commit 00de8a8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 25163c56ed88a3009e7c1d808d3a052357301d63
refs/heads/master: 480913fe42ae2ff2c821a9e12e6e3eac28d7d730
24 changes: 12 additions & 12 deletions trunk/drivers/video/aty/atyfb_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2645,48 +2645,48 @@ static int __init store_video_par(char *video_str, unsigned char m64_num)
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;
aty_st_lcd(POWER_MANAGEMENT, pm, par);
}
#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;
Expand Down

0 comments on commit 00de8a8

Please sign in to comment.