From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C96FC31E46 for ; Wed, 12 Jun 2019 09:54:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D1DE208C4 for ; Wed, 12 Jun 2019 09:54:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437815AbfFLJyQ (ORCPT ); Wed, 12 Jun 2019 05:54:16 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:38043 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437698AbfFLJyP (ORCPT ); Wed, 12 Jun 2019 05:54:15 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 53DD1802E0; Wed, 12 Jun 2019 11:54:03 +0200 (CEST) Date: Wed, 12 Jun 2019 11:54:13 +0200 From: Pavel Machek To: Matthias Kaehlcke Cc: Brian Norris , Daniel Thompson , Enric Balletbo i Serra , Doug Anderson , Rob Herring , Jingoo Han , Richard Purdie , Jacek Anaszewski , Guenter Roeck , Lee Jones , Alexandru Stan , linux-leds@vger.kernel.org, devicetree , Linux Kernel , kernel@collabora.com Subject: Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye. Message-ID: <20190612095413.GA12656@amd> References: <20180208113032.27810-1-enric.balletbo@collabora.com> <20180208113032.27810-4-enric.balletbo@collabora.com> <20190607220947.GR40515@google.com> <20190608210226.GB2359@xo-6d-61-c0.localdomain> <20190610205233.GB137143@google.com> <20190611104913.egsbwcedshjdy3m5@holly.lan> <20190611223019.GH137143@google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <20190611223019.GH137143@google.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 gener= ic > > > userspaces end up with a (flawed) heuristic. > >=20 > > Bingo! Would be nice if we could start to fix this long-standing flaw. >=20 > Agreed! >=20 > How could a fix look like, a sysfs attribute? Would a boolean value > like 'logarithmic_scale' or 'linear_scale' be enough or could more > granularity be needed? I'd expect attribute "scale" with values "linear" or "logarithmic". > The new attribute could be optional (it only exists if explicitly > specified by the driver) or be set to a default based on a heuristic > if not specified and be 'fixed' on a case by case basis. The latter > might violate "don't break userspace" though, so I'm not sure it's a > good idea. I'd do it only when we explicitely know. We don't want it to be buggy. And I guess we should decide what interface we really want? (Linear? Logarithmic?) And make new drivers do that. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl0Ay8UACgkQMOfwapXb+vIeJgCggLbpjHz3nKmV58LAUi3ZiuUa uScAn2D1iGqQP7z/oj5Jluw9Rq5L6vCE =G1uG -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--