linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvidiafb: fix nvidia_bl_get_level_brightness() calc
@ 2006-07-04  1:39 Aristeu Sergio Rozanski Filho
  2006-07-08 11:51 ` Michael Hanselmann
  0 siblings, 1 reply; 2+ messages in thread
From: Aristeu Sergio Rozanski Filho @ 2006-07-04  1:39 UTC (permalink / raw)
  To: linux-fbdev-devel

nvidiafb: fix nvidia_bl_get_level_brightness() level calc

Signed-off-by: Aristeu S. Rozanski F. <aris@valeta.org>

Index: ppc-2.6/drivers/video/nvidia/nv_backlight.c
===================================================================
--- ppc-2.6.orig/drivers/video/nvidia/nv_backlight.c	2006-07-03 17:38:06.000000000 -0300
+++ ppc-2.6/drivers/video/nvidia/nv_backlight.c	2006-07-03 20:11:08.000000000 -0300
@@ -26,6 +26,7 @@
  */
 #define MIN_LEVEL 0x158
 #define MAX_LEVEL 0x534
+#define LEVEL_STEP ((MAX_LEVEL - MIN_LEVEL) / FB_BACKLIGHT_MAX)
 
 static struct backlight_properties nvidia_bl_data;
 
@@ -37,7 +38,7 @@
 
 	/* Get and convert the value */
 	mutex_lock(&info->bl_mutex);
-	nlevel = info->bl_curve[level] * FB_BACKLIGHT_MAX / MAX_LEVEL;
+	nlevel = MIN_LEVEL + info->bl_curve[level] * LEVEL_STEP;
 	mutex_unlock(&info->bl_mutex);
 
 	if (nlevel < 0)


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

* Re: [PATCH] nvidiafb: fix nvidia_bl_get_level_brightness() calc
  2006-07-04  1:39 [PATCH] nvidiafb: fix nvidia_bl_get_level_brightness() calc Aristeu Sergio Rozanski Filho
@ 2006-07-08 11:51 ` Michael Hanselmann
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Hanselmann @ 2006-07-08 11:51 UTC (permalink / raw)
  To: Aristeu Sergio Rozanski Filho; +Cc: linux-fbdev-devel

On Mon, Jul 03, 2006 at 10:39:37PM -0300, Aristeu Sergio Rozanski Filho wrote:
> nvidiafb: fix nvidia_bl_get_level_brightness() level calc

Nack, I'll submit a bigger fix patch in a few minutes.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

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

end of thread, other threads:[~2006-07-08 11:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-04  1:39 [PATCH] nvidiafb: fix nvidia_bl_get_level_brightness() calc Aristeu Sergio Rozanski Filho
2006-07-08 11:51 ` Michael Hanselmann

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).