[PATCH i-g-t] tests: Rename I915_MAX_PIPES to IGT_MAX_PIPES

Harry Wentland harry.wentland at amd.com
Fri Jun 9 22:14:52 UTC 2017


Reviewed-by: Harry Wentland <harry.wentland at amd.com>

Harry

On 2017-06-09 05:13 PM, sunpeng.li at amd.com wrote:
> From: "Leo (Sunpeng) Li" <sunpeng.li at amd.com>
> 
> Name should not be driver-specific.
> 
> Signed-off-by: Leo (Sunpeng) Li <sunpeng.li at 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);
>  	}
> 


More information about the amd-gfx mailing list