mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-20 12:52:55 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user