User:Uli/Tests:HDMI-Loopback

From eLinux.org
Jump to: navigation, search

This describes how to use looptest (https://github.com/uli/looptest) to verify DRM driver output using a V4L input device and a loopback cable.

The script does a fuzzy compare of the captured frame with a reference frame, so it should work on analog signals, but it has only been tested with an HDMI signal on a Renesas R-Car H1 "Lager" board.

Requirements

The following tools must be installed on the system:

Running the tests

The script must be run like so:

python run_tests.py -M <module> -c <connector> -v <V4L device> [-r <resolution>-<frequency>[,...]]

The list of resolutions ("-r" option) can be omitted, in which case all supported resolutions for the given connector will be checked.

Example for the Lager board:

python run_tests.py -M rcar-du -c 49 -v /dev/video31 -r 1024x768-60,800x600-60,640x480-60

Sample output

The result of the given example, at the time of writing, looks like so:

Testing 1024x768-60
        setting mode 1024x768-60Hz@XR24 on connectors 49, crtc 43
        capturing frame
        converting frame
        comparing to reference: mae 1.31046e-05
        PASS
Testing 800x600-60
        setting mode 800x600-60Hz@XR24 on connectors 49, crtc 43
        capturing frame
        converting frame
        comparing to reference: mae 0.000818342
        PASS
Testing 640x480-60
        setting mode 640x480-60Hz@XR24 on connectors 49, crtc 43
        capturing frame
        converting frame
        comparing to reference: mae 0.351281
        FAIL
2 passed, 1 failed