tests: use "auto" pipe CRC source

Makes stuff work on DP ports on gmch platforms automatically.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-10-31 14:02:44 +01:00
parent 0b51de8dd0
commit 842007154d
4 changed files with 8 additions and 19 deletions

View File

@ -154,7 +154,8 @@ static const char *pipe_crc_sources[] = {
"TV", "TV",
"DP-B", "DP-B",
"DP-C", "DP-C",
"DP-D" "DP-D",
"auto"
}; };
static const char *pipe_crc_source_name(enum intel_pipe_crc_source source) static const char *pipe_crc_source_name(enum intel_pipe_crc_source source)

View File

@ -55,6 +55,7 @@ enum intel_pipe_crc_source {
INTEL_PIPE_CRC_SOURCE_DP_B, INTEL_PIPE_CRC_SOURCE_DP_B,
INTEL_PIPE_CRC_SOURCE_DP_C, INTEL_PIPE_CRC_SOURCE_DP_C,
INTEL_PIPE_CRC_SOURCE_DP_D, INTEL_PIPE_CRC_SOURCE_DP_D,
INTEL_PIPE_CRC_SOURCE_AUTO,
INTEL_PIPE_CRC_SOURCE_MAX, INTEL_PIPE_CRC_SOURCE_MAX,
}; };

View File

@ -169,17 +169,12 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
pipe_crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd, pipe_crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd,
connector->config.pipe, connector->config.pipe,
INTEL_PIPE_CRC_SOURCE_PLANE1); INTEL_PIPE_CRC_SOURCE_AUTO);
connector_set_mode(data, connector, &connector->config.default_mode); connector_set_mode(data, connector, &connector->config.default_mode);
if (!pipe_crc || !igt_pipe_crc_start(pipe_crc)) { igt_require(pipe_crc);
igt_pipe_crc_free(pipe_crc); igt_assert(igt_pipe_crc_start(pipe_crc));
pipe_crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd,
connector->config.pipe,
INTEL_PIPE_CRC_SOURCE_PIPE);
igt_assert(igt_pipe_crc_start(pipe_crc));
}
/* wait for 3 vblanks and the corresponding 3 CRCs */ /* wait for 3 vblanks and the corresponding 3 CRCs */
igt_pipe_crc_get_crcs(pipe_crc, 3, &crcs); igt_pipe_crc_get_crcs(pipe_crc, 3, &crcs);

View File

@ -110,16 +110,8 @@ static igt_pipe_crc_t *create_crc(data_t *data, int crtc_idx)
igt_pipe_crc_t *crc; igt_pipe_crc_t *crc;
crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd, crtc_idx, crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd, crtc_idx,
INTEL_PIPE_CRC_SOURCE_PF); INTEL_PIPE_CRC_SOURCE_AUTO);
if (crc) return crc;
return crc;
crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd, crtc_idx,
INTEL_PIPE_CRC_SOURCE_PIPE);
if (crc)
return crc;
return NULL;
} }
static void display_init(data_t *data) static void display_init(data_t *data)