- powermac-backlight-fixes.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     powermac backlight fixes

has been removed from the -mm tree.  Its filename is

     powermac-backlight-fixes.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: powermac backlight fixes
From: Michael Hanselmann <linux-kernel@xxxxxxxxx>

Fix a erroneous calculation of the legacy brightness values as reported by
Paul Collins.  Additionally, it moves the calculation of the negative value
in the radeonfb driver after the value check.

Signed-off-by: Michael Hanselmann <linux-kernel@xxxxxxxxx>
Acked-by: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Acked-by: Paul Collins <paul@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/powerpc/platforms/powermac/backlight.c |   14 ++++++++++++--
 drivers/video/aty/radeon_backlight.c        |    6 +++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff -puN arch/powerpc/platforms/powermac/backlight.c~powermac-backlight-fixes arch/powerpc/platforms/powermac/backlight.c
--- a/arch/powerpc/platforms/powermac/backlight.c~powermac-backlight-fixes
+++ a/arch/powerpc/platforms/powermac/backlight.c
@@ -119,7 +119,14 @@ int pmac_backlight_set_legacy_brightness
 		down(&pmac_backlight->sem);
 		props = pmac_backlight->props;
 		props->brightness = brightness *
-			props->max_brightness / OLD_BACKLIGHT_MAX;
+			(props->max_brightness + 1) /
+			(OLD_BACKLIGHT_MAX + 1);
+
+		if (props->brightness > props->max_brightness)
+			props->brightness = props->max_brightness;
+		else if (props->brightness < 0)
+			props->brightness = 0;
+
 		props->update_status(pmac_backlight);
 		up(&pmac_backlight->sem);
 
@@ -140,8 +147,11 @@ int pmac_backlight_get_legacy_brightness
 
 		down(&pmac_backlight->sem);
 		props = pmac_backlight->props;
+
 		result = props->brightness *
-			OLD_BACKLIGHT_MAX / props->max_brightness;
+			(OLD_BACKLIGHT_MAX + 1) /
+			(props->max_brightness + 1);
+
 		up(&pmac_backlight->sem);
 	}
 	mutex_unlock(&pmac_backlight_mutex);
diff -puN drivers/video/aty/radeon_backlight.c~powermac-backlight-fixes drivers/video/aty/radeon_backlight.c
--- a/drivers/video/aty/radeon_backlight.c~powermac-backlight-fixes
+++ a/drivers/video/aty/radeon_backlight.c
@@ -40,14 +40,14 @@ static int radeon_bl_get_level_brightnes
 
 	mutex_unlock(&info->bl_mutex);
 
-	if (pdata->negative)
-		rlevel = MAX_RADEON_LEVEL - rlevel;
-
 	if (rlevel < 0)
 		rlevel = 0;
 	else if (rlevel > MAX_RADEON_LEVEL)
 		rlevel = MAX_RADEON_LEVEL;
 
+	if (pdata->negative)
+		rlevel = MAX_RADEON_LEVEL - rlevel;
+
 	return rlevel;
 }
 
_

Patches currently in -mm which might be from linux-kernel@xxxxxxxxx are

origin.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux