[i-g-t V2 41/44] tests/kms_setmode: Add XE support
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Mon Mar 27 16:09:23 UTC 2023
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_setmode.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index bfa108916..a611d9382 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -30,6 +30,7 @@
#include <string.h>
#include <sys/time.h>
#include <math.h>
+#include "xe/xe_query.h"
#define MAX_CONNECTORS 10
#define MAX_CRTCS 6
@@ -954,6 +955,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
drm_resources = drmModeGetResources(drm_fd);
igt_require(drm_resources);
+
+ if (is_xe_device(drm_fd))
+ xe_device_get(drm_fd);
}
for (i = 0; i < ARRAY_SIZE(tests); i++) {
@@ -971,6 +975,9 @@ igt_main_args("det:", NULL, help_str, opt_handler, NULL)
igt_fixture {
drmModeFreeResources(drm_resources);
+ if (is_xe_device(drm_fd))
+ xe_device_put(drm_fd);
+
close(drm_fd);
}
}
--
2.40.0
More information about the Intel-gfx-trybot
mailing list