Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v4 02/21] tests/gem_ccs: Drop local function for setting ctrl surface object
Date: Wed, 12 Jul 2023 19:12:12 +0200	[thread overview]
Message-ID: <20230712171231.290555-3-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230712171231.290555-1-zbigniew.kempczynski@intel.com>

Until now gem_ccs was the only user of set_surf_object() and probably
from this reason it wasn't "globalized". Upcoming gem_ccs counterpart
for xe - xe_ccs - uses same object initialization and we got this
function (with small rename) in the blitter library so we can use it
and get rid of local version.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
---
 tests/i915/gem_ccs.c | 31 ++++++++++---------------------
 1 file changed, 10 insertions(+), 21 deletions(-)

diff --git a/tests/i915/gem_ccs.c b/tests/i915/gem_ccs.c
index f9ad9267df..9beddeaee4 100644
--- a/tests/i915/gem_ccs.c
+++ b/tests/i915/gem_ccs.c
@@ -77,17 +77,6 @@ struct test_config {
 	bool suspend_resume;
 };
 
-static void set_surf_object(struct blt_ctrl_surf_copy_object *obj,
-			    uint32_t handle, uint32_t region, uint64_t size,
-			    uint8_t mocs, enum blt_access_type access_type)
-{
-	obj->handle = handle;
-	obj->region = region;
-	obj->size = size;
-	obj->mocs = mocs;
-	obj->access_type = access_type;
-}
-
 #define PRINT_SURFACE_INFO(name, obj) do { \
 	if (param.print_surface_info) \
 		blt_surface_info((name), (obj)); } while (0)
@@ -169,10 +158,10 @@ static void surf_copy(int i915,
 
 	surf.fd = i915;
 	surf.print_bb = param.print_bb;
-	set_surf_object(&surf.src, mid->handle, mid->region, mid->size,
-			uc_mocs, BLT_INDIRECT_ACCESS);
-	set_surf_object(&surf.dst, ccs, REGION_SMEM, ccssize,
-			uc_mocs, DIRECT_ACCESS);
+	blt_set_ctrl_surf_object(&surf.src, mid->handle, mid->region, mid->size,
+				 uc_mocs, BLT_INDIRECT_ACCESS);
+	blt_set_ctrl_surf_object(&surf.dst, ccs, REGION_SMEM, ccssize,
+				 uc_mocs, DIRECT_ACCESS);
 	bb_size = 4096;
 	igt_assert_eq(__gem_create(i915, &bb_size, &bb1), 0);
 	blt_set_batch(&surf.bb, bb1, bb_size, REGION_SMEM);
@@ -191,8 +180,8 @@ static void surf_copy(int i915,
 
 		igt_system_suspend_autoresume(SUSPEND_STATE_FREEZE, SUSPEND_TEST_NONE);
 
-		set_surf_object(&surf.dst, ccs2, REGION_SMEM, ccssize,
-				0, DIRECT_ACCESS);
+		blt_set_ctrl_surf_object(&surf.dst, ccs2, REGION_SMEM, ccssize,
+					 0, DIRECT_ACCESS);
 		blt_ctrl_surf_copy(i915, ctx, e, ahnd, &surf);
 		gem_sync(i915, surf.dst.handle);
 
@@ -213,10 +202,10 @@ static void surf_copy(int i915,
 	/* corrupt ccs */
 	for (int i = 0; i < surf.dst.size / sizeof(uint32_t); i++)
 		ccsmap[i] = i;
-	set_surf_object(&surf.src, ccs, REGION_SMEM, ccssize,
-			uc_mocs, DIRECT_ACCESS);
-	set_surf_object(&surf.dst, mid->handle, mid->region, mid->size,
-			uc_mocs, INDIRECT_ACCESS);
+	blt_set_ctrl_surf_object(&surf.src, ccs, REGION_SMEM, ccssize,
+				 uc_mocs, DIRECT_ACCESS);
+	blt_set_ctrl_surf_object(&surf.dst, mid->handle, mid->region, mid->size,
+				 uc_mocs, INDIRECT_ACCESS);
 	blt_ctrl_surf_copy(i915, ctx, e, ahnd, &surf);
 
 	memset(&blt, 0, sizeof(blt));
-- 
2.34.1

  parent reply	other threads:[~2023-07-12 17:15 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-12 17:12 [igt-dev] [PATCH i-g-t v4 00/21] Extend intel_blt to work on Xe Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 01/21] lib/intel_blt: Add blt_ctrl_surf_object() helper Zbigniew Kempczyński
2023-07-13  6:53   ` Karolina Stolarek
2023-07-12 17:12 ` Zbigniew Kempczyński [this message]
2023-07-13  6:59   ` [igt-dev] [PATCH i-g-t v4 02/21] tests/gem_ccs: Drop local function for setting ctrl surface object Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 03/21] lib/intel_blt: Add dump of two surfaces comparison in 8x8 blocks Zbigniew Kempczyński
2023-07-13  7:08   ` Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 04/21] tests/gem_ccs: Use global image dump comparison function Zbigniew Kempczyński
2023-07-13  7:12   ` Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 05/21] tests/api_intel_allocator: Don't use allocator ahnd aliasing api Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 06/21] lib/intel_allocator: Drop aliasing allocator handle api Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 07/21] lib/intel_allocator: Remove extensive debugging Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 08/21] lib/xe_ioctl: Export non-assert xe_exec function Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 09/21] lib/xe_query: Use vramN when returning string region name Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 10/21] lib/xe_query: Add xe_region_class() helper Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 11/21] lib/drmtest: Add get_intel_driver() helper Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 12/21] lib/xe_util: Return dynamic subtest name for Xe Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 13/21] lib/xe_util: Add vm bind/unbind helper " Zbigniew Kempczyński
2023-07-13  7:15   ` Karolina Stolarek
2023-07-13  7:53     ` Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 14/21] lib/intel_allocator: Add intel_allocator_bind() Zbigniew Kempczyński
2023-07-13  7:17   ` Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 15/21] lib/intel_ctx: Add xe context information Zbigniew Kempczyński
2023-07-13  7:22   ` Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 16/21] lib/intel_blt: Introduce blt_copy_init() helper to cache driver Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 17/21] lib/intel_blt: Extend blitter library to support xe driver Zbigniew Kempczyński
2023-07-13  7:24   ` Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 18/21] tests/xe_ccs: Check if flatccs is working with block-copy for Xe Zbigniew Kempczyński
2023-07-13  7:40   ` Karolina Stolarek
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 19/21] tests/xe_exercise_blt: Check blitter library fast-copy " Zbigniew Kempczyński
2023-07-13  7:43   ` Karolina Stolarek
2023-07-13 10:39     ` Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 20/21] tests/api-intel-allocator: Adopt to exercise allocator to Xe Zbigniew Kempczyński
2023-07-12 17:12 ` [igt-dev] [PATCH i-g-t v4 21/21] tests/gem_ccs: Avoid writing png twice Zbigniew Kempczyński
2023-07-12 19:19 ` [igt-dev] ✓ Fi.CI.BAT: success for Extend intel_blt to work on Xe (rev4) Patchwork
2023-07-12 19:29 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-12 22:52 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-07-13  5:51   ` Zbigniew Kempczyński
2023-07-14  5:13     ` Yedireswarapu, SaiX Nandan
2023-07-13  7:30 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-14  5:02 ` [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=20230712171231.290555-3-zbigniew.kempczynski@intel.com \
    --to=zbigniew.kempczynski@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