From 2c3e1ca6496de3b0377a43f4e8060cebd2c9920b Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Fri, 6 Apr 2018 12:59:46 +0200 Subject: lib/igt_kms: Handle outputs with no modes better Pretend that outputs without modes are disabled, and try reprobing if no modes are initially detected, just in case that the reprobe will find modes. Signed-off-by: Maarten Lankhorst Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105798 Reviewed-by: Marta Lofstedt --- lib/igt_kms.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/igt_kms.h') diff --git a/lib/igt_kms.h b/lib/igt_kms.h index b37370a0..0e75d0c9 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -411,7 +411,8 @@ void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int count); static inline bool igt_output_is_connected(igt_output_t *output) { /* Something went wrong during probe? */ - if (!output->config.connector) + if (!output->config.connector || + !output->config.connector->count_modes) return false; if (output->config.connector->connection == DRM_MODE_CONNECTED) -- cgit v1.2.3