Re: [PATCH 1/2] backlight: pwm_bl: configure pwm only once per backlight toggle
From: Daniel Thompson <hidden>
Date: 2023-01-10 16:17:23
Also in:
dri-devel, linux-pwm
From: Daniel Thompson <hidden>
Date: 2023-01-10 16:17:23
Also in:
dri-devel, linux-pwm
On Mon, Jan 09, 2023 at 09:47:57PM +0100, Uwe Kleine-König wrote:
When the function pwm_backlight_update_status() was called with brightness > 0, pwm_get_state() was called twice (once directly and once in compute_duty_cycle). Also pwm_apply_state() was called twice (once in pwm_backlight_power_on() and once directly). Optimize this to do both calls only once. Signed-off-by: Uwe Kleine-König <redacted>
This will reverse the order in which the regulator is toggled versus the PWM starting/stopping. It would be nice to that in the description. However I can't see why it would be a problem (since both remain in the same place relative to the sleeps) so: Reviewed-by: Daniel Thompson <redacted> Daniel.