Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5129286imm; Fri, 18 May 2018 17:36:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpNnHIQB0087uQb0QobtpPdhSkf+7umKgSEozHZBgZ6GJz3XHeK7JiA01/KQzuZoSH3EkL5 X-Received: by 2002:a62:fe0e:: with SMTP id z14-v6mr11488715pfh.73.1526690189732; Fri, 18 May 2018 17:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526690189; cv=none; d=google.com; s=arc-20160816; b=d+ZQ5pAxvq4u4AF08PjuPWCnSCHx/xaJtqG/7VtHqdu+8rmy8sjkDSR/zes9VMW2r3 6X/+azbcF1tQu0MJbX66ELEXs8WrFDQqiwB3IUAxhYm1ngaO+jZCHgHtG76ppa7gAOMs gX+4F2gkFra9ckZCxtPrU6ittKOkRxYp9y/tFsbzcVeG/m8JqE270dWnpSsd0pnaSVV4 kZbZcQqNTYTs53kRNrUPXUVa/PT5Gn9Ujz0f9pW3CVsOhNzpBu6es4yAYQ7Cnq79qGhF 7i+nIzlrYBw+unN1aN7vnKK7xPHGJfUjGliRTKdHt/p4MJBInRSLOhSBBFmfXhK3LKAM 5flw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=uHapsEiisGwsK3J4+x4D15nMD6hR7cSl03I5Z+PYwQ4=; b=Iw5+VBCk9IfjVvXB/+L/n7PVwQ/KpiTpsPfVCjU1pFkSMfIfx3SWfOeNfizqW2jIKr BnAuUauBmc63SU5xqzzICZJj2MA/W6BcWQJBSH6C3cU/2CB4yKqsgeeFCe/tHy+YU8Dn nHnpnLy+xBhmHpa634S7AnXOv3K+zVTRCmoaRcXzZlE0HUm+hdFebYZ5q5sF9LJTusgl lu1SZASjjoA+tqeFnq8wsCmjJheptYx2AVno50KXV208uqpj/m5+R1MPMRtjmXb3RgQh NaZyJA2Ofseq3yzK4cDJv2IpcLAfTk2XFYHi/w5Dh87szaF6X5+acy3fQfzzWdxbVuqd e3tg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1-v6si8355787pld.493.2018.05.18.17.36.14; Fri, 18 May 2018 17:36:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751975AbeESAgE convert rfc822-to-8bit (ORCPT + 99 others); Fri, 18 May 2018 20:36:04 -0400 Received: from mail-out-4.itc.rwth-aachen.de ([134.130.5.49]:63841 "EHLO mail-out-4.itc.rwth-aachen.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbeESAf7 (ORCPT ); Fri, 18 May 2018 20:35:59 -0400 X-Greylist: delayed 582 seconds by postgrey-1.27 at vger.kernel.org; Fri, 18 May 2018 20:35:58 EDT X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CvCQARbv9a/54agoZdHAEBAQQBAQoBA?= =?us-ascii?q?YJvVFOBCzKYZ4F5gQ+VLgsshEACghEhOBQBAgEBAQEBAQJsKIUoAQEBAwF5EAI?= =?us-ascii?q?BCBgJJQ8BIiUCBAENhSEIAQOrcIhJgg+GEYIkgVU+hBuEc4VUAoxWi3YHAneVP?= =?us-ascii?q?IUhkFACAgICCQIUgSUzIYFSTSSDE4JHjgaCBI1QAYEXAQE?= X-IPAS-Result: =?us-ascii?q?A2CvCQARbv9a/54agoZdHAEBAQQBAQoBAYJvVFOBCzKYZ4F?= =?us-ascii?q?5gQ+VLgsshEACghEhOBQBAgEBAQEBAQJsKIUoAQEBAwF5EAIBCBgJJQ8BIiUCB?= =?us-ascii?q?AENhSEIAQOrcIhJgg+GEYIkgVU+hBuEc4VUAoxWi3YHAneVPIUhkFACAgICCQI?= =?us-ascii?q?UgSUzIYFSTSSDE4JHjgaCBI1QAYEXAQE?= X-IronPort-AV: E=Sophos;i="5.49,416,1520895600"; d="scan'208";a="9769393" Received: from rwthex-w2-a.rwth-ad.de ([134.130.26.158]) by mail-in-4.itc.rwth-aachen.de with ESMTP; 19 May 2018 02:26:15 +0200 Received: from rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) by rwthex-w2-a.rwth-ad.de (2002:8682:1a9e::8682:1a9e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Sat, 19 May 2018 02:26:14 +0200 Received: from rwthex-w2-a.rwth-ad.de ([fe80::18f3:313d:3e:42ff]) by rwthex-w2-a.rwth-ad.de ([fe80::18f3:313d:3e:42ff%21]) with mapi id 15.01.1415.004; Sat, 19 May 2018 02:26:14 +0200 From: =?iso-8859-1?Q?Br=FCns=2C_Stefan?= To: "linux-sunxi@googlegroups.com" , "Paul Kocialkowski" CC: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "dri-devel@lists.freedesktop.org" , Rob Herring , "Mark Rutland" , Chen-Yu Tsai , Thierry Reding , David Airlie Subject: Re: [linux-sunxi] Re: [PATCH v4 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet Thread-Topic: [linux-sunxi] Re: [PATCH v4 3/3] ARM: dts: sun7i: Add support for the Ainol AW1 tablet Thread-Index: AQHT7nfpuM7SaQUnk0GpGjEzr+ffBKQ2EYYA Date: Sat, 19 May 2018 00:26:14 +0000 Message-ID: <33944340.T0tLPSd54F@sbruens-linux> References: <20180507220413.21990-1-contact@paulk.fr> <0da5787f0ce2309a74db88820bc58b3b3501c451.camel@paulk.fr> <20180518071436.3vvyllghrdxptsxg@flea> In-Reply-To: <20180518071436.3vvyllghrdxptsxg@flea> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [78.35.13.203] Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Freitag, 18. Mai 2018 09:14:36 CEST Maxime Ripard wrote: > On Mon, May 14, 2018 at 10:36:08PM +0200, Paul Kocialkowski wrote: > > > > + backlight: backlight { > > > > + compatible = "pwm-backlight"; > > > > + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; > > > > + brightness-levels = < 0 1 1 1 1 2 2 2 > > > > + 2 3 3 3 3 4 4 4 > > > > + 5 5 5 6 6 6 7 7 > > > > + 8 8 8 9 9 9 10 10 > > > > + 10 11 11 12 12 12 13 13 > > > > + 14 14 14 15 15 16 16 17 > > > > + 17 17 18 18 19 19 20 20 > > > > + 21 21 21 22 22 23 23 24 > > > > + 24 25 25 26 26 27 27 28 > > > > + 28 29 30 30 31 31 32 32 > > > > + 33 33 34 35 35 36 36 37 > > > > + 38 38 39 39 40 41 41 42 > > > > + 43 43 44 44 45 46 47 47 > > > > + 48 49 49 50 51 51 52 53 > > > > + 54 54 55 56 57 57 58 59 > > > > + 60 61 61 62 63 64 65 65 > > > > + 66 67 68 69 70 71 71 72 > > > > + 73 74 75 76 77 78 79 80 > > > > + 81 82 83 84 85 86 87 88 > > > > + 89 90 91 92 93 94 95 96 > > > > + 97 98 99 101 102 103 104 105 > > > > + 106 108 109 110 111 112 114 115 > > > > + 116 117 119 120 121 123 124 125 > > > > + 127 128 129 131 132 133 135 136 > > > > + 138 139 141 142 144 145 147 148 > > > > + 150 151 153 154 156 157 159 161 > > > > + 162 164 166 167 169 171 173 174 > > > > + 176 178 180 181 183 185 187 189 > > > > + 191 192 194 196 198 200 202 204 > > > > + 206 208 210 212 214 216 219 221 > > > > + 223 225 227 229 232 234 236 238 > > > > + 241 242 244 246 248 250 253 255>; > > > > > > You kind of overdid it here :) > > > > > > What I meant to say before was that if you have 10 elements (and you > > > really should have something in that magnitude) each step should > > > increase the perceived brightness by 10%. > > > > Mhh I think 10 elements would fall too short to really depict the curve > > with appropriate precision. Given the usual size for brightness cursors > > in e.g. gnome-shell, it feels like a bigger number would be more > > appropriate. Let's make it to 100 with values from 0 to 255! > > > > > In this particular case, I really think having something close to <0 4 > > > 8 16 32 64 128 255> would be enough. > > > > > > And in general, that kind of odd looking table without any more > > > context is just screaming for a comment :) > > > > Noted, I will explain the idea, but probably without the exact formula > > that's really a nasty hack written down on a piece of paper sitting in > > my garbage at this point. > > So no one will ever be able to understand where this sequence comes > from (yourself-in-two-years included). That sounds like a pretty bad > idea. > > Maxime The following formula yields practically the same table: out = ceil(255 * (0.245 * in/255 + 0.755 * pow(in/255, 2.6) )) Maximum error: 4, maximum relative error: 0.33 Kind regards, Stefan