Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5c6916b authored by Richard Purdie's avatar Richard Purdie
Browse files

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: default avatarRichard Purdie <rpurdie@rpsys.net>
parent 85a3a9aa
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -2209,11 +2209,6 @@ static int aty128fb_blank(int blank, struct fb_info *fb)
	if (par->lock_blank || par->asleep)
		return 0;

#ifdef CONFIG_FB_ATY128_BACKLIGHT
	if (machine_is(powermac) && blank)
		aty128_bl_set_power(fb, FB_BLANK_POWERDOWN);
#endif

	if (blank & FB_BLANK_VSYNC_SUSPEND)
		state |= 2;
	if (blank & FB_BLANK_HSYNC_SUSPEND)
@@ -2228,11 +2223,6 @@ static int aty128fb_blank(int blank, struct fb_info *fb)
		aty128_set_lcd_enable(par, par->lcd_on && !blank);
	}

#ifdef CONFIG_FB_ATY128_BACKLIGHT
	if (machine_is(powermac) && !blank)
		aty128_bl_set_power(fb, FB_BLANK_UNBLANK);
#endif

	return 0;
}

+0 −16
Original line number Diff line number Diff line
@@ -2183,18 +2183,6 @@ static struct backlight_properties aty_bl_data = {
	.max_brightness = (FB_BACKLIGHT_LEVELS - 1),
};

static void aty_bl_set_power(struct fb_info *info, int power)
{
	mutex_lock(&info->bl_mutex);

	if (info->bl_dev) {
		info->bl_dev->props->power = power;
		__aty_bl_update_status(info->bl_dev);
	}

	mutex_unlock(&info->bl_mutex);
}

static void aty_bl_init(struct atyfb_par *par)
{
	struct fb_info *info = pci_get_drvdata(par->pdev);
@@ -2809,8 +2797,6 @@ static int atyfb_blank(int blank, struct fb_info *info)
		return 0;

#ifdef CONFIG_FB_ATY_BACKLIGHT
	if (machine_is(powermac) && blank > FB_BLANK_NORMAL)
		aty_bl_set_power(info, FB_BLANK_POWERDOWN);
#elif defined(CONFIG_FB_ATY_GENERIC_LCD)
	if (par->lcd_table && blank > FB_BLANK_NORMAL &&
	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
@@ -2841,8 +2827,6 @@ static int atyfb_blank(int blank, struct fb_info *info)
	aty_st_le32(CRTC_GEN_CNTL, gen_cntl, par);

#ifdef CONFIG_FB_ATY_BACKLIGHT
	if (machine_is(powermac) && blank <= FB_BLANK_NORMAL)
		aty_bl_set_power(info, FB_BLANK_UNBLANK);
#elif defined(CONFIG_FB_ATY_GENERIC_LCD)
	if (par->lcd_table && blank <= FB_BLANK_NORMAL &&
	    (aty_ld_lcd(LCD_GEN_CNTL, par) & LCD_ON)) {
+0 −15
Original line number Diff line number Diff line
@@ -352,18 +352,6 @@ static struct backlight_properties riva_bl_data = {
	.max_brightness = (FB_BACKLIGHT_LEVELS - 1),
};

static void riva_bl_set_power(struct fb_info *info, int power)
{
	mutex_lock(&info->bl_mutex);

	if (info->bl_dev) {
		info->bl_dev->props->power = power;
		__riva_bl_update_status(info->bl_dev);
	}

	mutex_unlock(&info->bl_mutex);
}

static void riva_bl_init(struct riva_par *par)
{
	struct fb_info *info = pci_get_drvdata(par->pdev);
@@ -442,7 +430,6 @@ static void riva_bl_exit(struct riva_par *par)
#else
static inline void riva_bl_init(struct riva_par *par) {}
static inline void riva_bl_exit(struct riva_par *par) {}
static inline void riva_bl_set_power(struct fb_info *info, int power) {}
#endif /* CONFIG_FB_RIVA_BACKLIGHT */

/* ------------------------------------------------------------------------- *
@@ -1343,8 +1330,6 @@ static int rivafb_blank(int blank, struct fb_info *info)
	SEQout(par, 0x01, tmp);
	CRTCout(par, 0x1a, vesa);

	riva_bl_set_power(info, blank);

	NVTRACE_LEAVE();

	return 0;