Linux-PWM Archive on
 help / color / Atom feed
From: Alexandru M Stan <>
To: Daniel Thompson <>
Cc: "Thierry Reding" <>,
	"Uwe Kleine-König" <>,
	"Lee Jones" <>,
	"Jingoo Han" <>,
	"Bartlomiej Zolnierkiewicz" <>,
	"Heiko Stuebner" <>,
	"Rob Herring" <>,
	"Matthias Kaehlcke" <>,
	"Douglas Anderson" <>,
	"Enric Balletbo i Serra" <>,,,
	linux-kernel <>,
Subject: Re: [PATCH 2/3] backlight: pwm_bl: Artificially add 0% during interpolation
Date: Wed, 9 Sep 2020 11:42:56 -0700
Message-ID: <> (raw)
In-Reply-To: <20200904113822.xoyt4w5x7vwvh7cr@holly.lan>

On Fri, Sep 4, 2020 at 4:38 AM Daniel Thompson
<> wrote:
> On Mon, Jul 20, 2020 at 09:25:21PM -0700, Alexandru Stan wrote:
> > Some displays need the low end of the curve cropped in order to make
> > them happy. In that case we still want to have the 0% point, even though
> > anything between 0% and 5%(example) would be skipped.
> For backlights it is not defined that 0 means off and, to be honest, 0
> means off is actually rather weird for anything except transflexive
> or front lit reflective displays[1]. There is a problem on several
> systems that when the backlight slider is reduced to zero you can't
> see the screen properly to turn it back up. This patch looks like it
> would make that problem worse by hurting systems with will written
> device trees.
> There is some nasty legacy here: some backlight displays that are off
> at zero and that sucks because userspace doesn't know whether zero is
> off or lowest possible setting.
> Nevertheless perhaps a better way to handle this case is for 0 to map to
> 5% power and for the userspace to turn the backlight on/off as final
> step in an animated backlight fade out (and one again for a fade in).


Apologies for my delay. Thanks for the responses!

Yeah, I felt pretty sketchy about this 0% patch as well. But I figured
it's better to send my suggestion and get corrected than lose the
fixed interpolation patch.

Turns out there's no reason to need 2/3. I was mistaken:
echo "4" > /sys/devices/platform/backlight/backlight/backlight/bl_power
seems to work just fine to turn the backlight off, nothing special
about my device (pwm comes from cros_ec).
Chrome OS user space already makes full use of that knob
I wanted to try X11 on the same device but I haven't gotten to it yet,
perhaps I'll post my results in the next cover letter.
So it seems I didn't have to worry about "not breaking userspace" on
the existing devices.

I'll respin this patch set: keep 1/3 and 3/3, remove 2/3, and
potentially add another one to update trogdor's dtsi (since that's
where I want this fixed linear interpolation to happen).

Thank you,
Alexandru Stan

  parent reply index

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  4:25 [PATCH 0/3] PWM backlight interpolation adjustments Alexandru Stan
2020-07-21  4:25 ` [PATCH 1/3] backlight: pwm_bl: Fix interpolation Alexandru Stan
2020-09-04 11:27   ` Daniel Thompson
2020-07-21  4:25 ` [PATCH 2/3] backlight: pwm_bl: Artificially add 0% during interpolation Alexandru Stan
2020-08-07  8:21   ` daniel
2020-08-13 13:45     ` Daniel Thompson
2020-09-04 11:38   ` Daniel Thompson
2020-09-07  7:50     ` Daniel Vetter
2020-09-09 14:45       ` Daniel Thompson
2020-09-09 15:03         ` Daniel Vetter
2020-09-10  7:47           ` Daniel Vetter
2020-09-09 18:42     ` Alexandru M Stan [this message]
2020-08-05 21:04 ` [PATCH 0/3] PWM backlight interpolation adjustments Alexandru M Stan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-PWM Archive on

Archives are clonable:
	git clone --mirror linux-pwm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pwm linux-pwm/ \
	public-inbox-index linux-pwm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone