[igt-dev] [i-g-t] tests/intel/kms_ccs: Avoid i915 calls on XE device

Bhanuprakash Modem bhanuprakash.modem at intel.com
Mon Oct 30 16:34:58 UTC 2023


For XE device, use XE specific APIs to create the BO.

Fixes: https://gitlab.freedesktop.org/drm/xe/kernel/issues/812
Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/intel/kms_ccs.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index 09b98fbec..64489b7a3 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -33,6 +33,7 @@
 
 #include "i915/gem_create.h"
 #include "xe/xe_ioctl.h"
+#include "xe/xe_query.h"
 
 /**
  * SUBTEST: %s-%s-%s
@@ -431,7 +432,10 @@ static void test_bad_ccs_plane(data_t *data, int width, int height, int ccs_plan
 
 	/* Put the CCS buffer on a different BO. */
 	if (data->flags & TEST_BAD_CCS_HANDLE) {
-		bad_ccs_bo = gem_create(data->drm_fd, fb.size);
+		bad_ccs_bo = is_i915_device(data->drm_fd) ?
+				gem_create(data->drm_fd, fb.size) :
+				xe_bo_create_flags(data->drm_fd, 0, fb.size,
+						   visible_vram_if_possible(data->drm_fd, 0));;
 		f.handles[ccs_plane] = bad_ccs_bo;
 	}
 
-- 
2.40.0



More information about the igt-dev mailing list