[i-g-t 30/43] tests/kms_getfb: Add XE support
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Fri Mar 24 08:09:50 UTC 2023
Add XE driver support for kms tests.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
tests/kms_getfb.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index 813417e77..4d36377c9 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -42,6 +42,7 @@
#include "drm_fourcc.h"
#include "i915/gem_create.h"
#include "igt_device.h"
+#include "xe/xe_query.h"
IGT_TEST_DESCRIPTION("Tests GETFB and GETFB2 ioctls.");
@@ -91,7 +92,7 @@ static void get_ccs_fb(int fd, struct drm_mode_fb_cmd2 *ret)
uint32_t devid;
igt_require(has_addfb2_iface(fd));
- igt_require_intel(fd);
+ igt_require_i915(fd);
devid = intel_get_drm_devid(fd);
if (HAS_FLATCCS(devid)) {
@@ -454,6 +455,9 @@ igt_main
igt_fixture {
fd = drm_open_driver_master(DRIVER_ANY);
igt_require(has_getfb_iface(fd));
+
+ if (is_xe_device(fd))
+ xe_device_get(fd);
}
igt_subtest_group
@@ -468,6 +472,10 @@ igt_main
igt_subtest_group
test_handle_protection();
- igt_fixture
+ igt_fixture {
+ if (is_xe_device(fd))
+ xe_device_put(fd);
+
close(fd);
+ }
}
--
2.40.0
More information about the Intel-gfx-trybot
mailing list