diff options
author | Leo (Sunpeng) Li <sunpeng.li@amd.com> | 2017-06-09 17:08:53 -0400 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2017-06-16 16:16:14 +0300 |
commit | 597cae9b7e36b8d1f95a1102fd4aab9c2e3b18fe (patch) | |
tree | 0c8d1904efbcecc7362a8ec507556a6cbea42427 /lib/igt_kms.c | |
parent | 8ead46cb63b0f94a4e878df623332e311ac172ac (diff) |
tests: Increase value of I915_MAX_PIPES to 6
Increasing max pipe count to 6 to support AMD GPU's.
Since some tests' behavior depends on this value, small changes are made
to remove this dependency:
* kms_ccs: Early abort if wanted_pipe is out-of-bounds.
* kms_concurrent: Check if pipe is within bounds first.
* kms_pipe_color: Prevent skipping of subsequent tests by placing
generated tests in a 'igt_subtest_group'.
* kms_plane: Move pipe and plane index checking to subtest group level.
v2: Change invalid pipe check on kmstest_pipe_name() to use
I915_MAX_PIPE
v3: Change tabs to spaces in 'enum pipe'
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Tested-by: Tomi Sarvela <tomi.p.sarvela@intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 0815c418..6c3a536c 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -319,12 +319,12 @@ const unsigned char* igt_kms_get_alt_edid(void) */ const char *kmstest_pipe_name(enum pipe pipe) { - const char *str[] = { "A", "B", "C" }; + const char *str[] = { "A", "B", "C", "D", "E", "F"}; if (pipe == PIPE_NONE) return "None"; - if (pipe > 2) + if (pipe >= I915_MAX_PIPES) return "invalid"; return str[pipe]; @@ -344,6 +344,12 @@ int kmstest_pipe_to_index(char pipe) return 1; else if (pipe == 'C') return 2; + else if (pipe == 'D') + return 3; + else if (pipe == 'E') + return 4; + else if (pipe == 'F') + return 5; else return -EINVAL; } |