Just FYI, a known issue (http://projects.goldelico.com/p/gta04-kernel/issues/689/):
there seems to be something wrong with the dmtimer pwm backlight driver.
If we have brightness 10 (100%) the display panel backlight is approx. half the intensity of setting the pin to gpio and "1".
This means max. backlight brightness does not permanently turn on the pwm output.
I see the same effect on OMAP3 GTA04.
BR, Nikolaus
New script to test backlight on Pyra in pwm or gpio mode:
To notice the difference, type: /root/bl 1 /root/bl -g 1
# # /root/bl: turn on/off backlight power # -g: use gpio mode # 1: turn on # 0: turn off # # intensity can be controlled in non-gpio mode through # /sys/class/backlight/backlight/brightness #
BL=/sys/class/backlight/backlight/bl_power # just turn completely on/off instead of writing backlight intensity ON=0 OFF=1
case $(cat /proc/device-tree/model) in Pyra-Handheld* ) [ "$(which devmem2)" ] || apt-get install -y --force-yes devmem2 if [ "$1" = -g ] then shift devmem2 0x4a0028f6 h 0x011e >/dev/null # switch to gpio mode echo 190 > /sys/class/gpio/export 2>/dev/null echo out > /sys/class/gpio/gpio190/direction BL=/sys/class/gpio/gpio190/value ON=1 OFF=0 else if [ -r /sys/class/gpio/gpio190 ] then echo in > /sys/class/gpio/gpio190/direction echo 190 > /sys/class/gpio/unexport 2>/dev/null fi devmem2 0x4a0028f6 h 0x0118 >/dev/null # switch to timer9_pwm mode fi ;; esac
if [ "$1" = 1 ] then echo $ON >$BL else echo $OFF >$BL fi
Am 11.05.2016 um 17:21 schrieb H. Nikolaus Schaller hns@goldelico.com:
Just FYI, a known issue (http://projects.goldelico.com/p/gta04-kernel/issues/689/):
there seems to be something wrong with the dmtimer pwm backlight driver.
If we have brightness 10 (100%) the display panel backlight is approx. half the intensity of setting the pin to gpio and "1".
This means max. backlight brightness does not permanently turn on the pwm output.
I see the same effect on OMAP3 GTA04.
BR, Nikolaus
New script to test backlight on Pyra in pwm or gpio mode:
To notice the difference, type: /root/bl 1 /root/bl -g 1
# # /root/bl: turn on/off backlight power # -g: use gpio mode # 1: turn on # 0: turn off # # intensity can be controlled in non-gpio mode through # /sys/class/backlight/backlight/brightness #
BL=/sys/class/backlight/backlight/bl_power # just turn completely on/off instead of writing backlight intensity ON=0 OFF=1
case $(cat /proc/device-tree/model) in Pyra-Handheld* ) [ "$(which devmem2)" ] || apt-get install -y --force-yes devmem2 if [ "$1" = -g ] then shift devmem2 0x4a0028f6 h 0x011e >/dev/null # switch to gpio mode echo 190 > /sys/class/gpio/export 2>/dev/null echo out > /sys/class/gpio/gpio190/direction BL=/sys/class/gpio/gpio190/value ON=1 OFF=0 else if [ -r /sys/class/gpio/gpio190 ] then echo in > /sys/class/gpio/gpio190/direction echo 190 > /sys/class/gpio/unexport 2>/dev/null fi devmem2 0x4a0028f6 h 0x0118 >/dev/null # switch to timer9_pwm mode fi ;; esac
if [ "$1" = 1 ] then echo $ON >$BL else echo $OFF >$BL fi
I did connect the oscilloscope today.
Here the PWM output with max backlight intensity:
With gpio = 1 it is a steady line.
Now the problem. Here is the current going through the LEDs:
So this means that the backlight converter needs approx. 1,5 ms startup time until it drives the full current through the LEDs.
What is the problem: we run the PWM @ 500 Hz which is just 2 ms. So we get an average current of less than 50%.
Solutions: a) change our .dts to use e.g. 100 Hz backlight (we shouldn't go below or it might be possible to see stroboscope effects with panel refresh) b) fix pwm driver so that max_brightness is a steady "1" output
BR, Nikolaus
Am Thu, 12 May 2016 11:08:58 +0200 hat "H. Nikolaus Schaller" hns@goldelico.com geschrieben:
Ah, that explains the flickering I can see on the LCD (which I mentioned to you in an email a week ago).
Am 11.05.2016 um 17:21 schrieb H. Nikolaus Schaller hns@goldelico.com:
Just FYI, a known issue (http://projects.goldelico.com/p/gta04-kernel/issues/689/):
there seems to be something wrong with the dmtimer pwm backlight driver.
If we have brightness 10 (100%) the display panel backlight is approx. half the intensity of setting the pin to gpio and "1".
This means max. backlight brightness does not permanently turn on the pwm output.
I see the same effect on OMAP3 GTA04.
BR, Nikolaus
New script to test backlight on Pyra in pwm or gpio mode:
To notice the difference, type: /root/bl 1 /root/bl -g 1
# # /root/bl: turn on/off backlight power # -g: use gpio mode # 1: turn on # 0: turn off # # intensity can be controlled in non-gpio mode through # /sys/class/backlight/backlight/brightness #
BL=/sys/class/backlight/backlight/bl_power # just turn completely on/off instead of writing backlight intensity ON=0 OFF=1
case $(cat /proc/device-tree/model) in Pyra-Handheld* ) [ "$(which devmem2)" ] || apt-get install -y --force-yes devmem2 if [ "$1" = -g ] then shift devmem2 0x4a0028f6 h 0x011e
/dev/null # switch to gpio mode echo 190
/sys/class/gpio/export 2>/dev/null
echo out > /sys/class/gpio/gpio190/direction BL=/sys/class/gpio/gpio190/value ON=1 OFF=0 else if [ -r /sys/class/gpio/gpio190 ] then echo in
/sys/class/gpio/gpio190/direction echo 190
/sys/class/gpio/unexport 2>/dev/null
fi devmem2 0x4a0028f6 h 0x0118
/dev/null # switch to timer9_pwm mode fi
;;
esac
if [ "$1" = 1 ] then echo $ON >$BL else echo $OFF >$BL fi
I did connect the oscilloscope today.
Here the PWM output with max backlight intensity:
With gpio = 1 it is a steady line.
Now the problem. Here is the current going through the LEDs:
So this means that the backlight converter needs approx. 1,5 ms startup time until it drives the full current through the LEDs.
What is the problem: we run the PWM @ 500 Hz which is just 2 ms. So we get an average current of less than 50%.
Solutions: a) change our .dts to use e.g. 100 Hz backlight (we shouldn't go below or it might be possible to see stroboscope effects with panel refresh) b) fix pwm driver so that max_brightness is a steady "1" output
BR, Nikolaus