Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1726842

Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye

From "Jingoo Han" <jingoohan1@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye
Date 2017-09-05 18:40 +0200
Message-ID <ump3j-5bD-3@gated-at.bofh.it> (permalink)
References <um1DI-7e8-11@gated-at.bofh.it> <umjTY-1V1-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tuesday, September 5, 2017 7:06 AM, Daniel Thompson wrote:
> 
> On 04/09/17 16:35, Enric Balletbo i Serra wrote:
> > Dear all,
> >
> > This patch series is a first RFC to know your opinion about implement
> > support to create brightness levels tables dinamically. I tried to argue
> > in every patch the specific reasons we think this can be interesting, to
> > sumup, the idea behind these patches is be able to pass via device tree
> > two parameters to the driver so it can calculate the brightness levels
> > based on the CIE 1931 lightness formula, which is what actually
> describes
> > how we perceive light.
> >
> > I think that at least the maths involved can be improved, and I've still
> > some doubts. With current code if you create a table with a max PWM
> > value of 255 and 127 steps, the first numbers are repeated so I'm
> thinking > that maybe we should skip/remove the repeated values. i.e. have
> a table
> > like this,
> >
> > [0, 1, 2, 3  ...  235, 240, 245, 250, 255]
> >
> > instead of
> >
> > [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3  ...  235, 240, 245, 250, 255]
> >
> > Well, I know there are things to improve but lets see your feedback
> first
> > before dedicate more time on it. The patches were tested on a couple of
> > devices but I'll test on more devices meanwhile we discuss about it.
> 
> I'm not fully decided on this one but my initial reaction isn't to
> question the concept so much as to ask why the number of levels should
> go in the devicetree at all! We could just make brightness-levels
> optional and get the driver to pick sane curves by default.
> 
> I'm sure we can debate what "sane" means for a couple of e-mails yet but
> in principle, given it knows the PWM max counter value, the driver
> should be able to calculate the "right" number of steps too. If we have
> that your core code remains but we don't have to complexify the device
> 
> <strawman>
> Basically we prefer X (?100 like some of the Intel DRM drivers do for
> connector properties?) steps but we reduce the number of steps if the
> PWM is rather course and we can't get sufficiently different steps.
> </strawman>
> 
> I guess the summary of what I'm saying is that if we can
> programmatically derive brightness curves then the number of steps is
> not really a property of the hardware and doesn't belong in devicetree.

Yep, I agree with Daniel's opinion. I cannot find the reason
this feature can be added to the device tree.

In my opinion, this feature can be handled by upper user level layer,
not backlight framework level. However, we can discuss this topic to
find how to handle it.

Best regards,
Jingoo Han

> 
> 
> Daniel.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 0/2] backlight: pwm_bl: support linear brightness to human eye Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-09-04 17:40 +0200
  [RFC 1/2] dt-bindings: pwm-backlight: add brightness-levels-scale property Enric Balletbo i Serra <enric.balletbo@collabora.com> - 2017-09-04 17:40 +0200
    Re: [RFC 1/2] dt-bindings: pwm-backlight: add brightness-levels-scale  property Daniel Thompson <daniel.thompson@linaro.org> - 2017-09-05 13:10 +0200
    Re: [RFC 1/2] dt-bindings: pwm-backlight: add brightness-levels-scale property Guenter Roeck <groeck@google.com> - 2017-09-05 15:50 +0200
  Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human  eye Daniel Thompson <daniel.thompson@linaro.org> - 2017-09-05 13:10 +0200
  Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human  eye Daniel Thompson <daniel.thompson@linaro.org> - 2017-09-05 13:10 +0200
    Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye "Jingoo Han" <jingoohan1@gmail.com> - 2017-09-05 18:40 +0200
      Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye Doug Anderson <dianders@google.com> - 2017-09-07 20:10 +0200
        Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human  eye Daniel Thompson <daniel.thompson@linaro.org> - 2017-09-08 13:20 +0200
          Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye Doug Anderson <dianders@google.com> - 2017-09-08 19:40 +0200

csiph-web