> I have a sort of "rough draft" of this. I've tested all the percentages
> (Ivy Bridge) and they do seem to correlate linearly (and to the
> intel_backlight userland program used by a lot of people). I haven't
> been able to test on any other hardware as I don't have it, and I don't
> know what chipsets require the value to be inverted, so I've not
> implemented that.
> If anyone else would like to help test, it'd be nice.
Thank you Elizabeth for the patch. It works on my Samsung Ativ Book 2 with
Ivy Bridge.
I have modified the patch for 11-CURRENT and corrected these little bugs:
1) is possible to specify a percentage greater than 100%
eg. with the command: ‘sysctl hw.dri.0.i915_backlight=111’ is possible to
set the hardware register above the maximum allowed.
2) the percentage values are truncated instead of rounded:
if I set 10% with the intel_backlight program is reported as 9% with the
command ‘sysctl hw.dri.0.i915_backlight’:
# intel_backlight 10
current backlight value: 20% (976/4882)
set backlight to 10% (488/4882)
# sysctl hw.dri.0.i915_backlight
hw.dri.0.i915_backlight: 9
but 488/4882 is more near to 10% than 9%

I have tested the patch with:
# uname -a
FreeBSD ativ 11.0-CURRENT FreeBSD 11.0-CURRENT #10 r277961: Sat Jan 31
06:03:15 CET 2015     root@ativ:/usr/obj/usr/src/sys/GENERIC  amd64

The patch is available at: http://pastebin.com/vKK7026H

freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to