On Fri, Aug 1, 2014 at 10:02 PM, Dmitry Eremin-Solenikov <[email protected]> wrote: > On Wed, Jul 23, 2014 at 12:09 PM, Dmitry Eremin-Solenikov > <[email protected]> wrote: >> From: Dmitry Eremin-Solenikov <[email protected]> >> >> Writing several values to PWMSAR register with PWM being disabled can >> lead to FIFO (connected to PWMSAR) being overflown. Then after enabling >> PWM, hardware will use stale values. Instead cache the duty cycles and >> write them to the hardware only before enabling PWM. > > What about this patch?
For the reference: the issue with the FIFO can be easily demonstrated on i.MX6 with the help of pwm-backlight. Steps to reproduce: 1) Disable backlight: echo 1 > /sys/class/..../bl_power 2) Change config several times: echo 1 > /sys/class/.../brightness echo 2 > /sys/class/.../brightness echo 3 > /sys/class/.../brightness echo 4 > /sys/class/.../brightness echo 7 > /sys/class/.../brightness 3) Reenable backlight and pwm: echo 0 > /sys/class/.../bl_power At this point you get PWMSAR = 0, because of FIFO overflow (can be verified by reading PWM status register). -- With best wishes Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
