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


Groups > linux.kernel > #1732407

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

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Doug Anderson <dianders@google.com>
Newsgroups linux.kernel
Subject Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye
Date Thu, 14 Sep 2017 18:10:03 +0200
Message-ID <upESf-7ea-29@gated-at.bofh.it> (permalink)
References <um1DI-7e8-11@gated-at.bofh.it> <umjTY-1V1-25@gated-at.bofh.it> <ump3j-5bD-3@gated-at.bofh.it> <un9pw-3DB-9@gated-at.bofh.it> <unpuh-6iJ-15@gated-at.bofh.it> <unvq2-1Fs-17@gated-at.bofh.it> <upA2d-3WF-7@gated-at.bofh.it>
X-Original-To Enric Balletbo Serra <eballetbo@gmail.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6vGCWmub0r1JrkpalmKIjMdkraJQzf86PwswHsYWyTg=; b=FzVvVxKXvH/jSgKhyfpEET2DcHTuBueyAz3OFZjqvbgRK2ZhHt7qdp92+bWJu+mDnG tDLVmTu2dRpKxcZkNdmJbt/zjlQHQYNlitkuJ6RPaPJV62OiCPRWBUpZ3n11XeGj/kQp Iwqi860IM+dVO4ywv38aFi9cWvLp+8CAixRSiVt0WPbeJqzIkFpfB9a7Wv1ds9mkAE7P 1NzfIWB+s+tZl7mgz0JSy9BBXH9T75tZgDwiXDFrxkgFFKhUzavnraffrNtkKmGgaMBz ksgqzNneCNbR4dB+aeti22AEkXjn1P8w6z+5Mue91312ZZUQlhC5W8EI/2jQgxTLXfyF cPDg==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6vGCWmub0r1JrkpalmKIjMdkraJQzf86PwswHsYWyTg=; b=NzeuFjKK+GZvxbwOsJH62/6osp5V/zHSwuPSsjNN+lj6+nx03YZKJTjo9t4155Wq3W XPsDIobiZcKZKrix3Z5o+L2Vu8K1r1wUsXP4pbMwmd0VTxOkNhZ5nWuNXJrtxJYhM2/p Bwzm7Pb0b2hIcyoyZvvVSGYZ7uKxokBSGzTQx2bEPmkxzAwwtOEx/VJncdUPPGYhFU5b gw3rKKJISGzGAEtdsg/8CwdUxkhEKiEzFPvH5ehL6rhGDfheBrgdfolTZfMgG4+5GFhT TTShlKOhEGj6RJJ9pn5EvtAN2VcDvOketQD3D3rMhzU+1FiagD+KLQ54Y/CowcXg0Hjh 8x0g==
X-Gm-Message-State AHPjjUijDvK4YIhhiubOK68ut9Bx2tjuYrJeCpGbe8yP1CPTo2Mj8z+7 3L71x4GBqNDcfI2aA82E8UQQB0U1ddCT03IRu7PScA==
X-Google-SMTP-Source ADKCNb7VBwN8TqVmDnXbbItVnLl2t7ntc/fYn9mOyeQgqbwDzDdysr/OIk33gMQi4a2x9mOGXdM+xdQBdskQddVS9QE=
X-Received by 10.223.153.106 with SMTP id x97mr18010147wrb.107.1505404894500; Thu, 14 Sep 2017 09:01:34 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset="UTF-8"
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 39
Organization linux.* mail to news gateway
X-Original-Cc Daniel Thompson <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com>, Enric Balletbo i Serra <enric.balletbo@collabora.com>, Lee Jones <lee.jones@linaro.org>, Richard Purdie <rpurdie@rpsys.net>, Jacek Anaszewski <jacek.anaszewski@gmail.com>, Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Brian Norris <briannorris@google.com>, Guenter Roeck <groeck@google.com>, linux-leds@vger.kernel.org, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Alexandru M Stan <amstan@chromium.org>
X-Original-Date Thu, 14 Sep 2017 09:01:33 -0700
X-Original-Message-ID <CAD=FV=VnrEdbh35TTSOc8-SuicENutXKPBdENumrKZEMLRSRyA@mail.gmail.com>
X-Original-References <20170904153504.27963-1-enric.balletbo@collabora.com> <239c9153-c0ea-319c-b554-3c727b75c8cd@linaro.org> <000001d32664$db62b2a0$922817e0$@gmail.com> <CAD=FV=WohimLMHQTp=iTaggvfoO+yqZTiJZkSdO2UyEr33TRpQ@mail.gmail.com> <f6eb109d-96f3-4978-93b0-2b8506189e45@linaro.org> <CAD=FV=W4qH2JzskqU4VsH_1RU687DNsngsBB_zRbUeZRWptkAQ@mail.gmail.com> <CAFqH_53hL_UCVQg2p8sdsGaoyWOou9a3Kd5H7MVMVLumH5_cAg@mail.gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1732407

Show key headers only | View raw


Hi,

On Thu, Sep 14, 2017 at 3:46 AM, Enric Balletbo Serra
<eballetbo@gmail.com> wrote:
> Based on this seems reasonable maintain current implementation to not
> break backward compability. Even, I think makes sense improve current
> implementation by adding somekind of piecewise linear concept to the
> brightness levels, similar to Doug's suggestion. So if we want, i.e,
> 256 levels or more, instead of specify the full table in the DT we can
> only specify some points in DT but the driver can expose to userspace
> more steps (how many?) between two brightness levels.

It seems sane to me.  Personally I'd say that if you're using
piecewise linear you just pick a number of levels to expose, perhaps
16383, or 32767, or 65535) and expose that many levels for everyone.
It's possible that bumping the brightness up by "1" will not actually
change a hardware register, but that seems like it would be fine,
right?

Probably you'd want to require some sort of dt change to enable
piecewise linear since it seems plausible that you could break
existing boards if you started interpolating.

> Of course, this
> doesn't makes the live of the future users easier but I think will
> make the live of the current users of this interface more flexible
> (specially when you want lots of levels)
>
> Then, to make the user live easier, there is the thing about human
> perception, we can move brightness-levels to be optional and fall to
> apply the human perception code if it's not specified. Here the thing
> and point of discussion is, if the cie1931 is the right algorithm to
> do the 'magic' in the driver. From what I investigated seems that is
> but I might be wrong.

I don't personally know, so hopefully someone else can comment.


-Doug

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


Thread

Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye Enric Balletbo Serra <eballetbo@gmail.com> - 2017-09-14 13:00 +0200
  Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to human eye Doug Anderson <dianders@google.com> - 2017-09-14 18:10 +0200
  Re: Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to  human eye Daniel Thompson <daniel.thompson@linaro.org> - 2017-09-18 18:10 +0200
    Re: Re: [RFC 0/2] backlight: pwm_bl: support linear brightness to  human eye Enric Balletbo Serra <eballetbo@gmail.com> - 2017-09-20 00:30 +0200

csiph-web