Re: i915/kms/backlight-combo mode problem (was: Re: Linux 2.6.39-rc5)

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

 



At Fri, 29 Apr 2011 22:09:54 +0200,
Melchior FRANZ wrote:
> 
> * Takashi Iwai -- Friday 29 April 2011:
> [https://bugzilla.kernel.org/show_bug.cgi?id=31522]
> > Looking at bugzilla, the problem seems like the case lbpc=0.
> > What about the patch below instead?
> 
> > -			val *= lbpc;
> > +			if (lbpc)
> > +				val *= lbpc;
> 
> Yes, that works as well. (I had assumed that this was the problem,
> but wasn't sure if a zero was even a legitimate value, or rather
> a sign for a problem or wrong assumption elsewhere.)

Well, this was just my wild guess.  I remember vaguely that the value
zero could be interpreted as the max.  It might be depending on the
hardware.

So, the patch below may work better in your case.

Also, with the patch, does the backlight level can be adjusted
correctly to different values?  I wonder whether LBPC adjustment
really works or not on your machine.


Takashi

---
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index a06ff07..aaa1f9e 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -207,6 +207,8 @@ u32 intel_panel_get_backlight(struct drm_device *dev)
 
 			val &= ~1;
 			pci_read_config_byte(dev->pdev, PCI_LBPC, &lbpc);
+			if (!lbpc)
+				lbpc = 0xff; /* max value */
 			val *= lbpc;
 		}
 	}
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux