Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3000815ybd; Fri, 28 Jun 2019 00:55:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgVhLq8oFtyCa+QzP5Ih5HoENscIjMSG6/7qAm++xoycktUYa72cbX0K2Lw5E741dQnlVQ X-Received: by 2002:a17:902:7793:: with SMTP id o19mr9830217pll.110.1561708543101; Fri, 28 Jun 2019 00:55:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561708543; cv=none; d=google.com; s=arc-20160816; b=GQU78/JWEBdEVTxdl+Zm9lVzbAffBm3CUbLJdghTC6Q9tfRN8KOEzGn1c3rWtfdBSE O6fv/TOhd4Qu74xFC0nXhHTX3Lrrk176bYyIrWYmEJmWDHOOEG9wo+4XB4nSkKEU1yb0 e9t3tqYAg0OtabvKeXGG/SnCTxVTeeSYphUdC3EROzzlh/Gam4W3OxaD+9T526rFLahl gfZ1kbWIJ1/SbgmNAuvsoEbNRKqssgMKb8gQS36bgUDzq0H2V1d2zRbYV9LrIO6iv499 ia22c7ckFbcQJcpvWEJcFjDAD9bTvyl+he72t5H9WY46ecX0ILZILj7CAX0DS2+nMxIe mkmA== 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=28q0p8mfEjo9y2tYGYE8ojhpf6JJn4oHqxDJM4Zwywo=; b=iIVw8pzfr/zFd7jNUYG3JJiZe/HWuFe1szmGPN2izxsNMMzCBE9o/xZWIF0iikgtql UyYYpJG+NnkrvCb+Fq/yDDhMXEhDPktje7KOgaCHW2SpHT0TJ/Hes1C+Y3eNgIgbJK9O gMYbzrHfqRRQy1vCAxSqGh9iPAbUpWV4dBaWK5I2ayjI+imYsVHjcD7X8RRsjiENBFuv 0S2cWeDlo8jmXJ0v7XmzQX+eGzax8/Fx7C860HgxZWrzbcf72G3YT3NNklbieosRiOkO sRvK82GLm7RnNHWitGMBphqqySj89QLW3rlLVnjY1EA+EOGRYxq0p2O7igyIGL3Y3Udk YBrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YVeJdSjX; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o37si1700427pjb.20.2019.06.28.00.55.26; Fri, 28 Jun 2019 00:55:43 -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=@linaro.org header.s=google header.b=YVeJdSjX; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbfF1HzW (ORCPT + 99 others); Fri, 28 Jun 2019 03:55:22 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:44045 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726385AbfF1HzW (ORCPT ); Fri, 28 Jun 2019 03:55:22 -0400 Received: by mail-wr1-f66.google.com with SMTP id r16so3344126wrl.11 for ; Fri, 28 Jun 2019 00:55:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=28q0p8mfEjo9y2tYGYE8ojhpf6JJn4oHqxDJM4Zwywo=; b=YVeJdSjXyGRCdF2WmpC/ewATk5iXIkwZ/JIJisZIjk5xmVj1kn09bt61Ahn1Qe/lQg 5i5n55RmnCX1F8SIlclZUlQA4bK9puQRh2BbQg84wLDjunKlJsXFuPcZksEstlRD35mP iAiT17WBFT6EcmLfR/CaS269KYwqzXA+RG0+X/74V3JcYWFQNCrKLewc8YAlk4cptNAy rPWHJUWZ0NRDAs79yjPu2rW2AF0Khj2gwSQiNBMmQ1lkRs2cEbOyKFxOwL1GWUXY3a4E 1pJmhaHTGO1ODS9pjBs9K/Kkjv3AX/xWVEkTMQq310+vE/rwmqQse3mvc4C4Pp73yn5Z p8+A== 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=28q0p8mfEjo9y2tYGYE8ojhpf6JJn4oHqxDJM4Zwywo=; b=FIzTmcaPUSMNewy5JW2ANXk3n8thyc26DWP39PNDwvfgnrfrsXLODT0DvAGvPnE/j+ mKGkiVmlfQN36Kljevp9n5+kC2EHbA+yHpncsZ8ZFn2wiOrSxyXo+4Qcz0xu6syQU+R7 WWBz2AxmJ5nMEPH3MwwsP1KnG+uyNTC6B97kJsPSQEhFHzLPKhWPxdq4VdZtxIgVXUSJ Ue8HAR43/RYh7eaDVOz1zLCFpFiCiKj/VHB/6yPAgmA1t+u1iZhgzHJk0z989J29krF/ AfoXq6g26QUg0Tcypo4XkzXyHKP9xXu1u3AyrbQX19dJkIzGnv1p55xgycwz8k4CTUBN eODg== X-Gm-Message-State: APjAAAWXepC7Xed+rZI0XEytuo/VhCxkZCwuD4XR3kT8cLUhO1n7yHAR jdg2Jw/hp/09S6/MJUmQxJbF8g== X-Received: by 2002:a5d:6190:: with SMTP id j16mr6969556wru.49.1561708519895; Fri, 28 Jun 2019 00:55:19 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id u2sm8474802wmc.3.2019.06.28.00.55.17 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 28 Jun 2019 00:55:18 -0700 (PDT) Date: Fri, 28 Jun 2019 08:55:16 +0100 From: Daniel Thompson To: Pavel Machek Cc: Matthias Kaehlcke , Thierry Reding , Lee Jones , Jingoo Han , Bartlomiej Zolnierkiewicz , linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Enric Balletbo i Serra , Douglas Anderson , Brian Norris , Jacek Anaszewski Subject: Re: [PATCH v2 4/4] backlight: pwm_bl: Set scale type for brightness curves specified in the DT Message-ID: <20190628075516.dwev7fxz7kmox2i2@holly.lan> References: <20190624203114.93277-1-mka@chromium.org> <20190624203114.93277-5-mka@chromium.org> <20190626145617.GB22348@xo-6d-61-c0.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190626145617.GB22348@xo-6d-61-c0.localdomain> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 26, 2019 at 04:56:18PM +0200, Pavel Machek wrote: > On Mon 2019-06-24 13:31:13, Matthias Kaehlcke wrote: > > Check if a brightness curve specified in the device tree is linear or > > not and set the corresponding property accordingly. This makes the > > scale type available to userspace via the 'scale' sysfs attribute. > > > > To determine if a curve is linear it is compared to a interpolated linear > > curve between min and max brightness. The curve is considered linear if > > no value deviates more than +/-5% of ${brightness_range} from their > > interpolated value. > > I don't think this works. Some hardware does takes brightness in perceptual units, > converting it in the LED controller. This check is exclusive to PWM backlights so I'd like to double check that you are thinking specifically of hardware that takes it's signal from the PWM and works in perceptual units? I don't recall any examples being offered when we reviewed the auto-generated CIE tables (although since that can be overriden by DT it was not of the same gravity and this example). Daniel.