diff options
| author | Richard Purdie <rpurdie@rpsys.net> | 2007-02-09 04:53:56 -0500 |
|---|---|---|
| committer | Richard Purdie <rpurdie@rpsys.net> | 2007-02-20 03:38:46 -0500 |
| commit | b5c6916b3118d4301dc2f8cf8d33f13e5324a3a5 (patch) | |
| tree | c81b4e3ba0c4b6b435b6040ede9fb0b299d71a71 /drivers | |
| parent | 85a3a9aa69c24c056eae578e68d44d5f612e6b51 (diff) | |
backlight: Remove unneeded backlight update_status calls
The backlight core listens for blanking events and triggers a
backlight_update_status call so these extra calls are not
needed and can be removed.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/video/aty/aty128fb.c | 10 | ||||
| -rw-r--r-- | drivers/video/aty/atyfb_base.c | 16 | ||||
| -rw-r--r-- | drivers/video/riva/fbdev.c | 15 |
3 files changed, 0 insertions, 41 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 5d8f73b2b66f..1c77cfb8e683 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
| @@ -2209,11 +2209,6 @@ static int aty128fb_blank(int blank, struct fb_info *fb) | |||
| 2209 | if (par->lock_blank || par->asleep) | 2209 | if (par->lock_blank || par->asleep) |
| 2210 | return 0; | 2210 | return 0; |
| 2211 | 2211 | ||
| 2212 | #ifdef CONFIG_FB_ATY128_BACKLIGHT | ||
| 2213 | if (machine_is(powermac) && blank) | ||
| 2214 | aty128_bl_set_power(fb, FB_BLANK_POWERDOWN); | ||
| 2215 | #endif | ||
| 2216 | |||
| 2217 | if (blank & FB_BLANK_VSYNC_SUSPEND) | 2212 | if (blank & FB_BLANK_VSYNC_SUSPEND) |
| 2218 | state |= 2; | 2213 | state |= 2; |
| 2219 | if (blank & FB_BLANK_HSYNC_SUSPEND) | 2214 | if (blank & FB_BLANK_HSYNC_SUSPEND) |
| @@ -2228,11 +2223,6 @@ static int aty128fb_blank(int blank, struct fb_info *fb) | |||
| 2228 | aty128_set_lcd_enable(par, par->lcd_on && !blank); | 2223 | aty128_set_lcd_enable(par, par->lcd_on && !blank); |
| 2229 | } | 2224 | } |
| 2230 | 2225 | ||
| 2231 | #ifdef CONFIG_FB_ATY128_BACKLIGHT | ||
| 2232 | if (machine_is(powermac) && !blank) | ||
| 2233 | aty128_bl_set_power(fb, FB_BLANK_UNBLANK); | ||
| 2234 | #endif | ||
| 2235 | |||
| 2236 | return 0; | 2226 | return 0; |
| 2237 | } | 2227 | } |
| 2238 | 2228 | ||
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 23deb3566020..3b6529392359 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
| @@ -2183,18 +2183,6 @@ static struct backlight_properties aty_bl_data = { | |||
| 2183 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | 2183 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), |
| 2184 | }; | 2184 | }; |
| 2185 | 2185 | ||
| 2186 | static void aty_bl_set_power(struct fb_info *info, int power) | ||
| 2187 | { | ||
| 2188 | mutex_lock(&info->bl_mutex); | ||
| 2189 | |||
| 2190 | if (info->bl_dev) { | ||
| 2191 | info->bl_dev->props->power = power; | ||
| 2192 | __aty_bl_update_status(info->bl_dev); | ||
| 2193 | } | ||
| 2194 | |||
| 2195 | mutex_unlock(&info->bl_mutex); | ||
| 2196 | } | ||
| 2197 | |||
| 2198 | static void aty_bl_init(struct atyfb_par *par) | 2186 | static void aty_bl_init(struct atyfb_par *par) |
| 2199 | { | 2187 | { |
| 2200 | struct fb_info *info = pci_get_drvdata(par->pdev); | 2188 | struct fb_info *info = pci_get_drvdata(par->pdev); |
| @@ -2809,8 +2797,6 @@ static int atyfb_blank(int blank, struct fb_info *info) | |||
| 2809 | return 0; | 2797 | return 0; |
| 2810 | 2798 | ||
| 2811 | #ifdef CONFIG_FB_ATY_BACKLIGHT | 2799 | #ifdef CONFIG_FB_ATY_BACKLIGHT |
| 2812 | if (machine_is(powermac) && blank > FB_BLANK_NORMAL) | ||
| 2813 | aty_bl_set_power(info, FB_BLANK_POWERDOWN); | ||
| 2814 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) | 2800 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) |
| 2815 | if (par->lcd_table && blank > FB_BLANK_NORMAL && | 2801 | if (par->lcd_table && blank > FB_BLANK_NORMAL && |
| 2816 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { | 2802 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { |
| @@ -2841,8 +2827,6 @@ static int atyfb_blank(int blank, struct fb_info *info) | |||
| 2841 | aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par); | 2827 | aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par); |
| 2842 | 2828 | ||
| 2843 | #ifdef CONFIG_FB_ATY_BACKLIGHT | 2829 | #ifdef CONFIG_FB_ATY_BACKLIGHT |
| 2844 | if (machine_is(powermac) && blank <= FB_BLANK_NORMAL) | ||
| 2845 | aty_bl_set_power(info, FB_BLANK_UNBLANK); | ||
| 2846 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) | 2830 | #elif defined(CONFIG_FB_ATY_GENERIC_LCD) |
| 2847 | if (par->lcd_table && blank <= FB_BLANK_NORMAL && | 2831 | if (par->lcd_table && blank <= FB_BLANK_NORMAL && |
| 2848 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { | 2832 | (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) { |
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index b70d18f7fcd9..9e7d3fcde207 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
| @@ -352,18 +352,6 @@ static struct backlight_properties riva_bl_data = { | |||
| 352 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), | 352 | .max_brightness = (FB_BACKLIGHT_LEVELS - 1), |
| 353 | }; | 353 | }; |
| 354 | 354 | ||
| 355 | static void riva_bl_set_power(struct fb_info *info, int power) | ||
| 356 | { | ||
| 357 | mutex_lock(&info->bl_mutex); | ||
| 358 | |||
| 359 | if (info->bl_dev) { | ||
| 360 | info->bl_dev->props->power = power; | ||
| 361 | __riva_bl_update_status(info->bl_dev); | ||
| 362 | } | ||
| 363 | |||
| 364 | mutex_unlock(&info->bl_mutex); | ||
| 365 | } | ||
| 366 | |||
| 367 | static void riva_bl_init(struct riva_par *par) | 355 | static void riva_bl_init(struct riva_par *par) |
| 368 | { | 356 | { |
| 369 | struct fb_info *info = pci_get_drvdata(par->pdev); | 357 | struct fb_info *info = pci_get_drvdata(par->pdev); |
| @@ -442,7 +430,6 @@ static void riva_bl_exit(struct riva_par *par) | |||
| 442 | #else | 430 | #else |
| 443 | static inline void riva_bl_init(struct riva_par *par) {} | 431 | static inline void riva_bl_init(struct riva_par *par) {} |
| 444 | static inline void riva_bl_exit(struct riva_par *par) {} | 432 | static inline void riva_bl_exit(struct riva_par *par) {} |
| 445 | static inline void riva_bl_set_power(struct fb_info *info, int power) {} | ||
| 446 | #endif /* CONFIG_FB_RIVA_BACKLIGHT */ | 433 | #endif /* CONFIG_FB_RIVA_BACKLIGHT */ |
| 447 | 434 | ||
| 448 | /* ------------------------------------------------------------------------- * | 435 | /* ------------------------------------------------------------------------- * |
| @@ -1343,8 +1330,6 @@ static int rivafb_blank(int blank, struct fb_info *info) | |||
| 1343 | SEQout(par, 0x01, tmp); | 1330 | SEQout(par, 0x01, tmp); |
| 1344 | CRTCout(par, 0x1a, vesa); | 1331 | CRTCout(par, 0x1a, vesa); |
| 1345 | 1332 | ||
| 1346 | riva_bl_set_power(info, blank); | ||
| 1347 | |||
| 1348 | NVTRACE_LEAVE(); | 1333 | NVTRACE_LEAVE(); |
| 1349 | 1334 | ||
| 1350 | return 0; | 1335 | return 0; |
