[igt-dev] [i-g-t 1/7] lib/intel_bufops: Fix bops creation to support XE

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Apr 13 16:27:26 UTC 2023


As XE won't support tiling, fix the bops creation logic to
support XE device.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 lib/intel_bufops.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index cdc7a1698b2..81f7b951813 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -1423,6 +1423,25 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
 	igt_debug("generation: %d, supported tiles: 0x%02x\n",
 		  bops->intel_gen, bops->supported_tiles);
 
+	/* No tiling support in XE. */
+	if (is_xe_device(fd)) {
+		bops->supported_tiles = TILE_NONE;
+		bops->supported_hw_tiles = TILE_NONE;
+
+		bops->linear_to_x = NULL;
+		bops->x_to_linear = NULL;
+		bops->linear_to_y = NULL;
+		bops->y_to_linear = NULL;
+		bops->linear_to_tile4 = NULL;
+		bops->tile4_to_linear = NULL;
+		bops->linear_to_yf = NULL;
+		bops->yf_to_linear = NULL;
+		bops->linear_to_ys = NULL;
+		bops->ys_to_linear = NULL;
+
+		return bops;
+	}
+
 	/*
 	 * Warning!
 	 *
-- 
2.40.0



More information about the igt-dev mailing list