All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/2] backlight: pwm_bl: support linear brightness to human eye
@ 2017-11-16 14:11 Enric Balletbo i Serra
  2017-11-16 14:11 ` [RFC v2 1/2] backlight: pwm_bl: linear interpolation between values of brightness-levels Enric Balletbo i Serra
       [not found] ` <20171116141151.21171-1-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
  0 siblings, 2 replies; 32+ messages in thread
From: Enric Balletbo i Serra @ 2017-11-16 14:11 UTC (permalink / raw)
  To: Daniel Thompson
  Cc: Jingoo Han, Richard Purdie, Jacek Anaszewski, Pavel Machek,
	Rob Herring, Doug Anderson, Brian Norris, Guenter Roeck,
	Lee Jones, Alexandru Stan, linux-leds, devicetree, linux-kernel

Dear all,

This patch series is a second RFC to know your opinion about the way to
solve the problems exposed in the first RFC [1]

The first patch what tries to solve is the problem of granularity for high
resolution PWMs. The idea is simple interpolate between 2 brightness values
so we can have a high PWM duty cycle (a 16 bits PWM is up to 65535 possible
steps) without having to list out every possible value in the dts. I think
that this patch is required to not break backward compability, to be more
flexible and also extend the functionality to be able to use high resolution
PWM with enough steps to have a good UI experience in userspace.

The second patch is a bit more ambicious, the idea is let decide the driver
the brightness-levels required in function of the PWM resolution. To do this
we use a static table filled with the CIE 1931 algorithm values to convert
brightness to PWM duty cycle.

More detailed info is available in the commit message of every patch.

A couple of questions come to my mind:

- What's the amoung of steps we really need? Currently there is 1024 steps
  for a resolution of 16 bits, and 37 steps for a PWM with 8 bits of
  resolution. That seems to work well with both 16 bits and 8 bits. Tested
  on a Samsung Chromebook Plus (16 bits) and a SL50 device (8 bits)

- What about 32 bits or greather resolutions? We need to support it?
  I did a quick look and seems nobody requires it, but I don't really know.
  For now if we set more than 16 bits of resolution the driver triggers
  an error.

Waiting for your feedback.

Chances since v1:
- Add linear interpolation for high resolution PWM.
- Get rid of fixed point calculations and use a table instead.

[1] http://www.spinics.net/lists/devicetree/msg193262.html

Best regards,

Enric Balletbo i Serra (2):
  backlight: pwm_bl: linear interpolation between values of
    brightness-levels
  backlight: pwm_bl: compute brightness of LED linearly to human eye.

 .../bindings/leds/backlight/pwm-backlight.txt      |   2 +
 drivers/video/backlight/pwm_bl.c                   | 209 ++++++++++++++++++---
 include/linux/pwm_backlight.h                      |   3 +
 3 files changed, 191 insertions(+), 23 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2017-12-18 20:22 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-16 14:11 [RFC v2 0/2] backlight: pwm_bl: support linear brightness to human eye Enric Balletbo i Serra
2017-11-16 14:11 ` [RFC v2 1/2] backlight: pwm_bl: linear interpolation between values of brightness-levels Enric Balletbo i Serra
2017-11-20 18:58   ` Rob Herring
2017-11-27 11:21     ` Enric Balletbo Serra
     [not found]       ` <CAFqH_50VqFJ-p=gRp9md4eHDHM5NpD6zPFfjwPY4LKTh2x6sHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-27 23:55         ` Doug Anderson
2017-11-27 23:55           ` Doug Anderson
2017-11-27 23:52   ` Doug Anderson
2017-12-15 14:40   ` Daniel Thompson
2017-12-18  9:47     ` Enric Balletbo Serra
2017-12-18 13:15       ` Daniel Thompson
     [not found] ` <20171116141151.21171-1-enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2017-11-16 14:11   ` [RFC v2 2/2] backlight: pwm_bl: compute brightness of LED linearly to human eye Enric Balletbo i Serra
2017-11-16 14:11     ` Enric Balletbo i Serra
2017-11-30  0:44     ` Doug Anderson
     [not found]       ` <CAD=FV=WY-2MmjRxGGaJrQjyeWt+k4_k7j12M4LxAnnZxJF7sXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-30 11:27         ` Daniel Thompson
2017-11-30 11:27           ` Daniel Thompson
     [not found]           ` <c6450f50-5c12-dc52-4340-b068c0b38c54-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-11-30 16:57             ` Doug Anderson
2017-11-30 16:57               ` Doug Anderson
2017-11-30 18:34             ` Enric Balletbo Serra
2017-11-30 18:34               ` Enric Balletbo Serra
2017-11-30 19:06               ` Doug Anderson
2017-12-15 20:57               ` Pavel Machek
2017-12-18 10:40                 ` Enric Balletbo Serra
2017-12-18 10:40                   ` Enric Balletbo Serra
2017-12-18 12:33                   ` Pavel Machek
2017-12-18 13:53                   ` Daniel Thompson
2017-12-15 14:51     ` Daniel Thompson
2017-12-18 10:27       ` Enric Balletbo Serra
     [not found]         ` <CAFqH_50Jqs5_5n7D019_ZxvQD1FPCZAYhaLunNm6qzj_cH3tiw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-18 13:31           ` Daniel Thompson
2017-12-18 13:31             ` Daniel Thompson
2017-12-18 16:46             ` Doug Anderson
     [not found]               ` <CAD=FV=VEakDGqfEkOZbuiq=FvUw46=6u9rTOgTk5FyJ9_2Rh4A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-12-18 20:21                 ` Daniel Thompson
2017-12-18 20:21                   ` Daniel Thompson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.