linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] resend: radeon backlight shutoff flashes momentarily
@ 2009-04-01  9:27 Robert T. Drury
  2009-04-01 11:21 ` Michel Dänzer
  2009-04-10  8:45 ` Andrew Morton
  0 siblings, 2 replies; 4+ messages in thread
From: Robert T. Drury @ 2009-04-01  9:27 UTC (permalink / raw)
  To: linux-fbdev-devel, benh, akpm

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12845

Aluminum Powerbook G4 with Radeon 9600:

The backlight momentarily flashes brightly when turning off.  If the
backlight is originally dim, the flash is more noticeable.  This momentary
flash is stressful on the power circuit.

This patch removes the & ~LVDS_BL_MOD_EN above the first OUTREG to 
LVDS_GEN_CNTL to eliminate the flash on shutoff, only for powerbook5,3 
and CHIP_FAMILY_RV350.

Signed-off-by: Robert Drury <rtdrury@earthlink.net>

--- linux-2.6.23.9/drivers/video/aty/radeon_backlight.c.orig	2009-03-22 19:04:22.000000000 -0700
+++ linux-2.6.23.9/drivers/video/aty/radeon_backlight.c	2009-03-22 19:19:09.000000000 -0700
@@ -101,7 +101,10 @@ static int radeon_bl_update_status(struc
 		tmpPixclksCntl = INPLL(PIXCLKS_CNTL);
 		if (rinfo->is_mobility || rinfo->is_IGP)
 			OUTPLLP(PIXCLKS_CNTL, 0, ~PIXCLK_LVDS_ALWAYS_ONb);
-		lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK | LVDS_BL_MOD_EN);
+		lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK);
+		if(rinfo->family != CHIP_FAMILY_RV350 
+			|| !machine_is_compatible("PowerBook5,3"))
+				lvds_gen_cntl &= ~LVDS_BL_MOD_EN;
 		lvds_gen_cntl |= (radeon_bl_get_level_brightness(pdata, 0) <<
 				  LVDS_BL_MOD_LEVEL_SHIFT);
 		lvds_gen_cntl |= LVDS_DISPLAY_DIS;


------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] resend: radeon backlight shutoff flashes momentarily
  2009-04-01  9:27 [PATCH] resend: radeon backlight shutoff flashes momentarily Robert T. Drury
@ 2009-04-01 11:21 ` Michel Dänzer
  2009-04-06 14:41   ` Michel Dänzer
  2009-04-10  8:45 ` Andrew Morton
  1 sibling, 1 reply; 4+ messages in thread
From: Michel Dänzer @ 2009-04-01 11:21 UTC (permalink / raw)
  To: Robert T. Drury; +Cc: benh, akpm, linux-fbdev-devel

On Wed, 2009-04-01 at 02:27 -0700, Robert T. Drury wrote:
> Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12845
> 
> Aluminum Powerbook G4 with Radeon 9600:
> 
> The backlight momentarily flashes brightly when turning off.  If the
> backlight is originally dim, the flash is more noticeable.  This momentary
> flash is stressful on the power circuit.
> 
> This patch removes the & ~LVDS_BL_MOD_EN above the first OUTREG to 
> LVDS_GEN_CNTL to eliminate the flash on shutoff, only for powerbook5,3 
> and CHIP_FAMILY_RV350.

As you're checking for a specific Apple laptop model, there's no need to
check the chip family as well.

(As mentioned before, I'm seeing the flash on a PowerBook5,8 as well,
but I haven't got around to trying the patch, will do when I get time)


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] resend: radeon backlight shutoff flashes momentarily
  2009-04-01 11:21 ` Michel Dänzer
@ 2009-04-06 14:41   ` Michel Dänzer
  0 siblings, 0 replies; 4+ messages in thread
From: Michel Dänzer @ 2009-04-06 14:41 UTC (permalink / raw)
  To: Robert T. Drury; +Cc: benh, akpm, linux-fbdev-devel

On Wed, 2009-04-01 at 13:21 +0200, Michel Dänzer wrote:
> On Wed, 2009-04-01 at 02:27 -0700, Robert T. Drury wrote:
> > Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12845
> > 
> > Aluminum Powerbook G4 with Radeon 9600:
> > 
> > The backlight momentarily flashes brightly when turning off.  If the
> > backlight is originally dim, the flash is more noticeable.  This momentary
> > flash is stressful on the power circuit.
> > 
> > This patch removes the & ~LVDS_BL_MOD_EN above the first OUTREG to 
> > LVDS_GEN_CNTL to eliminate the flash on shutoff, only for powerbook5,3 
> > and CHIP_FAMILY_RV350.
> 
> As you're checking for a specific Apple laptop model, there's no need to
> check the chip family as well.
> 
> (As mentioned before, I'm seeing the flash on a PowerBook5,8 as well,
> but I haven't got around to trying the patch, will do when I get time)

Unfortunately, 2.6.29.1 with the patch below doesn't seem to get rid of
the flash on my PowerBook5,8. So no objections to your patch from me.


diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c
index 1a056ad..361bb64 100644
--- a/drivers/video/aty/radeon_backlight.c
+++ b/drivers/video/aty/radeon_backlight.c
@@ -101,7 +101,10 @@ static int radeon_bl_update_status(struct backlight_device *bd)
 		tmpPixclksCntl = INPLL(PIXCLKS_CNTL);
 		if (rinfo->is_mobility || rinfo->is_IGP)
 			OUTPLLP(PIXCLKS_CNTL, 0, ~PIXCLK_LVDS_ALWAYS_ONb);
-		lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK | LVDS_BL_MOD_EN);
+		lvds_gen_cntl &= ~LVDS_BL_MOD_LEVEL_MASK;
+		if (!(machine_is_compatible("PowerBook5,3") ||
+		      machine_is_compatible("PowerBook5,8")))
+			lvds_gen_cntl &= ~LVDS_BL_MOD_EN;
 		lvds_gen_cntl |= (radeon_bl_get_level_brightness(pdata, 0) <<
 				  LVDS_BL_MOD_LEVEL_SHIFT);
 		lvds_gen_cntl |= LVDS_DISPLAY_DIS;


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer

------------------------------------------------------------------------------
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] resend: radeon backlight shutoff flashes momentarily
  2009-04-01  9:27 [PATCH] resend: radeon backlight shutoff flashes momentarily Robert T. Drury
  2009-04-01 11:21 ` Michel Dänzer
@ 2009-04-10  8:45 ` Andrew Morton
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2009-04-10  8:45 UTC (permalink / raw)
  To: Robert T. Drury; +Cc: benh, linux-fbdev-devel

On Wed, 01 Apr 2009 02:27:54 -0700 "Robert T. Drury" <rtdrury@earthlink.net> wrote:

> Addresses http://bugzilla.kernel.org/show_bug.cgi?id=12845
> 
> Aluminum Powerbook G4 with Radeon 9600:
> 
> The backlight momentarily flashes brightly when turning off.  If the
> backlight is originally dim, the flash is more noticeable.  This momentary
> flash is stressful on the power circuit.
> 
> This patch removes the & ~LVDS_BL_MOD_EN above the first OUTREG to 
> LVDS_GEN_CNTL to eliminate the flash on shutoff, only for powerbook5,3 
> and CHIP_FAMILY_RV350.
> 
> Signed-off-by: Robert Drury <rtdrury@earthlink.net>
> 
> --- linux-2.6.23.9/drivers/video/aty/radeon_backlight.c.orig	2009-03-22 19:04:22.000000000 -0700
> +++ linux-2.6.23.9/drivers/video/aty/radeon_backlight.c	2009-03-22 19:19:09.000000000 -0700
> @@ -101,7 +101,10 @@ static int radeon_bl_update_status(struc
>  		tmpPixclksCntl = INPLL(PIXCLKS_CNTL);
>  		if (rinfo->is_mobility || rinfo->is_IGP)
>  			OUTPLLP(PIXCLKS_CNTL, 0, ~PIXCLK_LVDS_ALWAYS_ONb);
> -		lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK | LVDS_BL_MOD_EN);
> +		lvds_gen_cntl &= ~(LVDS_BL_MOD_LEVEL_MASK);
> +		if(rinfo->family != CHIP_FAMILY_RV350 
> +			|| !machine_is_compatible("PowerBook5,3"))
> +				lvds_gen_cntl &= ~LVDS_BL_MOD_EN;
>  		lvds_gen_cntl |= (radeon_bl_get_level_brightness(pdata, 0) <<
>  				  LVDS_BL_MOD_LEVEL_SHIFT);
>  		lvds_gen_cntl |= LVDS_DISPLAY_DIS;

machine_is_compatible() isn't defined on x86 so this breaks the build.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-10  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-01  9:27 [PATCH] resend: radeon backlight shutoff flashes momentarily Robert T. Drury
2009-04-01 11:21 ` Michel Dänzer
2009-04-06 14:41   ` Michel Dänzer
2009-04-10  8:45 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).