Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4686871pxu; Tue, 13 Oct 2020 04:58:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyw/5E90Fl/fRzHX4K05t32V2Du/kRm4+cSSknjpGpOh15rdcZUtRxNyjph7glfG+Ki27ET X-Received: by 2002:aa7:c451:: with SMTP id n17mr19099867edr.266.1602590322300; Tue, 13 Oct 2020 04:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602590322; cv=none; d=google.com; s=arc-20160816; b=ODR+lD6DHu+nngJyhINAUIul5ou8vOaZaGHJbH8sRRI12KKT180hywYcKqari5sUWe uyUx+7RxOYKJR7VWlNtoIflVAGwvsSYHLkAwuqj1d7iPS5NLbDguT31GIF/1cyBUUjWb XwvkUqVd3z5VAe8FKDxCARbqdk8CU65v6mXWOuXns8Ub9LxcyQbXC4j50iht6g18VDgr WK+AsS/cadIs9NlaaGgNjy7T7+no97e+axK9Uu5kLKry3Xq8hp4jtguFdV5HikSgKeF0 R6+oBGraiF7/C8O5qp4Qbq+P+Y2Mx+z+K+qYP+x2usDP+wrOnRw/QMB40uIGgDUh2FRn sUpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kobb2e1tlICZgkQS/oGVtY54aK5l9kHJ2QZVBKXSGxE=; b=KoEFcpwKjCuyKerwpJbVLUrQd7wQcvoLkdCzZJS2QdAnoulug3mCo09fPfJ+MZYT7G VPRTv+Laiaif1I958RSheqH9yrQOxKdy48qJfdlaXjmAlVI2bmBS0KU7vzXNrf5LgdVu NvBhfqFA7Ha+KfAWgjPJs7ytfWTkA6K7W4J8YzQ051pdovdiRWNsZUtlxK83QJK/iRT/ aVy+YZiDTzz0Ezh+hlyHdlkMeEi6DYTBYLjJU6X7d8liWa+KYmy/5PuFNi758hxbBvIj j6XzfeH5LwAdCGB8TJ1aD4jiT0amRE3tQDQLrJumSZ5/BRtWvw+0Mf4tv5ougHSAtbti UFhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HvRYgaNc; 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 b3si8173494ejz.322.2020.10.13.04.58.19; Tue, 13 Oct 2020 04:58:42 -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=HvRYgaNc; 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 S2390560AbgJMIB2 (ORCPT + 99 others); Tue, 13 Oct 2020 04:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390549AbgJMIB1 (ORCPT ); Tue, 13 Oct 2020 04:01:27 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6DE0FC0613D2 for ; Tue, 13 Oct 2020 01:01:27 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id n9so17020653pgf.9 for ; Tue, 13 Oct 2020 01:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kobb2e1tlICZgkQS/oGVtY54aK5l9kHJ2QZVBKXSGxE=; b=HvRYgaNc6roOxiu+jeMNUaEvL5jd+9FuF8oUyy0Qut6ZicDzpSKH3rWKcSKeygEjEn yb0slmgyi3zc3tFthbRId+EYOgfZZFgKsSyDAhoLqFIbgcMmoSRBIMdI4D74fUepQXuR VahaQpxlXCfl8FLlEz1J7risjgxjMtLieTEX0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=kobb2e1tlICZgkQS/oGVtY54aK5l9kHJ2QZVBKXSGxE=; b=ZRK75ppQDi31q6GsKCTjd1h8S4oCc+o68kMhDZCdWdGb5veQ0IfgG//AL6k4GUg1Lf FKOj4xKnUveV1W1+QlolW9khYbXMHEHXIj2g/zDufcoxg5mwYOt4Rf1rsSxebHe0tXns 5PTRV8NM2VyXVM5RMctU0i64EtCgaABG7kmciGuJ5TXQu60NsqtIGRcagETeRIwl798F UNBNrGm6ocS2OzV9iTAss+UmI4UzG3s8j4cS5x7WnMx55TnYuVrpTWyoEKKDKEZnTd14 kTlU1Oc18eB/1KLo1feFAmBVXWHNrgjSTMXH09RxC2TVLXMmTO+7fnThNkLPa2JC2N1J UpAg== X-Gm-Message-State: AOAM532OvRtaewAZ/wWvqFSB+n50uLZDmLHay3H1+jcYoXzsL5KEoTY3 mCyIBZwambxEYWRXk4dehUStdw== X-Received: by 2002:a62:2a94:0:b029:155:3225:6fd0 with SMTP id q142-20020a622a940000b029015532256fd0mr25008896pfq.64.1602576086840; Tue, 13 Oct 2020 01:01:26 -0700 (PDT) Received: from alex-desktop.lan (c-73-63-253-164.hsd1.ca.comcast.net. [73.63.253.164]) by smtp.gmail.com with ESMTPSA id y124sm14956924pfy.28.2020.10.13.01.01.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Oct 2020 01:01:26 -0700 (PDT) From: Alexandru Stan To: Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Lee Jones , Daniel Thompson , Jingoo Han , Bartlomiej Zolnierkiewicz , Heiko Stuebner , Rob Herring , Andy Gross , Bjorn Andersson Cc: Douglas Anderson , Enric Balletbo i Serra , Matthias Kaehlcke , Alexandru Stan , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rockchip@lists.infradead.org Subject: [PATCH v2 0/3] PWM backlight interpolation adjustments Date: Tue, 13 Oct 2020 01:01:00 -0700 Message-Id: <20201013080103.410133-1-amstan@chromium.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I was trying to adjust the brightness-levels for the trogdor boards: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2291209 Like on a lot of panels, trogdor's 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 that's customary to have on chromebooks. I found the current behavior of the pwm_bl driver a little unintuitive and non-linear. See patch 1 for a suggested fix for this. A few veyron dts files were relying on this (perhaps weird) behavior. Those devices also want a minimum brightness like trogdor, so changed them to use the new way. Finally, given that trogdor's dts is part of linux-next now, add the brightness-levels to it, since that's the original reason I was looking at this. Changes in v2: - Fixed type promotion in the driver - Removed "backlight: pwm_bl: Artificially add 0% during interpolation", userspace works just fine without it because it already knows how to use bl_power for turning off the display. - Added brightness-levels to trogdor as well, now the dts is upstream. Alexandru Stan (3): backlight: pwm_bl: Fix interpolation ARM: dts: rockchip: veyron: Remove 0 point from brightness-levels arm64: dts: qcom: trogdor: Add brightness-levels 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 +- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 9 +++ drivers/video/backlight/pwm_bl.c | 70 +++++++++----------- 5 files changed, 43 insertions(+), 42 deletions(-) -- 2.28.0