7 if [ -d /debug/dri ] ; then
8 debugfs_path=/debug/dri
11 if [ -d /sys/kernel/debug/dri ] ; then
12 debugfs_path=/sys/kernel/debug/dri
16 for dir in `ls $debugfs_path` ; do
17 if [ -f $debugfs_path/$dir/i915_error_state ] ; then
18 i915_dfs_path=$debugfs_path/$dir
23 if [ $i915_dfs_path = "x" ] ; then
24 die " i915 debugfs path not found."
27 # read everything we can
28 if [ `cat $i915_dfs_path/clients | wc -l` -gt "2" ] ; then
29 die "ERROR: other drm clients running"
32 if [ -d /sys/class/drm ] ; then
33 sysfs_path=/sys/class/drm
37 for dir in `ls $sysfs_path` ; do
38 if [ -f $sysfs_path/$dir/error_state ] ; then
39 i915_sfs_path=$sysfs_path/$dir
44 if [ $i915_sfs_path = "x" ] ; then
45 die " i915 sysfs path not found."