[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86bopwk7r7.fsf@sumi.keithp.com>
Date: Sat, 21 Jan 2012 14:31:24 -0800
From: Keith Packard <keithp@...thp.com>
To: Chris Diamand <chris.diamand@...il.com>
Cc: linux-kernel@...r.kernel.org, tiwai@...e.de,
melchior.franz@...il.com
Subject: Re: i915/kms/backlight-combo mode problem
On Sat, 21 Jan 2012 21:25:56 +0000, Chris Diamand <chris.diamand@...il.com> wrote:
> 0x00 is the brightest. It gets very gradually dimmer up to about 0xB0,
> when the gaps between
> brightness levels are slightly bigger.
> 0xFE is very low but still works.
> Barely any difference between 0x80 and 0x7f, same with 0x00 and 0x01,
> etc.
Here's a patch which just flips the interpretation of that value over;
does this work?
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 04d79fd..43faa9d 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -207,6 +207,7 @@ u32 intel_panel_get_backlight(struct drm_device *dev)
u8 lbpc;
pci_read_config_byte(dev->pdev, PCI_LBPC, &lbpc);
+ lbpc = 0xff - lbpc;
val *= lbpc;
}
}
@@ -238,7 +239,7 @@ static void intel_panel_actually_set_backlight(struct drm_device *dev, u32 level
lbpc = level * 0xfe / max + 1;
level /= lbpc;
- pci_write_config_byte(dev->pdev, PCI_LBPC, lbpc);
+ pci_write_config_byte(dev->pdev, PCI_LBPC, 0xff - lbpc);
}
tmp = I915_READ(BLC_PWM_CTL);
--
keith.packard@...el.com
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists