Skip to content
Snippets Groups Projects
Commit a0e2b99e authored by Maíra Canal's avatar Maíra Canal Committed by Rodrigo Siqueira
Browse files

tests/amdgpu: Skip multihead MPO tests on single display


[Why]
If only one output is connected, all the igt@amdgpu/amd_plane "-multihead"
subtests will result in CRASH, such as can be seen in:

Starting subtest: mpo-scale-nv12-multihead
Received signal SIGSEGV.
Stack trace:
 #0 [fatal_sig_handler+0x163]
 #1 [__sigaction+0x50]
 #2 [force_output_mode+0xa]
 #3 [test_display_mpo+0x20b]
 #4 [__igt_unique____real_main725+0x106d]
 #5 [main+0x23]
 #6 [__libc_start_call_main+0x80]
 #7 [__libc_start_main+0x89]
 #8 [_start+0x25]
Subtest mpo-scale-nv12-multihead: CRASH (0.009s)

In single-display systems, the "-multihead" subtests should SKIP.

[How]
Count the number of connected outputs on the system and compare it to the
ideal number depending on the subtest, using igt_skip_on to assure that
multiheaded subtests will SKIP on single display systems.

Signed-off-by: Maíra Canal's avatarMaíra Canal <mairacanal@riseup.net>
Reviewed-by: default avatarAlex Hung <alex.hung@amd.com>
parent 326629f1
No related branches found
No related tags found
No related merge requests found
Pipeline #645283 passed
......@@ -449,9 +449,11 @@ static void test_display_mpo(data_t *data, enum test test, uint32_t format, int
{
igt_display_t *display = &data->display;
igt_output_t *output;
uint32_t regamma_lut_size;
lut_t lut;
struct fbc fb[4];
int valid_outputs = 0;
int videos[][2]= {
{426, 240},
{640, 360},
......@@ -464,6 +466,13 @@ static void test_display_mpo(data_t *data, enum test test, uint32_t format, int
test_init(data);
/* Skip if there is less valid outputs than the required. */
for_each_connected_output(display, output)
valid_outputs++;
igt_skip_on_f(valid_outputs < display_count,
"Valid outputs (%d) should be equal or greater than %d\n", valid_outputs, display_count);
regamma_lut_size = igt_pipe_obj_get_prop(data->pipe[0], IGT_CRTC_GAMMA_LUT_SIZE);
igt_assert_lt(0, regamma_lut_size);
lut_init(&lut, regamma_lut_size);
......@@ -586,9 +595,17 @@ static void test_mpo_swizzle_toggle_multihead(data_t *data)
{
struct amdgpu_bo_metadata meta = {};
igt_display_t *display = &data->display;
igt_output_t *output;
igt_fb_t fb_1280_xr24_tiled, fb_1280_ar24_tiled, fb_1920_xb24_tiled,
fb_1920_xb24_linear, fb_1920_xr24_tiled;
int w, h;
int valid_outputs = 0;
/* Skip if only one display is connected. */
for_each_connected_output(display, output)
valid_outputs++;
igt_skip_on_f(valid_outputs == 1, "Must have more than one output connected\n");
w = 2400;
h = 1350;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment