summaryrefslogtreecommitdiff
path: root/tests/sysfs_edid_timing
blob: 2a43cca445e00d7d63d1a6be5c8acc5af29235d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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
#

[ -n "$INTEL_SIMULATION" ] && exit 77

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