Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4651865ybi; Tue, 11 Jun 2019 10:07:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVtK0JyziP2AIFHs1qW1ChtC7+dl4LX8hJMydwjEkBuAUSHPx9yDpAnfBQ4P+iFpdTyOUj X-Received: by 2002:a17:902:2ba9:: with SMTP id l38mr70853418plb.300.1560272833639; Tue, 11 Jun 2019 10:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560272833; cv=none; d=google.com; s=arc-20160816; b=z7X6j/6lh4/FTr79Vjvb5PS+YTJoO1F/FFidSWtFa4Va4udGPI8fcsOnPUBC/1tkNc vsimbCyYHe5kXLQUWlXuMsiNHprrpsJnCERvTK6uAECmiiJQqlGBZ/ReCt+H0umkGTdc DDimPWL1UukRfP1d68i60bZQ4QksjhKTz95wz2h9jopuc0g4Vzqv+ozaIv1Uue8cRngc UMkUzJmwQH3zfKzjPbB00qxHIqj+FdND4tqnFPy6KJZuI0PdMZWo0pul78fUd89vbQ5Y ViQQrHcQ4i3xVu8j3DiK57aD8o2r+gaeiB1ckxKVgGUvndU462DVyzjtj5OfG85KP8ja jufA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=xh2IY7LpPfFuCqJ10WrTcz/y2fuRKJsYuYIzkRCHPGA=; b=nyWdrYB390s5syZQZDH+1tXjw1wQXau8Wa9fR3VzXhoWG58IBgwjgHf3aMVuQOalcJ Pafif0VopBAhnPDaaUW0ZWqW2zIWytpMrOLbGnL6Nds8DPtQwpIS6c7m7Tphl/dCIJqw yiY8gUtlpAQ2TsQn/cYI5knlPiRcPevHusUl2H/thnZ5srsLLS4Rxmu4gbBXOVdl+kZr mzshw61FAHEcyv6M9ZJGyQZf1BCIjwukSJ5nXwb7tlM1wUzSHeSbI5j3yii7p2S0VEg7 DSIWp+0OeJVQSg6eDoSQvw5Ok9Cp8lu9YDbu4MkLhA5bvV2pb8bMB3phOd74TjdehbS9 7AxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vVUnEDJy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s5si2826947pjp.29.2019.06.11.10.06.33; Tue, 11 Jun 2019 10:07:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vVUnEDJy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391320AbfFKQzp (ORCPT + 99 others); Tue, 11 Jun 2019 12:55:45 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42147 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390815AbfFKQzp (ORCPT ); Tue, 11 Jun 2019 12:55:45 -0400 Received: by mail-lj1-f194.google.com with SMTP id t28so12338812lje.9 for ; Tue, 11 Jun 2019 09:55:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xh2IY7LpPfFuCqJ10WrTcz/y2fuRKJsYuYIzkRCHPGA=; b=vVUnEDJygjVhekQktjlLFhfyt/TULR2B1WfScNaOoGloNtpx2vfSiB+G/CX3eORLjT G7uF00KbXWKOgLrCKFt2ElbyKKBj7UGNgE3qSHyMqY1a5Pa6JO/asgQ3eA4cH2tjTbLT OnpX7Y6Nw5edKDsZjSnlBYS1OHSqLontrnYzE63pocD3JELJy7J5TX9sG+rAYqz6B7nH o31JpQJKjJ3i6cU94KGEX+LHAhEnu1SQbIJRdRL3AFvCLg6Fs9JqU3ncjsO/6Wj/3JJs 8NebdMponYEqEN0JgIaeIZuEAsJNMsc0V5wQwraKtCbq1vonKbi6AjJIAE2oeW3Lo5OZ /Ajg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xh2IY7LpPfFuCqJ10WrTcz/y2fuRKJsYuYIzkRCHPGA=; b=LzKqZsTgzBLf/KcLV0DSZDD6nnvv0nj7kyELp2apLB6gfBi08k7vG8YOkXLlUNm9Mu mZHY4mzZ4wlnqmB19bQmfh0sHLLqqYc6oewiEDGSF14N/ieRLtAZd3zTjSVDa2HeLDqg JwdPvQ8gWqKBcV/IBswV9ahcu7cj0RiR/rFUxWCSwcz71g2DS4Obx1L9/R3ThIuInAAJ nnoojFwvCSj2w9SSqGa32ergkGHbfVRa3QZbfVs+3FQB96CXiMyEuw3DzAh9qZY5IxrA xT1KFLbsJA56M1cs1/isMOsCKaNfizUpwn3T88eW96EhTPek4gA/9w3r2rZHxhNDFyzY e0UQ== X-Gm-Message-State: APjAAAVlfbefRmbs7RRby8aGXskS5+DXphon+vaRim10ghEr9aKnGWp+ c0nrmuViLsYMXiNqqE0TM/0OWvI6ahBYOnVIaojVdQ== X-Received: by 2002:a2e:2411:: with SMTP id k17mr11738029ljk.136.1560272142410; Tue, 11 Jun 2019 09:55:42 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: <20190611104913.egsbwcedshjdy3m5@holly.lan> From: Brian Norris Date: Tue, 11 Jun 2019 09:55:30 -0700 Message-ID: Subject: Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye. To: Daniel Thompson Cc: Matthias Kaehlcke , Pavel Machek , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 choices can be assumed to be > logarithmic That's (almost, see below) exactly what we have. (And this is what Matthias is fighting against, now that we're implementing both "large number of data points" and "pre-curved" at the same time. We will have to either adapt the heuristic, or else adapt our device trees to fit the heuristic.) > Systems are coming along that allow us to animate the change of > brightness (part of the reason for interpolated tables is to > permit smooth animation rather than because the user explicitly wants > to set the brightness to exactly 1117). Chrome OS has done this for a long time. So "coming along" is a bit late ;) Also, I believe Chrome OS will do animation/smoothing for all tables (small or large) where it can: even for the small tables. > These systems are often > logarithmic but with a wide range of values. NB: Chrome OS happens to use a polynomial formula (exponent = 2 or 0.5, depending on how you look at it), not logarithmic. You can see it in all its (non)glory here: https://chromium.googlesource.com/chromiumos/platform2/+/ee015853b227cf265491bd80ccf096b188490529/power_manager/powerd/policy/internal_backlight_controller.cc#451 Regards, Brian