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 1/2] lib/intel_batchbuffer: Add bind/unbind debug for single bo for Xe
Date: Thu, 11 May 2023 21:36:16 +0200	[thread overview]
Message-ID: <20230511193617.86458-2-zbigniew.kempczynski@intel.com> (raw)
In-Reply-To: <20230511193617.86458-1-zbigniew.kempczynski@intel.com>

We're still in early phase of integrating intel-bb infra with Xe so
debugging information about bind/unbind might be handy. Binding path
for single/multiple differs so lets add it for single case as it was
missing now.

Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
---
 lib/intel_batchbuffer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 545d170548..14ed8057e8 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -1313,8 +1313,11 @@ static void __unbind_xe_objects(struct intel_bb *ibb)
 				 ibb->num_objects, syncs, 2);
 		free(bind_ops);
 	} else {
+		igt_debug("bind: UNMAP\n");
 		xe_vm_unbind_async(ibb->fd, ibb->vm_id, 0, 0,
 				   ibb->batch_offset, ibb->size, syncs, 2);
+		igt_debug("  offset: %llx, size: %llx\n",
+			  (long long)ibb->batch_offset, (long long)ibb->size);
 	}
 	ret = syncobj_wait_err(ibb->fd, &syncs[1].handle, 1, INT64_MAX, 0);
 	igt_assert_eq(ret, 0);
@@ -2326,8 +2329,12 @@ __xe_bb_exec(struct intel_bb *ibb, uint64_t flags, bool sync)
 				 ibb->num_objects, syncs, 1);
 		free(bind_ops);
 	} else {
+		igt_debug("bind: MAP\n");
 		xe_vm_bind_async(ibb->fd, ibb->vm_id, 0, ibb->handle, 0,
 				 ibb->batch_offset, ibb->size, syncs, 1);
+		igt_debug("  handle: %u, offset: %llx, size: %llx\n",
+			  ibb->handle, (long long)ibb->batch_offset,
+			  (long long)ibb->size);
 	}
 	ibb->xe_bound = true;
 
-- 
2.34.1

  reply	other threads:[~2023-05-11 19:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11 19:36 [igt-dev] [PATCH i-g-t 0/2] Limit intel-bb to 48-bit Zbigniew Kempczyński
2023-05-11 19:36 ` Zbigniew Kempczyński [this message]
2023-05-12  7:51   ` [igt-dev] [PATCH i-g-t 1/2] lib/intel_batchbuffer: Add bind/unbind debug for single bo for Xe Kumar, Janga Rahul
2023-05-15 19:26   ` Kamil Konieczny
2023-05-15 19:39     ` Zbigniew Kempczyński
2023-05-11 19:36 ` [igt-dev] [PATCH i-g-t 2/2] lib/intel_batchbuffer: Limit intel-bb to 48-bit va Zbigniew Kempczyński
2023-05-15 19:18   ` Kamil Konieczny
2023-05-15 19:35     ` Zbigniew Kempczyński
2023-05-11 20:47 ` [igt-dev] ✓ Fi.CI.BAT: success for Limit intel-bb to 48-bit Patchwork
2023-05-12  3:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-05-12  5:14   ` Zbigniew Kempczyński
2023-05-12 12:34     ` Yedireswarapu, SaiX Nandan
2023-05-12 12:32 ` [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=20230511193617.86458-2-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