Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Sep 2011 10:45:21 -0400
From:      Super Bisquit <superbisquit@gmail.com>
To:        Justin Hibbits <jrh29@alumni.cwru.edu>
Cc:        Peter Grehan <grehan@freebsd.org>, FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: ofw syscons brightness patch
Message-ID:  <CA%2BWntOsDUrdxrbNBw9%2BSnQ-Pr_hCaUKHu-VpCsO0O7_Vu2iqkQ@mail.gmail.com>
In-Reply-To: <CAHSQbTALfRBxLakJvYj-J7fBXeD--x6_2PCrG755Qd6fs_2AoQ@mail.gmail.com>
References:  <91CC14C1-14F2-41B3-81F1-D90B42F038CA@alumni.cwru.edu> <4E7AAA9D.9010503@freebsd.org> <CAHSQbTALfRBxLakJvYj-J7fBXeD--x6_2PCrG755Qd6fs_2AoQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 21, 2011 at 11:48 PM, Justin Hibbits <jrh29@alumni.cwru.edu>wrote:

> On Wed, Sep 21, 2011 at 11:25 PM, Peter Grehan <grehan@freebsd.org> wrote:
>
> > Hi Justin,
> >
> >
> >  Attached is a patch that adds brightness control to ofw syscons
> >> (dev.sc.0.brightness sysctl). Pretty simple. Comments and tests
> >> requested. Hopefully the listserv doesn't eat the patch.
> >>
> >
> >  Is it possible to have the value in the sysctl be 0-100, or 0-10 ? It
> > might be a bit confusing for the user to have to know that the range is
> > 0x34-0xff, and have the sysctl code clamp to these.
> >
> >  Are the MIN_BRIGHTNESS/MAX_BRIGHTNESS values the same for all models ?
> >
> > later,
> >
> > Peter.
> >
>
> Good points.  I took those values from OpenBSD's driver, which hides it in
> an ioctl (not hidden very well, it still leaks out to userspace), so I'm
> assuming it's the same for all models.  I can apply a simple scale factor,
> and clamp it at 0-100 (capped below 0xff for even intervals), or 0-17
> (perfect increments of 12, capped at 0xff).  I also plan to make it check
> the model for "PowerBook" and similar, so that it's not provided for
> non-laptop (and iMac?) machines.
>
> - Justin
> _______________________________________________
> freebsd-ppc@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ppc
> To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org"
>

When will the code be added to source?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BWntOsDUrdxrbNBw9%2BSnQ-Pr_hCaUKHu-VpCsO0O7_Vu2iqkQ>