[PATCH i-g-t v1 1/1] tests/kms_invalid_mode: Add ultrajoiner support to adjust_mode_clock_too_high

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Tue Dec 3 06:44:01 UTC 2024


Check ultrajoiner support on the output and
adjust `max_dotclock` accordingly.

Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
 tests/kms_invalid_mode.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
index 4fd644594..5f13efddb 100644
--- a/tests/kms_invalid_mode.c
+++ b/tests/kms_invalid_mode.c
@@ -34,6 +34,7 @@
  */
 
 #include "igt.h"
+#include "xe/xe_query.h"
 #include <limits.h>
 #include <stdbool.h>
 
@@ -99,6 +100,28 @@ can_bigjoiner(data_t *data)
 	return false;
 }
 
+static bool
+can_ultrajoiner(data_t *data)
+{
+	bool ultra_joiner_supported = false;
+	bool is_dgfx;
+	int display_ver;
+
+	is_dgfx = is_xe_device(data->drm_fd) ? xe_has_vram(data->drm_fd) :
+					       gem_has_lmem(data->drm_fd);
+	display_ver = intel_display_ver(intel_get_drm_devid(data->drm_fd));
+
+	if ((is_dgfx && display_ver == 14) || (display_ver > 14))
+		ultra_joiner_supported = true;
+
+	if (ultra_joiner_supported) {
+		igt_debug("Platform supports ultrajoiner\n");
+		return true;
+	}
+
+	return false;
+}
+
 static bool
 adjust_mode_clock_too_high(data_t *data, drmModeModeInfoPtr mode)
 {
@@ -128,6 +151,12 @@ adjust_mode_clock_too_high(data_t *data, drmModeModeInfoPtr mode)
 		max_dotclock *= 2;
 	}
 
+	if (can_ultrajoiner(data)) {
+		igt_info("Platform supports ultrajoiner with %s\n",
+				 data->output->name);
+		max_dotclock *= 4;
+	}
+
 	mode->clock = max_dotclock + 1;
 
 	return true;
-- 
2.34.1



More information about the igt-dev mailing list