dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: pgeiem <pgeiem@protonmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [led-backlight] default-brightness-level issue
Date: Thu, 29 Apr 2021 12:00:16 +0100	[thread overview]
Message-ID: <20210429110016.76huj54zijvhtuan@maple.lan> (raw)
In-Reply-To: <e_WDxLKZ_lxATxDaTMkr5jVLhIs2O0NQOSd-Inff7IMEU7i1QyX_BTldVJZgP_Yb-lgzTmpPxni_1YCQmhyGmi_ahjHbG5aCNtUngw35g0M=@protonmail.com>

On Fri, Apr 23, 2021 at 01:04:23PM +0000, pgeiem wrote:
> Dear all,
> 
> On a custom board I have a simple DPI panel. Panel's backlight is
> drive with an I2C led driver (PCA9632). led-backlight driver is sued
> to manage this as a backlight.
> 
> When using brightness-levels and default-brightness-level the
> backlight stay turned-off even if manually trying to set a different
> index value to brightness through sysfs.
> 
> I traced this issue as follow: When led_bl_update_status() is called
> the brightness value is returned from backlight_get_brightness() which
> call backlight_is_blank(). In my case backlight_is_blank() return true
> due to props.power = FB_BLANK_POWERDOWN which is != FB_BLANK_UNBLANK.
> 
> I traced why at startup props.power is FB_BLANK_POWERDOWN and found
> that in led_bl_probe() when a default brightness is set (>0)
> props.power is set to FB_BLANK_POWERDOWN which seems incorrect to me.
> 
> I made the small change below and default brightness is correctly used
> at startup.  I am not really sure this is an issue and if my change is
> correct or if I am doing something incorrect somewhere else. So I
> first would like to get your opinion on this and if correct will send
> a patch.

Makes sense. Please send this as a patch.


Daniel.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-04-29 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 13:04 [led-backlight] default-brightness-level issue pgeiem
2021-04-29 11:00 ` Daniel Thompson [this message]
2021-04-29 11:31   ` pgeiem
2021-04-29 12:07     ` Daniel Thompson
2021-05-04  7:10       ` pgeiem

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20210429110016.76huj54zijvhtuan@maple.lan \
    --to=daniel.thompson@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=pgeiem@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).