Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [i-g-t V4 01/20] lib: Add tiling support for XE
Date: Wed, 16 Aug 2023 22:01:47 +0530	[thread overview]
Message-ID: <20230816163206.402705-2-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230816163206.402705-1-bhanuprakash.modem@intel.com>

Remove the tiling restrictions in all libraries those used by
the Xe driver.

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 lib/igt_draw.c     |  5 +----
 lib/igt_fb.c       |  8 ++++----
 lib/intel_bufops.c | 13 +++++++++----
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 13b90702c..476778a13 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -677,14 +677,11 @@ static void draw_rect_blt(int fd, struct cmd_data *cmd_data,
 	int ver = intel_display_ver(devid);
 	int pitch;
 
-	if (tiling)
-		igt_require_i915(fd);
-
 	dst = create_buf(fd, cmd_data->bops, buf, tiling);
 	ibb = intel_bb_create(fd, PAGE_SIZE);
 	intel_bb_add_intel_buf(ibb, dst, true);
 
-	if (is_i915_device(fd) && HAS_4TILE(intel_get_drm_devid(fd))) {
+	if (HAS_4TILE(intel_get_drm_devid(fd))) {
 		int buf_height = buf->size / buf->stride;
 
 		switch (buf->bpp) {
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 60b0e2669..9b5f7f087 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -494,7 +494,7 @@ void igt_get_fb_tile_size(int fd, uint64_t modifier, int fb_bpp,
 		break;
 	case I915_FORMAT_MOD_Yf_TILED:
 	case I915_FORMAT_MOD_Yf_TILED_CCS:
-		igt_require_i915(fd);
+		igt_require_intel(fd);
 		switch (fb_bpp) {
 		case 8:
 			*width_ret = 64;
@@ -767,7 +767,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 		(fb->plane_bpp[plane] / 8);
 
 	if (fb->modifier != DRM_FORMAT_MOD_LINEAR &&
-	    is_i915_device(fb->fd) &&
+	    is_intel_device(fb->fd) &&
 	    intel_display_ver(intel_get_drm_devid(fb->fd)) <= 3) {
 		uint32_t stride;
 
@@ -836,7 +836,7 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
 {
 	if (fb->modifier != DRM_FORMAT_MOD_LINEAR &&
-	    is_i915_device(fb->fd) &&
+	    is_intel_device(fb->fd) &&
 	    intel_display_ver(intel_get_drm_devid(fb->fd)) <= 3) {
 		uint64_t size = (uint64_t) fb->strides[plane] *
 			fb->plane_height[plane];
@@ -913,7 +913,7 @@ static unsigned int get_plane_alignment(struct igt_fb *fb, int color_plane)
 	unsigned int tile_row_size;
 	unsigned int alignment;
 
-	if (!(is_i915_device(fb->fd) &&
+	if (!(is_intel_device(fb->fd) &&
 	      is_gen12_ccs_modifier(fb->modifier) &&
 	      is_yuv_semiplanar_plane(fb, color_plane)))
 		return 0;
diff --git a/lib/intel_bufops.c b/lib/intel_bufops.c
index 524757933..2c91adb88 100644
--- a/lib/intel_bufops.c
+++ b/lib/intel_bufops.c
@@ -927,7 +927,8 @@ static void __intel_buf_init(struct buf_ops *bops,
 	/* Store gem bo size */
 	buf->bo_size = size;
 
-	set_hw_tiled(bops, buf);
+	if (bops->driver == INTEL_DRIVER_I915)
+		set_hw_tiled(bops, buf);
 }
 
 /**
@@ -1502,14 +1503,18 @@ static struct buf_ops *__buf_ops_create(int fd, bool check_idempotency)
 		  bops->intel_gen, bops->supported_tiles,
 		  bops->driver == INTEL_DRIVER_I915 ? "i915" : "xe");
 
-	/* No tiling support in XE. */
 	if (bops->driver == INTEL_DRIVER_XE) {
-		bops->supported_hw_tiles = TILE_NONE;
-
 		bops->linear_to_x = copy_linear_to_x;
 		bops->x_to_linear = copy_x_to_linear;
 		bops->linear_to_y = copy_linear_to_y;
 		bops->y_to_linear = copy_y_to_linear;
+		bops->linear_to_tile4 = copy_linear_to_tile4;
+		bops->tile4_to_linear = copy_tile4_to_linear;
+
+		bops->linear_to_yf = NULL;
+		bops->yf_to_linear = NULL;
+		bops->linear_to_ys = NULL;
+		bops->ys_to_linear = NULL;
 
 		return bops;
 	}
-- 
2.40.0

  reply	other threads:[~2023-08-16 16:39 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-16 16:31 [igt-dev] [i-g-t V4 00/20] Add XE suppor for display tests Bhanuprakash Modem
2023-08-16 16:31 ` Bhanuprakash Modem [this message]
2023-08-23 13:54   ` [igt-dev] [i-g-t,V4,01/20] lib: Add tiling support for XE Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 02/20] tests/kms_cursor_edge_walk: Fix intel specific checks Bhanuprakash Modem
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 03/20] tests/kms_getfb: Extended ccs tests to support XE Bhanuprakash Modem
2023-08-17  8:29   ` Kamil Konieczny
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 04/20] tests/kms_addfb_basic: Add tiling support for XE Bhanuprakash Modem
2023-08-23 13:51   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 05/20] tests/kms_plane: " Bhanuprakash Modem
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 06/20] tests/kms_plane_lowres: " Bhanuprakash Modem
2023-08-18  8:27   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 07/20] tests/kms_plane_scaling: " Bhanuprakash Modem
2023-08-18  8:29   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 08/20] tests/kms_rotation_crc: " Bhanuprakash Modem
2023-08-18  8:32   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 09/20] tests/i915/kms_big_fb: " Bhanuprakash Modem
2023-08-18  8:33   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 10/20] tests/i915/kms_draw_crc: " Bhanuprakash Modem
2023-08-18  8:38   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 11/20] tests/i915/kms_flip_scaled_crc: " Bhanuprakash Modem
2023-08-18  8:40   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 12/20] tests/i915/kms_flip_tiling: " Bhanuprakash Modem
2023-08-18  8:41   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:31 ` [igt-dev] [i-g-t V4 13/20] tests/i915/kms_ccs: Add XE support Bhanuprakash Modem
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 14/20] tests/i915/kms_fb_coherancy: " Bhanuprakash Modem
2023-08-23 16:12   ` Kamil Konieczny
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 15/20] tests/i915/kms_fbcon_fbt: " Bhanuprakash Modem
2023-08-18  8:43   ` [igt-dev] [i-g-t, V4, " Joshi, Kunal1
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 16/20] tests/kms_async_flips: " Bhanuprakash Modem
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 17/20] tests/kms_prime: " Bhanuprakash Modem
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 18/20] tests/intel-ci: Update Xe ffb testlist & blocklist for kms_frontbuffer_tracking Bhanuprakash Modem
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 19/20] tests/intel-ci: Drop tiling tests from xe blocklist Bhanuprakash Modem
2023-08-16 16:32 ` [igt-dev] [i-g-t V4 20/20] HAX: Run tiling tests in XE fast-feedback Bhanuprakash Modem
2023-08-16 19:05 ` [igt-dev] ✓ Fi.CI.BAT: success for Add XE suppor for display tests (rev5) Patchwork
2023-08-16 20:12 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-08-17  3:28 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230816163206.402705-2-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox