Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5225445ybi; Tue, 11 Jun 2019 22:10:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqysbGQVP8AnAbhEH+IHEpIMeUwAElGfpKFhVJJXT4ctx4/ijm9uQ1v9IDpSTV637+kr4zG/ X-Received: by 2002:a62:1c5:: with SMTP id 188mr21398652pfb.26.1560316251173; Tue, 11 Jun 2019 22:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560316251; cv=none; d=google.com; s=arc-20160816; b=ElxwL+8RbDDz8S70AOYsT1MmwGacMNKNxq2oVQfe0+906li36nW2GA9uBIbA2F2q54 iC3pLweiaSdoHef7mQ6yoG8EPw6PgxyGb01Yyucu6NYQJTcOzDyRNm11zj0R0FNM1Hsy UWLJ/qavS2ZpX3k+sIIohmsrF4v2ua9/B94gkXdTkAbY2QvZpd0ijGwRwkUMlEKsnuT1 iqgEfjdsqe+ekjgpVa0BnfMLFXW0o0olEM66kBhKFfxnh3cuc2W/H0CohMal16/n+9vK pzLRp8L+hyf+28BxAoR75vUw5TGyAwVdjEExKeC9p7YTsXr80Q62AAjKBVKXCJnZbjuP Veyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=3nJbbRKlTPYM1woarvu6grRc9TzO5KmCP13nZ/PCJ6c=; b=bK5A2MlLmcn8M10vier2Y8aSgF/BgvfbgK01hvh5LrS2HwQkclXSAM5dwRUytCpy03 l9bAmKzxmLez2oDsSLvvmi3lpvmvPuNYcims3yTKK57lUplRMG73EK1ht7m7cV/+39DJ J4t93N+rnQoI9N4WNL24cmXonhPw5PraEIbDZsz5ECahKeH9Q8boU2gmp5cxVsoLhtA0 HwGgOcrJAg+Rt7nqwJ065VkGPz2SFwPkBXdEvja0xu6TDEs/FSFBfZtk/llm2IR3hPPb vooG88EAkgOHgc4/hPpHUG0fhQjTl4nKo0byGS3W7b3qiE4NMcZ/2idEQDPE3Bhl9+MD KqVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=AkAgROt9; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si14425126plo.212.2019.06.11.22.10.35; Tue, 11 Jun 2019 22:10:51 -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=@chromium.org header.s=google header.b=AkAgROt9; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392104AbfFKWaX (ORCPT + 99 others); Tue, 11 Jun 2019 18:30:23 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:35816 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392091AbfFKWaW (ORCPT ); Tue, 11 Jun 2019 18:30:22 -0400 Received: by mail-pg1-f196.google.com with SMTP id s27so7751281pgl.2 for ; Tue, 11 Jun 2019 15:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=3nJbbRKlTPYM1woarvu6grRc9TzO5KmCP13nZ/PCJ6c=; b=AkAgROt9atHwV3xoI9VjaZrzZaaO5howAWh2priY04W1eiUwPse4i9GNmq6QF62bfM MjEIEYGjhwP96quM3HMtr3Th7Fkvo1GgNOmUIQgHXmbm147RCQC4UZxj1RlLETex3AUi Ks7ioq3D9bjZkjE4COgReB+rkRk03RcrgiW1E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=3nJbbRKlTPYM1woarvu6grRc9TzO5KmCP13nZ/PCJ6c=; b=mIJY7zXEyv0ZIkDXXqr6N3PtaQ4M8N5e9B79EIWHOyco127h2nLq+cKqwIHG0m+0qc HYomm2aY28/Qi7mHXX9EFEXkpRJ8k6bkx/ELzrd0CeC1NlUxO5xGpbSt2EGjSy/fhKOT OboentJ41pSZ9cPRQVlx6uvf0fZqgYstPjBfklqiupI1qQS+Z4POWlv1Cy6828QfwPgE Drj4ulYXIKdszVcTCV9gLY8DSSVS1T0QeOjkzqOIqQPcbDTVC8v1Xcm7as10mBBJKnWA cqE4SmMNzgnsTjz4Jr0xzM3Jkjd8mXWUuHQ5HHqbp5EjKAyxxmmiJSVcYMhbLLFEATXS rZ7w== X-Gm-Message-State: APjAAAW4tza4na3OBgu+PuISZuJ9qoqr90huJ83XRr5oEgg8soIw85ty 0gHIbGzc5DceQ17CjaS6HUd30A== X-Received: by 2002:a17:90a:2488:: with SMTP id i8mr28582703pje.123.1560292222289; Tue, 11 Jun 2019 15:30:22 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id a13sm8937301pgh.6.2019.06.11.15.30.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 15:30:20 -0700 (PDT) Date: Tue, 11 Jun 2019 15:30:19 -0700 From: Matthias Kaehlcke To: Brian Norris Cc: Daniel Thompson , 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 Subject: Re: [PATCH v3 3/4] backlight: pwm_bl: compute brightness of LED linearly to human eye. Message-ID: <20190611223019.GH137143@google.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 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 generic > > userspaces end up with a (flawed) heuristic. > > Bingo! Would be nice if we could start to fix this long-standing flaw. Agreed! 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? 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.