Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-17 Thread Matthias Kaehlcke
Hi Pavel, On Mon, Jun 17, 2019 at 03:01:51PM +0200, Pavel Machek wrote: > Hi! > > > > Certainly "linear" (this device will work more or less correctly if the > > > userspace applies perceptual curves). Not sure about logarithmic since > > > what is actually useful is something that is

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-17 Thread Pavel Machek
Hi! > > Certainly "linear" (this device will work more or less correctly if the > > userspace applies perceptual curves). Not sure about logarithmic since > > what is actually useful is something that is "perceptually linear" > > (logarithmic is merely a way to approximate that). > > > > I do

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-13 Thread Matthias Kaehlcke
On Wed, Jun 12, 2019 at 08:47:57PM +0100, Daniel Thompson wrote: > On Wed, Jun 12, 2019 at 12:26:42PM -0700, Matthias Kaehlcke wrote: > > Hi Daniel, > > > > On Wed, Jun 12, 2019 at 12:03:25PM +0100, Daniel Thompson wrote: > > > On Tue, Jun 11, 2019 at 03:30:19PM -0700, Matthias Kaehlcke wrote: >

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-12 Thread Daniel Thompson
On Wed, Jun 12, 2019 at 12:26:42PM -0700, Matthias Kaehlcke wrote: > Hi Daniel, > > On Wed, Jun 12, 2019 at 12:03:25PM +0100, Daniel Thompson wrote: > > On Tue, Jun 11, 2019 at 03:30:19PM -0700, Matthias Kaehlcke wrote: > > > On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > > > >

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-12 Thread Matthias Kaehlcke
Hi Daniel, On Wed, Jun 12, 2019 at 12:03:25PM +0100, Daniel Thompson wrote: > On Tue, Jun 11, 2019 at 03:30:19PM -0700, Matthias Kaehlcke wrote: > > On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > > > On Tue, Jun 11, 2019 at 3:49 AM Daniel Thompson > > > wrote: > > > > This is a

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-12 Thread Daniel Thompson
On Tue, Jun 11, 2019 at 03:30:19PM -0700, Matthias Kaehlcke wrote: > On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > > On Tue, Jun 11, 2019 at 3:49 AM Daniel Thompson > > wrote: > > > This is a long standing flaw in the backlight interfaces. AFAIK generic > > > userspaces end up

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-12 Thread Pavel Machek
On Tue 2019-06-11 15:30:19, Matthias Kaehlcke wrote: > On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > > On Tue, Jun 11, 2019 at 3:49 AM Daniel Thompson > > wrote: > > > This is a long standing flaw in the backlight interfaces. AFAIK generic > > > userspaces end up with a (flawed)

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-11 Thread Matthias Kaehlcke
On Tue, Jun 11, 2019 at 09:55:30AM -0700, Brian Norris wrote: > On Tue, Jun 11, 2019 at 3:49 AM Daniel Thompson > wrote: > > This is a long standing flaw in the backlight interfaces. AFAIK generic > > userspaces end up with a (flawed) heuristic. > > Bingo! Would be nice if we could start to fix

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-11 Thread Brian Norris
On Tue, Jun 11, 2019 at 3:49 AM Daniel Thompson wrote: > This is a long standing flaw in the backlight interfaces. AFAIK generic > userspaces end up with a (flawed) heuristic. Bingo! Would be nice if we could start to fix this long-standing flaw. > Basically devices with a narrow range of

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-11 Thread Daniel Thompson
On Mon, Jun 10, 2019 at 01:52:33PM -0700, Matthias Kaehlcke wrote: > Hi Pavel, > > On Sat, Jun 08, 2019 at 11:02:26PM +0200, Pavel Machek wrote: > > Hi! > > > > > > +* Note that this method is based on empirical testing on > > > > different > > > > +* devices with PWM of 8 and

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Matthias Kaehlcke
On Mon, Jun 10, 2019 at 11:02:27PM +0200, Enric Balletbo i Serra wrote: > Hi Matthias, > > On 10/6/19 22:39, Matthias Kaehlcke wrote: > > Hi Enric > > > > On Mon, Jun 10, 2019 at 12:00:02PM +0200, Enric Balletbo i Serra wrote: > >> Hi Matthias, > >> > >> On 8/6/19 23:02, Pavel Machek wrote: >

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Enric Balletbo i Serra
Hi Matthias, On 10/6/19 22:39, Matthias Kaehlcke wrote: > Hi Enric > > On Mon, Jun 10, 2019 at 12:00:02PM +0200, Enric Balletbo i Serra wrote: >> Hi Matthias, >> >> On 8/6/19 23:02, Pavel Machek wrote: >>> Hi! >>> > + * Note that this method is based on empirical testing on different >

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Matthias Kaehlcke
Hi Pavel, On Sat, Jun 08, 2019 at 11:02:26PM +0200, Pavel Machek wrote: > Hi! > > > > + * Note that this method is based on empirical testing on different > > > + * devices with PWM of 8 and 16 bits of resolution. > > > + */ > > > + n = period; > > > + while (n) { > > > + counter += n

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Matthias Kaehlcke
Hi Enric On Mon, Jun 10, 2019 at 12:00:02PM +0200, Enric Balletbo i Serra wrote: > Hi Matthias, > > On 8/6/19 23:02, Pavel Machek wrote: > > Hi! > > > >>> + * Note that this method is based on empirical testing on different > >>> + * devices with PWM of 8 and 16 bits of resolution. > >>> +

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-10 Thread Enric Balletbo i Serra
Hi Matthias, On 8/6/19 23:02, Pavel Machek wrote: > Hi! > >>> +* Note that this method is based on empirical testing on different >>> +* devices with PWM of 8 and 16 bits of resolution. >>> +*/ >>> + n = period; >>> + while (n) { >>> + counter += n % 2; >>> +

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-08 Thread Pavel Machek
Hi! > > +* Note that this method is based on empirical testing on different > > +* devices with PWM of 8 and 16 bits of resolution. > > +*/ > > + n = period; > > + while (n) { > > + counter += n % 2; > > + n >>= 1; > > + } > > I don't quite follow the

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2019-06-07 Thread Matthias Kaehlcke
Hi Enric, some comments inline, a bit late, but I just tested this on veyron minnie. On Thu, Feb 08, 2018 at 12:30:31PM +0100, Enric Balletbo i Serra wrote: > When you want to change the brightness using a PWM signal, one thing you > need to consider is how human perceive the brightness. Human

[RESEND PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2018-04-09 Thread Enric Balletbo i Serra
When you want to change the brightness using a PWM signal, one thing you need to consider is how human perceive the brightness. Human perceive the brightness change non-linearly, we have better sensitivity at low luminance than high luminance, so to achieve perceived linear dimming, the brightness

[RESEND PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2018-04-09 Thread Enric Balletbo i Serra
When you want to change the brightness using a PWM signal, one thing you need to consider is how human perceive the brightness. Human perceive the brightness change non-linearly, we have better sensitivity at low luminance than high luminance, so to achieve perceived linear dimming, the brightness

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2018-04-06 Thread Daniel Thompson
On Thu, Feb 08, 2018 at 12:30:31PM +0100, Enric Balletbo i Serra wrote: > When you want to change the brightness using a PWM signal, one thing you > need to consider is how human perceive the brightness. Human perceive > the brightness change non-linearly, we have better sensitivity at low >

Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2018-04-06 Thread Daniel Thompson
On Thu, Feb 08, 2018 at 12:30:31PM +0100, Enric Balletbo i Serra wrote: > When you want to change the brightness using a PWM signal, one thing you > need to consider is how human perceive the brightness. Human perceive > the brightness change non-linearly, we have better sensitivity at low >

[PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2018-02-08 Thread Enric Balletbo i Serra
When you want to change the brightness using a PWM signal, one thing you need to consider is how human perceive the brightness. Human perceive the brightness change non-linearly, we have better sensitivity at low luminance than high luminance, so to achieve perceived linear dimming, the brightness

[PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye.

2018-02-08 Thread Enric Balletbo i Serra
When you want to change the brightness using a PWM signal, one thing you need to consider is how human perceive the brightness. Human perceive the brightness change non-linearly, we have better sensitivity at low luminance than high luminance, so to achieve perceived linear dimming, the brightness