ntel-gpu-tools/tests/sysfs_edid_timing
Daniel Vetter 66b88b615c tests/sysfs_edit_reader: posixify
Debian's default sh complains ...

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-11-27 01:55:42 +01:00

21 lines
544 B
Bash
Executable File

#!/bin/sh
#
# This check the time we take to read the content of all the possible connectors.
# Without the edid -ENXIO patch (http://permalink.gmane.org/gmane.comp.video.dri.devel/62083),
# we sometimes take a *really* long time. So let's just check for some reasonable timing here
#
TIME1=$(date +%s%N)
cat $(find /sys/devices/|grep drm | grep /status) > /dev/null
TIME2=$(date +%s%N)
# time in ms
RES=$(((TIME2 - TIME1) / 1000000))
if [ $RES -gt 600 ]; then
echo "Talking to outputs took ${RES}ms, something is wrong"
exit 1
fi
exit 0