mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-11 16:32:58 +00:00
lib/igt_kms: Unify pipe name helpers
And add api doc while at it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
@@ -311,14 +311,16 @@ static void run_test(data_t *data, void (*testfunc)(data_t *), int cursor_w, int
|
||||
|
||||
valid_tests++;
|
||||
|
||||
igt_info("Beginning %s on pipe %c, connector %s\n",
|
||||
igt_subtest_name(), pipe_name(data->pipe),
|
||||
igt_info("Beginning %s on pipe %s, connector %s\n",
|
||||
igt_subtest_name(),
|
||||
kmstest_pipe_name(data->pipe),
|
||||
igt_output_name(output));
|
||||
|
||||
testfunc(data);
|
||||
|
||||
igt_info("\n%s on pipe %c, connector %s: PASSED\n\n",
|
||||
igt_subtest_name(), pipe_name(data->pipe),
|
||||
igt_info("\n%s on pipe %s, connector %s: PASSED\n\n",
|
||||
igt_subtest_name(),
|
||||
kmstest_pipe_name(data->pipe),
|
||||
igt_output_name(output));
|
||||
|
||||
/* cleanup what prepare_crtc() has done */
|
||||
|
||||
+9
-6
@@ -458,13 +458,15 @@ static void run_test(data_t *data, enum test_mode mode)
|
||||
if (!prepare_crtc(data))
|
||||
continue;
|
||||
|
||||
igt_info("Beginning %s on pipe %c, connector %s\n",
|
||||
igt_subtest_name(), pipe_name(data->pipe),
|
||||
igt_info("Beginning %s on pipe %s, connector %s\n",
|
||||
igt_subtest_name(),
|
||||
kmstest_pipe_name(data->pipe),
|
||||
igt_output_name(data->output));
|
||||
|
||||
if (!prepare_test(data, mode)) {
|
||||
igt_info("%s on pipe %c, connector %s: SKIPPED\n",
|
||||
igt_subtest_name(), pipe_name(data->pipe),
|
||||
igt_info("%s on pipe %s, connector %s: SKIPPED\n",
|
||||
igt_subtest_name(),
|
||||
kmstest_pipe_name(data->pipe),
|
||||
igt_output_name(data->output));
|
||||
continue;
|
||||
}
|
||||
@@ -473,8 +475,9 @@ static void run_test(data_t *data, enum test_mode mode)
|
||||
|
||||
test_crc(data, mode);
|
||||
|
||||
igt_info("%s on pipe %c, connector %s: PASSED\n",
|
||||
igt_subtest_name(), pipe_name(data->pipe),
|
||||
igt_info("%s on pipe %s, connector %s: PASSED\n",
|
||||
igt_subtest_name(),
|
||||
kmstest_pipe_name(data->pipe),
|
||||
igt_output_name(data->output));
|
||||
|
||||
finish_crtc(data, mode);
|
||||
|
||||
@@ -212,9 +212,9 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
|
||||
|
||||
for_each_connected_output(display, output) {
|
||||
|
||||
igt_info("%s: Testing connector %s using pipe %c\n",
|
||||
igt_info("%s: Testing connector %s using pipe %s\n",
|
||||
igt_subtest_name(), igt_output_name(output),
|
||||
pipe_name(pipe));
|
||||
kmstest_pipe_name(pipe));
|
||||
|
||||
valid_connectors += test_read_crc_for_output(data, pipe, output, flags);
|
||||
}
|
||||
|
||||
+12
-11
@@ -159,8 +159,8 @@ test_plane_position_with_output(data_t *data,
|
||||
drmModeModeInfo *mode;
|
||||
igt_crc_t crc;
|
||||
|
||||
igt_info("Testing connector %s using pipe %c plane %d\n",
|
||||
igt_output_name(output), pipe_name(pipe), plane);
|
||||
igt_info("Testing connector %s using pipe %s plane %d\n",
|
||||
igt_output_name(output), kmstest_pipe_name(pipe), plane);
|
||||
|
||||
test_init(data, pipe);
|
||||
|
||||
@@ -284,7 +284,8 @@ test_plane_panning_with_output(data_t *data,
|
||||
drmModeModeInfo *mode;
|
||||
igt_crc_t crc;
|
||||
|
||||
igt_info("Testing connector %s using pipe %c plane %d\n", igt_output_name(output), pipe_name(pipe), plane);
|
||||
igt_info("Testing connector %s using pipe %s plane %d\n",
|
||||
igt_output_name(output), kmstest_pipe_name(pipe), plane);
|
||||
|
||||
test_init(data, pipe);
|
||||
|
||||
@@ -341,21 +342,21 @@ test_plane_panning(data_t *data, enum pipe pipe, enum igt_plane plane,
|
||||
static void
|
||||
run_tests_for_pipe_plane(data_t *data, enum pipe pipe, enum igt_plane plane)
|
||||
{
|
||||
igt_subtest_f("plane-position-covered-pipe-%c-plane-%d",
|
||||
pipe_name(pipe), plane)
|
||||
igt_subtest_f("plane-position-covered-pipe-%s-plane-%d",
|
||||
kmstest_pipe_name(pipe), plane)
|
||||
test_plane_position(data, pipe, plane,
|
||||
TEST_POSITION_FULLY_COVERED);
|
||||
|
||||
igt_subtest_f("plane-position-hole-pipe-%c-plane-%d",
|
||||
pipe_name(pipe), plane)
|
||||
igt_subtest_f("plane-position-hole-pipe-%s-plane-%d",
|
||||
kmstest_pipe_name(pipe), plane)
|
||||
test_plane_position(data, pipe, plane, 0);
|
||||
|
||||
igt_subtest_f("plane-panning-top-left-pipe-%c-plane-%d",
|
||||
pipe_name(pipe), plane)
|
||||
igt_subtest_f("plane-panning-top-left-pipe-%s-plane-%d",
|
||||
kmstest_pipe_name(pipe), plane)
|
||||
test_plane_panning(data, pipe, plane, TEST_PANNING_TOP_LEFT);
|
||||
|
||||
igt_subtest_f("plane-panning-bottom-right-pipe-%c-plane-%d",
|
||||
pipe_name(pipe), plane)
|
||||
igt_subtest_f("plane-panning-bottom-right-pipe-%s-plane-%d",
|
||||
kmstest_pipe_name(pipe), plane)
|
||||
test_plane_panning(data, pipe, plane,
|
||||
TEST_PANNING_BOTTOM_RIGHT);
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ connector_set_mode(data_t *data, drmModeModeInfo *mode, uint32_t fb_id)
|
||||
int ret;
|
||||
|
||||
#if 0
|
||||
fprintf(stdout, "Using pipe %c, %dx%d\n", pipe_name(config->pipe),
|
||||
fprintf(stdout, "Using pipe %s, %dx%d\n", kmstest_pipe_name(config->pipe),
|
||||
mode->hdisplay, mode->vdisplay);
|
||||
#endif
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ static int test_format(const char *test_name,
|
||||
mode->name, mode->vrefresh, igt_format_str(format));
|
||||
igt_assert(ret > 0);
|
||||
ret = asprintf(&cconf_str, "pipe %s, encoder %s, connector %s",
|
||||
kmstest_pipe_str(cconf->pipe),
|
||||
kmstest_pipe_name(cconf->pipe),
|
||||
kmstest_encoder_type_str(cconf->encoder->encoder_type),
|
||||
kmstest_connector_type_str(cconf->connector->connector_type));
|
||||
igt_assert(ret > 0);
|
||||
|
||||
+1
-1
@@ -246,7 +246,7 @@ static void get_crtc_config_str(struct crtc_config *crtc, char *buf,
|
||||
|
||||
pos = snprintf(buf, buf_size,
|
||||
"CRTC[%d] [Pipe %s] Mode: %s@%dHz Connectors: ",
|
||||
crtc->crtc_id, kmstest_pipe_str(crtc->pipe_id),
|
||||
crtc->crtc_id, kmstest_pipe_name(crtc->pipe_id),
|
||||
crtc->mode.name, crtc->mode.vrefresh);
|
||||
if (pos > buf_size)
|
||||
return;
|
||||
|
||||
@@ -135,7 +135,8 @@ functional_test_pipe(data_t *data, enum pipe pipe, igt_output_t *output)
|
||||
igt_assert(data->display.has_universal_planes);
|
||||
igt_skip_on(pipe >= display->n_pipes);
|
||||
|
||||
igt_info("Testing connector %s using pipe %c\n", igt_output_name(output), pipe_name(pipe));
|
||||
igt_info("Testing connector %s using pipe %s\n", igt_output_name(output),
|
||||
kmstest_pipe_name(pipe));
|
||||
|
||||
functional_test_init(&test, output, pipe);
|
||||
|
||||
@@ -534,15 +535,18 @@ run_tests_for_pipe(data_t *data, enum pipe pipe)
|
||||
{
|
||||
igt_output_t *output;
|
||||
|
||||
igt_subtest_f("universal-plane-pipe-%c-functional", pipe_name(pipe))
|
||||
igt_subtest_f("universal-plane-pipe-%s-functional",
|
||||
kmstest_pipe_name(pipe))
|
||||
for_each_connected_output(&data->display, output)
|
||||
functional_test_pipe(data, pipe, output);
|
||||
|
||||
igt_subtest_f("universal-plane-pipe-%c-sanity", pipe_name(pipe))
|
||||
igt_subtest_f("universal-plane-pipe-%s-sanity",
|
||||
kmstest_pipe_name(pipe))
|
||||
for_each_connected_output(&data->display, output)
|
||||
sanity_test_pipe(data, pipe, output);
|
||||
|
||||
igt_subtest_f("disable-primary-vs-flip-pipe-%c", pipe_name(pipe))
|
||||
igt_subtest_f("disable-primary-vs-flip-pipe-%s",
|
||||
kmstest_pipe_name(pipe))
|
||||
for_each_connected_output(&data->display, output)
|
||||
pageflip_test_pipe(data, pipe, output);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user