From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8DF6C4321A for ; Tue, 11 Jun 2019 10:18:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9FDA32177E for ; Tue, 11 Jun 2019 10:18:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405590AbfFKKSs (ORCPT ); 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--