lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1509022186-19636-3-git-send-email-LW@KARO-electronics.de>
Date:   Thu, 26 Oct 2017 14:49:45 +0200
From:   Lothar Waßmann <LW@...O-electronics.de>
To:     Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Daniel Thompson <daniel.thompson@...aro.org>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Jingoo Han <jingoohan1@...il.com>,
        Lee Jones <lee.jones@...aro.org>,
        Mark Rutland <mark.rutland@....com>,
        Pavel Machek <pavel@....cz>,
        Richard Purdie <rpurdie@...ys.net>,
        Rob Herring <robh+dt@...nel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        devicetree@...r.kernel.org, linux-fbdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-leds@...r.kernel.org,
        linux-pwm@...r.kernel.org
Cc:     Lothar Waßmann <LW@...O-electronics.de>
Subject: [PATCH 1/2] backlight: pwm_bl: Enable PWM before switching regulator on

When the PWM is re-enabled after being switched off, the backlight may
flicker due to the backlight power being switched on while the PWM is
still unconfigured. This is especially true if the PWM output is
active low (assuming that the PWM output is low when the PWM is not
enabled).
Configure the PWM before switching backlight power on to prevent this.

Signed-off-by: Lothar Waßmann <LW@...O-electronics.de>
---
 drivers/video/backlight/pwm_bl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 002f1ce..921f322 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -50,6 +50,8 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness)
 	if (pb->enabled)
 		return;
 
+	pwm_enable(pb->pwm);
+
 	err = regulator_enable(pb->power_supply);
 	if (err < 0)
 		dev_err(pb->dev, "failed to enable power supply\n");
@@ -57,7 +59,6 @@ static void pwm_backlight_power_on(struct pwm_bl_data *pb, int brightness)
 	if (pb->enable_gpio)
 		gpiod_set_value_cansleep(pb->enable_gpio, 1);
 
-	pwm_enable(pb->pwm);
 	pb->enabled = true;
 }
 
-- 
2.1.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ