lib: Check pipe source validity in igt_pipe_crc_new()

Have igt_pipe_crc_new() check whether the selected source is actually
supported.

v2: Make debugfs_pipe_crc.c not crash

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
Ville Syrjälä
2013-10-21 18:45:03 +03:00
parent 987bcd9a5b
commit 0786d5cc8f
2 changed files with 41 additions and 24 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
connector_set_mode(data, connector, &connector->config.default_mode);
if (!igt_pipe_crc_start(pipe_crc)) {
if (!pipe_crc || !igt_pipe_crc_start(pipe_crc)) {
igt_pipe_crc_free(pipe_crc);
pipe_crc = igt_pipe_crc_new(&data->debugfs, data->drm_fd,
connector->config.pipe,