summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo (Sunpeng) Li <sunpeng.li@amd.com>2017-06-09 17:13:04 -0400
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-06-16 16:16:57 +0300
commitdf682176524f034a1cecee457152f87e63f65113 (patch)
tree9f06555deb7032ad9997a8a2fcb28548cbb0c9f0
parent597cae9b7e36b8d1f95a1102fd4aab9c2e3b18fe (diff)
tests: Rename I915_MAX_PIPES to IGT_MAX_PIPES
Name should not be driver-specific. Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com> Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
-rw-r--r--lib/igt_kms.c2
-rw-r--r--lib/igt_kms.h5
-rw-r--r--tests/kms_atomic_transition.c12
-rw-r--r--tests/kms_busy.c4
-rw-r--r--tests/kms_ccs.c4
-rw-r--r--tests/kms_concurrent.c2
-rw-r--r--tests/kms_cursor_legacy.c4
-rw-r--r--tests/kms_pipe_color.c2
-rw-r--r--tests/kms_plane.c2
-rw-r--r--tests/kms_plane_lowres.c2
-rw-r--r--tests/kms_plane_multiple.c2
-rw-r--r--tests/kms_universal_plane.c2
12 files changed, 22 insertions, 21 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 6c3a536c..91d228cf 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -324,7 +324,7 @@ const char *kmstest_pipe_name(enum pipe pipe)
if (pipe == PIPE_NONE)
return "None";
- if (pipe >= I915_MAX_PIPES)
+ if (pipe >= IGT_MAX_PIPES)
return "invalid";
return str[pipe];
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index 8d33cdd1..35428f3e 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -46,7 +46,8 @@
* @PIPE_A: First crtc.
* @PIPE_B: Second crtc.
* @PIPE_C: Third crtc.
- * @I915_MAX_PIPES: Max number of pipes allowed.
+ * ... and so on.
+ * @IGT_MAX_PIPES: Max number of pipes allowed.
*/
enum pipe {
PIPE_NONE = -1,
@@ -57,7 +58,7 @@ enum pipe {
PIPE_D,
PIPE_E,
PIPE_F,
- I915_MAX_PIPES
+ IGT_MAX_PIPES
};
const char *kmstest_pipe_name(enum pipe pipe);
int kmstest_pipe_to_index(char pipe);
diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index 80592259..685396cc 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -634,7 +634,7 @@ static void collect_crcs_mask(igt_pipe_crc_t **pipe_crcs, unsigned mask, igt_crc
{
int i;
- for (i = 0; i < I915_MAX_PIPES; i++) {
+ for (i = 0; i < IGT_MAX_PIPES; i++) {
if (!((1 << i) & mask))
continue;
@@ -650,7 +650,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
struct igt_fb fbs[2];
int i, j;
unsigned iter_max = 1 << display->n_pipes;
- igt_pipe_crc_t *pipe_crcs[I915_MAX_PIPES] = { 0 };
+ igt_pipe_crc_t *pipe_crcs[IGT_MAX_PIPES] = { 0 };
igt_output_t *output;
unsigned width = 0, height = 0;
bool skip_test = false;
@@ -707,7 +707,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
igt_display_commit2(display, COMMIT_ATOMIC);
for (i = 0; i < iter_max; i++) {
- igt_crc_t crcs[5][I915_MAX_PIPES];
+ igt_crc_t crcs[5][IGT_MAX_PIPES];
unsigned event_mask;
if (hweight32(i) > howmany)
@@ -754,7 +754,7 @@ static void run_modeset_tests(igt_display_t *display, int howmany, bool nonblock
if (!is_i915_device(display->drm_fd))
continue;
- for (int k = 0; k < I915_MAX_PIPES; k++) {
+ for (int k = 0; k < IGT_MAX_PIPES; k++) {
if (i & (1 << k)) {
igt_assert_crc_equal(&crcs[0][k], &crcs[3][k]);
igt_assert_crc_equal(&crcs[0][k], &crcs[4][k]);
@@ -784,7 +784,7 @@ cleanup:
static void run_modeset_transition(igt_display_t *display, int requested_outputs, bool nonblocking, bool fencing)
{
- igt_output_t *outputs[I915_MAX_PIPES] = {};
+ igt_output_t *outputs[IGT_MAX_PIPES] = {};
int num_outputs = 0;
enum pipe pipe;
@@ -871,7 +871,7 @@ igt_main
for_each_pipe_with_valid_output(&display, pipe, output)
run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false, false);
- for (i = 1; i <= I915_MAX_PIPES; i++) {
+ for (i = 1; i <= IGT_MAX_PIPES; i++) {
igt_subtest_f("%ix-modeset-transitions", i)
run_modeset_transition(&display, i, false, false);
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index d6ef1f17..731ace47 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -284,7 +284,7 @@ static void test_hang(igt_display_t *dpy, unsigned ring,
igt_main
{
- igt_display_t display = { .drm_fd = -1, .n_pipes = I915_MAX_PIPES };
+ igt_display_t display = { .drm_fd = -1, .n_pipes = IGT_MAX_PIPES };
const struct intel_execution_engine *e;
igt_skip_on_simulation();
@@ -302,7 +302,7 @@ igt_main
/* XXX Extend to cover atomic rendering tests to all planes + legacy */
- for (int n = 0; n < I915_MAX_PIPES; n++) {
+ for (int n = 0; n < IGT_MAX_PIPES; n++) {
errno = 0;
igt_fixture {
diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 0795e3af..29d676af 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -295,13 +295,13 @@ igt_main
test(&data);
}
- for (data.pipe = PIPE_A; data.pipe < I915_MAX_PIPES; data.pipe++) {
+ for (data.pipe = PIPE_A; data.pipe < IGT_MAX_PIPES; data.pipe++) {
data.flags = TEST_CRC;
igt_subtest_f("pipe-%s-crc-basic", kmstest_pipe_name(data.pipe))
test(&data);
}
- for (data.pipe = PIPE_A; data.pipe < I915_MAX_PIPES; data.pipe++) {
+ for (data.pipe = PIPE_A; data.pipe < IGT_MAX_PIPES; data.pipe++) {
data.flags = TEST_CRC | TEST_ROTATE_180;
igt_subtest_f("pipe-%s-crc-rotation-180", kmstest_pipe_name(data.pipe))
test(&data);
diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index db06a374..e2cde4ee 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -415,7 +415,7 @@ int main(int argc, char *argv[])
igt_require(data.display.is_atomic);
}
- for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++) {
+ for (int pipe = 0; pipe < IGT_MAX_PIPES; pipe++) {
igt_subtest_group
run_tests_for_pipe(&data, pipe);
}
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index ac05ca53..8180b043 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -54,7 +54,7 @@ static void stress(igt_display_t *display,
uint64_t *results;
bool torture;
int n;
- unsigned crtc_id[I915_MAX_PIPES], num_crtcs;
+ unsigned crtc_id[IGT_MAX_PIPES], num_crtcs;
torture = false;
if (num_children < 0) {
@@ -1425,7 +1425,7 @@ igt_main
}
igt_subtest_group {
- for (int n = 0; n < I915_MAX_PIPES; n++) {
+ for (int n = 0; n < IGT_MAX_PIPES; n++) {
errno = 0;
igt_fixture {
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index da49eb17..a3100fae 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -1179,7 +1179,7 @@ igt_main
igt_display_init(&data.display, data.drm_fd);
}
- for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++)
+ for (int pipe = 0; pipe < IGT_MAX_PIPES; pipe++)
igt_subtest_group
run_tests_for_pipe(&data, pipe);
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 34418cad..1d92a62b 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -436,7 +436,7 @@ igt_main
igt_display_init(&data.display, data.drm_fd);
}
- for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++)
+ for (int pipe = 0; pipe < IGT_MAX_PIPES; pipe++)
run_tests_for_pipe_plane(&data, pipe);
igt_fixture {
diff --git a/tests/kms_plane_lowres.c b/tests/kms_plane_lowres.c
index 6f159601..ee39759c 100644
--- a/tests/kms_plane_lowres.c
+++ b/tests/kms_plane_lowres.c
@@ -350,7 +350,7 @@ igt_main
igt_display_init(&data.display, data.drm_fd);
}
- for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++)
+ for (int pipe = 0; pipe < IGT_MAX_PIPES; pipe++)
run_tests_for_pipe(&data, pipe);
igt_fixture {
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index 93dce6b0..f6c62235 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -513,7 +513,7 @@ int main(int argc, char *argv[])
igt_require(data.display.n_pipes > 0);
}
- for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++) {
+ for (int pipe = 0; pipe < IGT_MAX_PIPES; pipe++) {
igt_subtest_group
run_tests_for_pipe(&data, pipe);
}
diff --git a/tests/kms_universal_plane.c b/tests/kms_universal_plane.c
index 5459a9a3..31f07804 100644
--- a/tests/kms_universal_plane.c
+++ b/tests/kms_universal_plane.c
@@ -799,7 +799,7 @@ igt_main
igt_display_init(&data.display, data.drm_fd);
}
- for (int pipe = 0; pipe < I915_MAX_PIPES; pipe++) {
+ for (int pipe = 0; pipe < IGT_MAX_PIPES; pipe++) {
igt_subtest_group
run_tests_for_pipe(&data, pipe);
}