Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Feb 2015 21:52:47 +0100
From:      "Ranjan1018 ." <214748mv@gmail.com>
To:        Elizabeth Myers <elizabeth@interlinked.me>
Cc:        Adrian Chadd <adrian@freebsd.org>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: Questions on adding backlight support for the i915 driver
Message-ID:  <CACyC=qYdJ0j7erysNTBTBov9EOcv0ebA=hmjz-pm_ztPqbksrw@mail.gmail.com>
In-Reply-To: <54CC5311.9070604@interlinked.me>
References:  <54C883E7.4000300@interlinked.me> <54CBA0A4.30708@FreeBSD.org> <54CC0999.90500@interlinked.me> <3595567.zVLW9tlg0N@ralph.baldwin.cx> <54CC2981.3040909@interlinked.me> <CAJ-VmokWhk4NEjkvzU-g4McA1d4=%2BBrFYgrzpLWUZ5yQawaKsQ@mail.gmail.com> <54CC5311.9070604@interlinked.me>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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: =E2=80=98sysctl hw.dri.0.i915_backlight=3D111=E2=80=
=99 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 =E2=80=98sysctl hw.dri.0.i915_backlight=E2=80=99:
# 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

Regards,
Maurizio



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACyC=qYdJ0j7erysNTBTBov9EOcv0ebA=hmjz-pm_ztPqbksrw>