Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4236599ybi; Tue, 11 Jun 2019 03:19:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4JfhEgnyydLq3ByggSvHwcbOnTHE1ewrOZc2sR31I5dUPzHIXrLX/FFShUgNcKjydvYdO X-Received: by 2002:a62:1ac8:: with SMTP id a191mr18045855pfa.164.1560248388182; Tue, 11 Jun 2019 03:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560248388; cv=none; d=google.com; s=arc-20160816; b=vxX1wRD9/KCWFQe6Y1AM5CyPwpCxRJ7A/03E283P6IjI51fSyCl7QfT6goNnYzzl4J pfvnOUbq/kCsVL9ZwF/siPhgJ6lySvURwWe0ycpTEosmJeI41ReByGOr2teOaIOyPgmA E7T7BgNX2VjmkqxDIl4ZwLeZu9k89TkEY+p+Gp9eRCycmTuJjEGqafwFunrQBIP3ZwPB yInvwn9t/usSY5pnR3Xtvr0ov0+DeR2iz1aVA6BWyWCCeVjhxpkEN1NAR81oCaZy5s2a b5AuSxu7/ITKLCzwozt+uLABouY27EwY1E0ARv16IAFAK5++SHRYtKRWYn/AW8uCI2nf Z+EA== 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; bh=6bGO1nlrdSs6sTDD46tpkqxGu0LK06yQqydKEQEDajM=; b=ZDboqQ1BwqD1WeE9y8fsN+osj1i9VO0kDE03LjzxRHQ6OOqcu+9+JyosuSy5qkhHYK v4r5QGTtld81Coc8stJzHJIK3nguNo1lTzVEXrK+d9rHzWPR6Pl0oUoIwBnoEq84athb iosDaPV4vcDWfe8F9j7RJLJt8ozHe2xJMA4sKon8vYJ7JUoP7foyAmLUGOXdKdeuEPkc Eo33MJ4kZbk3mnCisDWSkGedR3V8mYt8claXK/PWm/wx865/t6s3jRPzEWFN/dU629Cf lPpTpq6wsUMPWFV4cgFd4a0WRb8Ta7nf5W/wlAlNsx6t2abVb5sG+HqJ8ilSwQ2Y7Dei GHmg== 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 s187si5365824pgb.49.2019.06.11.03.19.31; Tue, 11 Jun 2019 03:19:48 -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 S2405585AbfFKKSs (ORCPT + 99 others); Tue, 11 Jun 2019 06:18:48 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33022 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405314AbfFKKSq (ORCPT ); Tue, 11 Jun 2019 06:18:46 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 2C6D68023E; Tue, 11 Jun 2019 12:18:33 +0200 (CEST) Date: Tue, 11 Jun 2019 12:18:43 +0200 From: Pavel Machek To: Matthias Kaehlcke Cc: Lee Jones , Daniel Thompson , Jingoo Han , Jacek Anaszewski , Rob Herring , Mark Rutland , Thierry Reding , Bartlomiej Zolnierkiewicz , Enric Balletbo i Serra , dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, Douglas Anderson , Brian Norris Subject: Re: [PATCH 2/2] backlight: pwm_bl: Get number of brightness levels for CIE 1931 from the device tree Message-ID: <20190611101843.GD7526@amd> References: <20190610233739.29477-1-mka@chromium.org> <20190610233739.29477-2-mka@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jL2BoiuKMElzg3CS" Content-Disposition: inline In-Reply-To: <20190610233739.29477-2-mka@chromium.org> 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 --jL2BoiuKMElzg3CS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon 2019-06-10 16:37:39, Matthias Kaehlcke wrote: > Commit 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED > linearly to human eye") uses pwm_period / hweight32(pwm_period) as > as heuristic to determine the number of brightness levels when the DT > doesn't provide a brightness level table. This heuristic is broken > and can result in excessively large brightness tables. >=20 > Instead of using the heuristic try to retrieve the number of > brightness levels from the device tree (property 'max-brightness' > + 1). If the value is not specified use a default of 256 levels. >=20 > Fixes: 88ba95bedb79 ("backlight: pwm_bl: Compute brightness of LED linear= ly to human eye") I don't think this one is suitable for stable. I'm pretty sure the heuristics works well for many boards, and you just replaced it with another heuristics ("256"). > Signed-off-by: Matthias Kaehlcke Acked-by: Pavel Machek --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --jL2BoiuKMElzg3CS Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlz/gAMACgkQMOfwapXb+vIo3ACgh5KFLWPPu5aM3ZOFG5tXtj5k Qc4AoJr268a0RVM8on0+DfnTeYriXWab =vM3e -----END PGP SIGNATURE----- --jL2BoiuKMElzg3CS--