For some reason not (yet) fully understood, the LVDS panel output has a
significantly lower effective frefresh rate than the nominal (60 Hz) -
about half.
We need the 60 Hz refresh rate due to output latency requirements,
(and are normally using the RT patchset for the same reason.
The quad-core CPU is chosen also for latency reduction purposes,
and temperature requiremens further restrict the choice of Apalis variant
down to a single possibility).
In our analysis (which unfortunately has started from the wrong end,
i.e., application scheduling and RT tuning) we have eventually found
a way to reproduce the problem with a minimal test setup,
using only Toradex hardware and the latest reference software image.
We aim for 1280x800 at 60 Hz, but achieve only about half that number …
on LVDS, that is!
Using the HDMI connector and a monitor that natively supports 1280x800-60,
we actually can confirm that in the latter case the the nominal refresh
rate is achieved.
In other words, only the choice of display connector is the critical
factor.
We can’t find reason to believe this should be a limitation of the
hardware - according to the CPU reference manual the LVDS interface
should support up to 2 * 85 MP/sec or 1 * 170 MP/sec.
Our suspicion is therefore that the problem must be a misconfiguration
at the devicetree level, or a bug/limitation in the Linux graphics stack -
both of which initially looked rather unlikely, given the level of testing
these parts have received.
Hardware
- Apalis iMX6 Quad 2GB IT
- Ixora v1.3A
- Toradex’ LT170410 display panel
Software installation
An installation of
Apalis-iMX6_Reference-Multimedia-Image-upstream-Tezi_6.8.0+build.14.tar
.
Changes to U-Boot configuration
setenv fdt_board ixora-v1.2
setenv fdtfile imx6q-apalis-ixora-v1.2.dtb
Changes to Linux configuration
systemctl disable wayland-app-launch weston westion.socket
apalis-imx6_panel-cap-touch-10inch_overlay.dtbo
added to
/boot/overlays.txt
.
Connections/peripherals on Ixora
- 12 V DC supply on X2
- RS232-to-USB transceiver on X21 (UART2).
- LT170410 on X19 (nominally) or HDMI on X17 (test only)
- (Apalis board with original heatsink and fan)
- Nothing else
Findings
Nominal case - LVDS.
With apalis-imx6_panel-cap-touch-10inch_overlay.dtbo
in /boot/overlays.txt
and the LT170410 attached, results are as follows:
modetest -M imx-drm | grep -m 1 preferred
#0 1280x800 58.34 1280 1344 1384 1448 800 805 811 816 68930 flags: nhsync, nvsync; type: preferred, driver
vbltest -M imx-drm
starting count: ...
freq: 31.99Hz
freq: 31.92Hz
freq: 31.92Hz
freq: 31.92Hz
freq: 31.92Hz
freq: 31.92Hz
freq: 31.92Hz
...
The effective refresh rate is about ~ 55% of the nominal rate!
Comparison with HDMI.
With the original contents of /boot/overlays.txt
and a HDMI monitor
attached, results are as follows:
modetest -M imx-drm | grep -m 1 preferred
#0 1280x800 59.81 1280 1352 1480 1680 800 803 809 831 83500 flags: phsync, pvsync; type: preferred, driver
vbltest -M imx-drm
starting count: ...
freq: 60.05Hz
freq: 59.81Hz
freq: 59.81Hz
freq: 59.81Hz
freq: 59.81Hz
freq: 59.81Hz
freq: 59.81Hz
...
Here the effecive refresh rate and the monitor’s nominal timings match
perfectly.
Nominal case (b) - LVDS with changed panel timing
As can bee seen from the above modetest
output, the devicetree overlay
supplied by Toradex has a resulting nominal refresh rate of 58.34 Hz -
which is sub-optimal compared to the desired 60.0 Hz.
With the following patch to the devicetree overlay
> diff --git a/overlays/display-lt170410_overlay.dtsi b/overlays/display-lt170410_overlay.dtsi
> index b505109..4d14418 100644
> --- a/overlays/display-lt170410_overlay.dtsi
> +++ b/overlays/display-lt170410_overlay.dtsi
> @@ -16,12 +16,12 @@
> clock-frequency = <68930000>;
> hactive = <1280>;
> vactive = <800>;
> - hback-porch = <64>;
> - hfront-porch = <64>;
> + hback-porch = <45>;
> + hfront-porch = <45>;
> vback-porch = <5>;
> vfront-porch = <5>;
> hsync-len = <40>;
> - vsync-len = <6>;
> + vsync-len = <5>;
>
> hsync-active = <0>;
> vsync-active = <0>;
we achieve, using an unchanged pixel clock and minimum timings from the
display datasheet, a sufficient nominal refresh rate of 59.98 Hz
(slightly better even than the 59.81 Hz for the HDMI monitor used):
modetest -M imx-drm | grep -m 1 preferred
#0 1280x800 59.98 1280 1325 1365 1410 800 805 810 815 68930 flags: nhsync, nvsync; type: preferred, driver
This does not solve our problem though:
vbltest -M imx-drm
starting count: ...
freq: 33.21Hz
freq: 32.82Hz
freq: 32.82Hz
freq: 32.82Hz
freq: 32.82Hz
freq: 32.82Hz
freq: 32.82Hz
...
Interestingly, an increase in the nominal framerate of 1.64 Hz leads to
an increase in the effective framerate of 0.89 Hz … which is a factor
close to 55%, again.
Summary
- The (official) 10.1 inch LDVS panel seems to be running at only ~ 55%
of the nominal refresh rate. - The nominal refresh rate is 58.34 Hz, where 60 Hz would be a more
user-friendly default. - For 60 Hz 1280x800 HDMI output, the effective refresh rate matches
the nominal rate perfectly, indicating that the problem is purely
related to the LVDS output path.
Any assistance in pinpointing and fixing this issue will be highly,
appreciated, thanks!