summaryrefslogtreecommitdiff
path: root/tests/kms_plane_multiple.c
diff options
context:
space:
mode:
authorMika Kahola <mika.kahola@intel.com>2021-08-13 10:38:58 +0300
committerMika Kahola <mika.kahola@intel.com>2021-08-16 13:52:32 +0300
commitf474644e7226dd319195ca03b3cde82ad10ac54c (patch)
tree0a8d821f233c6bc21e0b7dcfe8de1b8314421ad5 /tests/kms_plane_multiple.c
parent3d8642170f2947b6aaad211e9e2e474fadedf6f9 (diff)
tests/kms_plane_multiple: Limit plane testing to 3 planes by default
To speed up test execution, let's limit planes to be tested to 3 by default. This reduces the test execution time especially in case of platforms that offer higher number of overlay planes. For example, the subtest atomic-pipe-A-tiling-x the execution times on ADL-P With 6 planes: Testing connector eDP-1 using pipe A with 6 planes for 1 iteration with seed 1 Subtest atomic-pipe-A-tiling-x: SUCCESS (2,168s) With 3 planes: Testing connector eDP-1 using pipe A with 3 planes for 1 iteration with seed 1 Subtest atomic-pipe-A-tiling-x: SUCCESS (1,878s) The downside of this is of course the reduced test coverage as all available planes are not tested by default simultaneusly. Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Karthik B S <karthik.b.s@intel.com>
Diffstat (limited to 'tests/kms_plane_multiple.c')
-rw-r--r--tests/kms_plane_multiple.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/kms_plane_multiple.c b/tests/kms_plane_multiple.c
index bfeb8c07..45cabb50 100644
--- a/tests/kms_plane_multiple.c
+++ b/tests/kms_plane_multiple.c
@@ -35,6 +35,7 @@ IGT_TEST_DESCRIPTION("Test atomic mode setting with multiple planes.");
#define SIZE_PLANE 256
#define SIZE_CURSOR 128
#define LOOP_FOREVER -1
+#define DEFAULT_N_PLANES 3
typedef struct {
float red;
@@ -56,8 +57,10 @@ struct {
int iterations;
unsigned int seed;
bool user_seed;
+ bool all_planes;
} opt = {
.iterations = 1,
+ .all_planes = false,
};
/*
@@ -361,7 +364,8 @@ static void
test_plane_position(data_t *data, enum pipe pipe, uint64_t tiling)
{
igt_output_t *output;
- int n_planes = data->display.pipes[pipe].n_planes;
+ int n_planes = opt.all_planes ?
+ data->display.pipes[pipe].n_planes : DEFAULT_N_PLANES;
output = igt_get_single_output_for_pipe(&data->display, pipe);
igt_require(output);
@@ -401,6 +405,9 @@ static data_t data;
static int opt_handler(int option, int option_index, void *input)
{
switch (option) {
+ case 'a':
+ opt.all_planes = true;
+ break;
case 'i':
opt.iterations = strtol(optarg, NULL, 0);
@@ -423,11 +430,13 @@ static int opt_handler(int option, int option_index, void *input)
const char *help_str =
" --iterations Number of iterations for test coverage. -1 loop forever, default 64 iterations\n"
- " --seed Seed for random number generator\n";
+ " --seed Seed for random number generator\n"
+ " --all-planes Test with all available planes";
struct option long_options[] = {
{ "iterations", required_argument, NULL, 'i'},
{ "seed", required_argument, NULL, 's'},
+ { "all-planes", no_argument, NULL, 'a'},
{ 0, 0, 0, 0 }
};