From: "Teres Alexis, Alan Previn" <alan.previn.teres.alexis@intel.com>
To: "Dong, Zhanjun" <zhanjun.dong@intel.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t v4 1/1] tests/intel/xe_exec_capture: Add xe_exec_capture test
Date: Wed, 13 Nov 2024 23:26:28 +0000 [thread overview]
Message-ID: <1835cf617c0b4dd6816b14163bad1de74321910f.camel@intel.com> (raw)
In-Reply-To: <20241022163324.383145-2-zhanjun.dong@intel.com>
alan:snip
> +static void
> +test_legacy_mode(int fd, struct drm_xe_engine_class_instance *eci,
> + int n_exec_queues, int n_execs, unsigned int flags)
alan: One more thing, based on the testing flow from the caller, we can refactor a lot of code to not use loops
and not arrays of more than 1 execution queue and number of batches. This also includes
the local variables instanced as arrays in support of the same.
> +{
> + uint32_t vm;
> + const uint64_t addr = BASE_ADDRESS;
> + struct drm_xe_sync sync[2] = {
> + { .type = DRM_XE_SYNC_TYPE_SYNCOBJ, .flags = DRM_XE_SYNC_FLAG_SIGNAL, },
> + { .type = DRM_XE_SYNC_TYPE_SYNCOBJ, .flags = DRM_XE_SYNC_FLAG_SIGNAL, },
> + };
> + struct drm_xe_exec exec = {
> + .num_batch_buffer = 1,
> + .num_syncs = 2,
> + .syncs = to_user_pointer(sync),
> + };
> + uint32_t exec_queues[MAX_N_EXECQUEUES];
> + uint32_t syncobjs[MAX_N_EXECQUEUES];
> + size_t bo_size;
> + uint32_t bo = 0;
> + struct {
> + struct xe_spin spin;
> + uint32_t batch[BATCH_DW_COUNT];
> + uint64_t pad;
> + uint32_t data;
> + } *data;
> + struct xe_spin_opts spin_opts = { .preempt = false };
> + int i, b;
> +
> + igt_assert(n_exec_queues <= MAX_N_EXECQUEUES);
> +
> + vm = xe_vm_create(fd, 0, 0);
> + bo_size = sizeof(*data) * n_execs;
> + bo_size = xe_bb_size(fd, bo_size);
> +
> + bo = xe_bo_create(fd, vm, bo_size,
> + vram_if_possible(fd, eci->gt_id),
> + DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM);
> + data = xe_bo_map(fd, bo, bo_size);
> +
> + for (i = 0; i < n_exec_queues; i++) {
> + exec_queues[i] = xe_exec_queue_create(fd, vm, eci, 0);
> + syncobjs[i] = syncobj_create(fd, 0);
> + };
> +
alan:snip
next prev parent reply other threads:[~2024-11-13 23:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 16:33 [PATCH i-g-t v4 0/1] tests/intel/xe_exec_capture: Add xe_exec_capture test Zhanjun Dong
2024-10-22 16:33 ` [PATCH i-g-t v4 1/1] " Zhanjun Dong
2024-11-13 7:48 ` Teres Alexis, Alan Previn
2024-11-13 23:23 ` Teres Alexis, Alan Previn
2024-11-14 22:23 ` Dong, Zhanjun
2024-11-15 19:21 ` Dong, Zhanjun
2024-11-14 22:33 ` Dong, Zhanjun
2024-11-13 23:26 ` Teres Alexis, Alan Previn [this message]
2024-10-22 18:47 ` ✗ GitLab.Pipeline: warning for tests/intel/xe_exec_capture: Add xe_exec_capture test (rev2) Patchwork
2024-10-22 19:14 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-22 20:19 ` ✓ CI.xeBAT: " Patchwork
2024-10-23 2:05 ` ✗ CI.xeFULL: failure " Patchwork
2024-10-23 3:35 ` ✗ Fi.CI.IGT: " Patchwork
2024-10-23 5:18 ` [PATCH i-g-t v4 0/1] tests/intel/xe_exec_capture: Add xe_exec_capture test Peter Senna Tschudin
2024-10-23 14:13 ` Dong, Zhanjun
2024-10-24 4:43 ` Peter Senna Tschudin
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=1835cf617c0b4dd6816b14163bad1de74321910f.camel@intel.com \
--to=alan.previn.teres.alexis@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=zhanjun.dong@intel.com \
/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