From: <sunpeng.li-5C7GfCeVMHo@public.gmane.org>
To: intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
harry.wentland-5C7GfCeVMHo@public.gmane.org
Cc: "Leo (Sunpeng) Li" <sunpeng.li-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH i-g-t] tests: Rename I915_MAX_PIPES to IGT_MAX_PIPES
Date: Fri, 9 Jun 2017 17:13:04 -0400 [thread overview]
Message-ID: <1497042784-22210-1-git-send-email-sunpeng.li@amd.com> (raw)
From: "Leo (Sunpeng) Li" <sunpeng.li@amd.com>
Name should not be driver-specific.
Signed-off-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
---
lib/igt_kms.c | 2 +-
lib/igt_kms.h | 5 +++--
tests/kms_atomic_transition.c | 12 ++++++------
tests/kms_busy.c | 4 ++--
tests/kms_ccs.c | 4 ++--
tests/kms_concurrent.c | 2 +-
tests/kms_cursor_legacy.c | 4 ++--
tests/kms_pipe_color.c | 2 +-
tests/kms_plane.c | 2 +-
tests/kms_plane_lowres.c | 2 +-
tests/kms_plane_multiple.c | 2 +-
tests/kms_universal_plane.c | 2 +-
12 files changed, 22 insertions(+), 21 deletions(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 473094d..a7364b6 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 30bb6ff..f419562 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 8059225..685396c 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 d6ef1f1..731ace4 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 0795e3a..29d676a 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 db06a37..e2cde4e 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 ac05ca5..8180b04 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 da49eb1..a3100fa 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 34418ca..1d92a62 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 6f15960..ee39759 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 93dce6b..f6c6223 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 5459a9a..31f0780 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);
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2017-06-09 21:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 21:13 sunpeng.li-5C7GfCeVMHo [this message]
[not found] ` <1497042784-22210-1-git-send-email-sunpeng.li-5C7GfCeVMHo@public.gmane.org>
2017-06-09 22:14 ` [PATCH i-g-t] tests: Rename I915_MAX_PIPES to IGT_MAX_PIPES Harry Wentland
[not found] ` <06254a1a-31ba-1372-a17b-280ae7fc1e21-5C7GfCeVMHo@public.gmane.org>
2017-06-12 11:54 ` [Intel-gfx] " Arkadiusz Hiler
2017-06-12 13:39 ` Harry Wentland
2017-06-13 7:35 ` Jani Nikula
[not found] ` <87vao0ibll.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-06-13 12:41 ` [Intel-gfx] " Arkadiusz Hiler
2017-06-13 12:55 ` Arkadiusz Hiler
[not found] ` <20170613125531.GA18562-vmkuTAUGE3v8HXaCWoL7+7KMmGWinSIL2HeeBUIffwg@public.gmane.org>
2017-06-15 14:11 ` [Intel-gfx] " Leo
2017-06-16 10:56 ` Arkadiusz Hiler
[not found] ` <20170616105624.GE18562-vmkuTAUGE3v8HXaCWoL7+7KMmGWinSIL2HeeBUIffwg@public.gmane.org>
2017-06-16 13:10 ` [Intel-gfx] " Arkadiusz Hiler
[not found] ` <20170616131026.GG18562-vmkuTAUGE3v8HXaCWoL7+7KMmGWinSIL2HeeBUIffwg@public.gmane.org>
2017-06-16 13:25 ` Harry Wentland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1497042784-22210-1-git-send-email-sunpeng.li@amd.com \
--to=sunpeng.li-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=harry.wentland-5C7GfCeVMHo@public.gmane.org \
--cc=intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox