Message ID | s5hwricc021.wl%tiwai@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
* 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.) m.
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index a06ff07..ba60218 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -207,7 +207,8 @@ u32 intel_panel_get_backlight(struct drm_device *dev) val &= ~1; pci_read_config_byte(dev->pdev, PCI_LBPC, &lbpc); - val *= lbpc; + if (lbpc) + val *= lbpc; } }