[igt-dev] [i-g-t] lib/igt_kms: Don't read max dotclock on non-display platforms

Bhanuprakash Modem bhanuprakash.modem at intel.com
Wed Nov 15 09:06:05 UTC 2023


On non-display platforms, there is no point in checking for
max dotclock.

Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/9672
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 lib/igt_kms.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 89510ff22..2073fae53 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -6056,7 +6056,8 @@ int igt_get_max_dotclock(int fd)
 	char *s;
 	int dir, res, max_dotclock = 0;
 
-	if (!is_intel_device(fd))
+	/* If there is no display, then no point to check for dotclock. */
+	if (!is_intel_device(fd) || !drmModeGetResources(fd))
 		return max_dotclock;
 
 	dir = igt_debugfs_dir(fd);
-- 
2.40.0



More information about the igt-dev mailing list