Add graphics_Idle test
This adds a new graphics_Idle test which checks different things when the
GPU is idle:
- panel downclock is in use
- short blanking is enabled
- rc6 is in use
- dvfs goes to the lowest clock
- fbc works
- all gem objects are idle
BUG=chromium:361897, chromium:363747
TEST=run the test on lumpy, daisy, glimmer, rambi, falco
Change-Id: I93e860c6f2ed2adc2905a82e4885cd99bfdff112
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/197167
Reviewed-by: Ilja Friedel <ihf@chromium.org>
Tested-by: Ilja Friedel <ihf@chromium.org>
diff --git a/client/bin/site_utils.py b/client/bin/site_utils.py
index feb35fd..20a4918 100644
--- a/client/bin/site_utils.py
+++ b/client/bin/site_utils.py
@@ -7,6 +7,7 @@
import logging, os, platform, re, signal, tempfile, time, uuid
from autotest_lib.client.common_lib import error
from autotest_lib.client.common_lib import utils
+from autotest_lib.client.bin import base_utils
class TimeoutError(error.TestError):
"""Error raised when we time out when waiting on a condition."""
@@ -800,3 +801,30 @@
for (path, value) in path_value_list:
cmd = 'sudo echo %s > %s' % (value, path)
utils.system(cmd)
+
+
+def get_gpu_family():
+ """Return the GPU family name"""
+ cpuarch = base_utils.get_cpu_soc_family()
+ if cpuarch == 'exynos5':
+ return 'mali'
+ if cpuarch == 'tegra':
+ return 'tegra'
+
+ pci_path = '/sys/bus/pci/devices/0000:00:02.0/device'
+
+ if not os.path.exists(pci_path):
+ raise error.TestError('PCI device 0000:00:02.0 not found')
+
+ device_id = int(utils.read_one_line(pci_path), 16)
+ intel_architecture = {
+ 0xa011: 'pinetrail',
+ 0x0106: 'sandybridge',
+ 0x0126: 'sandybridge',
+ 0x0156: 'ivybridge',
+ 0x0166: 'ivybridge',
+ 0x0a06: 'haswell',
+ 0x0f31: 'baytrail',
+ }
+
+ return intel_architecture[device_id]