On Wed, Oct 20, 2010 at 09:17:39PM +1000, Ben Skeggs wrote:
> I have a question to you that's important first:  if you fix nouveau's
> max_brightness level, can you actually properly change the brightness?
> 
> I have an eDP laptop that shows the same backlight level regardless of
> what's in that register.
> 

By applying the attached patch I can properly change the brightness levels 
using g-p-m. The only question is what the 0x40000000 bit represents as set by 
BIOS/ACPI - both 0x40001fff and 0x00001fff seem to work fine as far as 
brightness levels are concerned.
diff -uNrp kernel-2.6.35.fc14.orig/drivers/gpu/drm/nouveau/nouveau_backlight.c kernel-2.6.35.fc14.new/drivers/gpu/drm/nouveau/nouveau_backlight.c
--- kernel-2.6.35.fc14.orig/drivers/gpu/drm/nouveau/nouveau_backlight.c	2010-09-10 14:04:09.301972164 +0200
+++ kernel-2.6.35.fc14.new/drivers/gpu/drm/nouveau/nouveau_backlight.c	2010-10-21 10:04:03.709309995 +0200
@@ -120,7 +120,11 @@ static int nouveau_nv50_backlight_init(s
 		return 0;
 
 	memset(&props, 0, sizeof(struct backlight_properties));
-	props.max_brightness = 1025;
+	if (dev_priv->chipset >= 0xa8)  
+		props.max_brightness = 0x0001ffff;
+	else
+		props.max_brightness = 1025;
+
 	bd = backlight_device_register("nv_backlight", &dev->pdev->dev, dev,
 				       &nv50_bl_ops, &props);
 	if (IS_ERR(bd))

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to