Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp839543pxa; Wed, 5 Aug 2020 14:11:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzw448CAyUFQFPVLTgUqU9EJ292cxq2tOFBTPyaFUsCa+9mKeOfUfDRROAPbg9IiwE3xdCZ X-Received: by 2002:aa7:c889:: with SMTP id p9mr1153875eds.105.1596661901357; Wed, 05 Aug 2020 14:11:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596661901; cv=none; d=google.com; s=arc-20160816; b=SGfbkk9A3OKqDayl5kg57cPx0NgjewPy3Woms7MUMjrdxMstNMIL9mo+KdozJhnKdg Da+mi1elpjzFKXJ/x0UFJ+BURP9qr3AG5QN9jRB1OX6fi3/cFmt5fSWCQOgK/308FRBZ uP3lfC+/vKuDnC5TPfw0uxWH0LfXTIL0AaTv/MYx3V336TokVguXN2o03ni6adNYF3Tz zczK3h8syx+V3XGtkYF/+e6bYZg6CYebTPVpkMLfuO8o6bn6uQjMAw2vBcD57p/dB7hi WmzSNoGV+IvJIRLunx1fT25fceZwp6s4m+wYvzpZhZii7awDqFoKFRMtzfB7zgaVQt5V XpKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=V2PZXILdefiTwwzfO5OUUQBgzK17xy7UQ4vY/f0A1uM=; b=DXEmLBwfpaRpeTihba5WphkWgSOD683PyRWr1W7J3lPNdJqZCA6QhycNbyszV8Scy5 koLpk/NsAvABnG5b/8LXw8jW/9+lAweet5Ds2PnPKcF/JeumGn0TDE6Oc6LxSscWGrRH C7LZHNeV7tqIlYap8iWtCw8kk5+aDZQqkvHsUT/QTb9MeQORWeHP3xVPqBdT0eKiFSU6 L7Fpnrd8rqSiQk4oFWRj1dr+diMX59pkdLaxZzGhcEjteTUL47gG2WgWziK+hzawoHQ3 HfAxf/zLbL/vENe+/vDTi+rgwpZxRBJtjDP8+OGD/sgd4afnvabAXYr5c7jLTIRN7yRB omDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aPqJee4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id ck3si1932140edb.324.2020.08.05.14.11.17; Wed, 05 Aug 2020 14:11:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aPqJee4+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726569AbgHEVK1 (ORCPT + 99 others); Wed, 5 Aug 2020 17:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725139AbgHEVKY (ORCPT ); Wed, 5 Aug 2020 17:10:24 -0400 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9145BC061575 for ; Wed, 5 Aug 2020 14:10:23 -0700 (PDT) Received: by mail-ej1-x643.google.com with SMTP id d6so34099717ejr.5 for ; Wed, 05 Aug 2020 14:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=V2PZXILdefiTwwzfO5OUUQBgzK17xy7UQ4vY/f0A1uM=; b=aPqJee4+/II1pDeHm6YJT9N8szJtyfH8/u0a/mb/rUh0XKwrO9/lI6mAKg/YUjZsap p0B7nL/zuMyT3EsRGWbvq29/0Lc9irQLp5boKwUO0dgr7wICe4bQ/VVNo2zfxFQFtKUF aTAuAP1cEHDioLUgDXQmFNnV10RJlUC2CPrZI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=V2PZXILdefiTwwzfO5OUUQBgzK17xy7UQ4vY/f0A1uM=; b=pth4mrdZhPml0j0mRK21e7OWk4VHtCwmptAgP4KyGLk/lnLPBXOfmqBVJ3iJDUWXHP vMEB9X4iVtDXUxJH4DeURrD59NTb2iMRC14CIu4yImoA6oH+yVCq8Yk+JCsde9A/mXfl CNuNTfZKnxRD0Vlkd3msjjQNznLidSIaWq/cEmoAlqh84hpN3FXd3R9H2mLz4PWcd7bT aOlDTHIpUnkWJhbU0fdv5alqNWfCAOhaBXoAVdS/JiMGOkXiMwdvFv15XZ5ShLDrLhnk vCP5Wj3yNV1mrqG9EI+ex3RZjNqtK7pWWMZNf1dzVBI/VIb3DvqAoiTXzcGPF1EOO9bQ Tb6Q== X-Gm-Message-State: AOAM533xz3wADfCzCmlBGttRYsgBTHfQ8/om0orBnJmt3Q8ix/GQV/oB 5C5r7xcQmMCjoRB++8G/F1ng4A4Mz5k= X-Received: by 2002:a17:906:4f82:: with SMTP id o2mr1251879eju.424.1596661821719; Wed, 05 Aug 2020 14:10:21 -0700 (PDT) Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com. [209.85.218.45]) by smtp.gmail.com with ESMTPSA id ec20sm2247304ejb.61.2020.08.05.14.10.21 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Aug 2020 14:10:21 -0700 (PDT) Received: by mail-ej1-f45.google.com with SMTP id jp10so21379409ejb.0 for ; Wed, 05 Aug 2020 14:10:21 -0700 (PDT) X-Received: by 2002:a05:6402:28f:: with SMTP id l15mr1118783edv.233.1596661486208; Wed, 05 Aug 2020 14:04:46 -0700 (PDT) MIME-Version: 1.0 References: <20200721042522.2403410-1-amstan@chromium.org> In-Reply-To: <20200721042522.2403410-1-amstan@chromium.org> From: Alexandru M Stan Date: Wed, 5 Aug 2020 14:04:09 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] PWM backlight interpolation adjustments To: Thierry Reding , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , Heiko Stuebner , Rob Herring Cc: Matthias Kaehlcke , Douglas Anderson , Enric Balletbo i Serra , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, linux-kernel , linux-pwm@vger.kernel.org, "open list:ARM/Rockchip SoC..." Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 20, 2020 at 9:27 PM Alexandru Stan wrote: > > I was trying to adjust the brightness for a new chromebook: > https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2291209 > Like a lot of panels, the low end needs to be cropped, > and now that we have the interpolation stuff I wanted to make use of it > and bake in even the curve. > > I found the behavior a little unintuitive and non-linear. See patch 1 > for a suggested fix for this. > > Unfortunatelly a few veyron dts files were relying on this > (perhaps weird) behavior. Those devices also want a minimum brightness. > The issue is that they also want the 0% point for turning off the > display. > https://github.com/torvalds/linux/commit/6233269bce47bd450196a671ab28eb1ec5eb88d9#diff-e401ae20091bbfb311a062c464f4f47fL23 > > So the idea here is to change those dts files to only say <3 255> (patch > 3), and add in a virtual 0% point at the bottom of the scale (patch 2). > > We have to do this conditionally because it seems some devices like to > have the scale inverted: > % git grep "brightness-levels\s*=\s*<\s*[1-9]"|cat > arch/arm/boot/dts/tegra124-apalis-eval.dts: brightness-levels = <255 231 223 207 191 159 127 0>; > > > Alexandru Stan (3): > backlight: pwm_bl: Fix interpolation > backlight: pwm_bl: Artificially add 0% during interpolation > ARM: dts: rockchip: Remove 0 point in backlight > > arch/arm/boot/dts/rk3288-veyron-jaq.dts | 2 +- > arch/arm/boot/dts/rk3288-veyron-minnie.dts | 2 +- > arch/arm/boot/dts/rk3288-veyron-tiger.dts | 2 +- > drivers/video/backlight/pwm_bl.c | 78 +++++++++++----------- > 4 files changed, 42 insertions(+), 42 deletions(-) > > -- > 2.27.0 > Hello, Friendly ping. Let me know if you would like me to make any changes to my patches. Thanks, Alexandru M Stan