From: Jonathan Cavitt <jonathan.cavitt@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jonathan.cavitt@intel.com, saurabhg.gupta@intel.com,
alex.zuo@intel.com, francois.dugast@intel.com,
nirmoy.das@intel.com
Subject: [PATCH] tests/intel/xe_fault_injection: Use valid pat index
Date: Thu, 21 Nov 2024 20:29:42 +0000 [thread overview]
Message-ID: <20241121202943.149868-1-jonathan.cavitt@intel.com> (raw)
As a part of vm_bind_ioctl_check_args, all vm binds that use the
DRM_XE_VM_BIND_OP_MAP_USERPTR operation must have a coherency mode of
XE_COH_AT_LEAST_1WAY. This is determined by the pat_index set in the
bind operation before the bind is performed.
The value is usually set by intel_get_pat_idx_wb, as this is the
default used in the various xe_vm_bind helper functions (or, more
specifically, the pat index value DEFAULT_PAT_INDEX is passed, which
translates to using intel_get_pat_idx_wb to generate the true value sent
to the ioctl). However, when the ioctl is called manually (through
igt_ioctl, for example), it is up to the calling test to ensure the pat
index value is correctly set, and in xe_vm, for example,
intel_get_pat_idx_wb is used as well to set the pat index.
This step was not done in the simple_vm_bind function in
xe_fault_injection, so use intel_get_pat_idx_wb to set the pat index.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/3499
Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: Francois Dugast <francois.dugast@intel.com>
CC: Nirmoy Das <nirmoy.das@intel.com>
---
tests/intel/xe_fault_injection.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
index 1b29041745..f8d7278caa 100644
--- a/tests/intel/xe_fault_injection.c
+++ b/tests/intel/xe_fault_injection.c
@@ -17,6 +17,7 @@
#include "igt_device.h"
#include "igt_kmod.h"
#include "igt_sysfs.h"
+#include "intel_pat.h"
#include "lib/igt_syncobj.h"
#include "xe/xe_ioctl.h"
#include "xe/xe_query.h"
@@ -213,6 +214,7 @@ simple_vm_bind(int fd, uint32_t vm)
.bind.addr = BO_ADDR,
.bind.op = DRM_XE_VM_BIND_OP_MAP_USERPTR,
.bind.flags = 0,
+ .bind.pat_index = intel_get_pat_idx_wb(fd),
.num_syncs = 1,
.syncs = (uintptr_t)&syncobj,
.exec_queue_id = 0,
--
2.43.0
next reply other threads:[~2024-11-21 20:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 20:29 Jonathan Cavitt [this message]
2024-11-21 23:42 ` ✓ Xe.CI.BAT: success for tests/intel/xe_fault_injection: Use valid pat index Patchwork
2024-11-21 23:54 ` ✗ i915.CI.BAT: failure " Patchwork
2024-11-22 14:46 ` [PATCH] " Francois Dugast
2024-11-22 15:04 ` ✗ Xe.CI.Full: failure for " 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=20241121202943.149868-1-jonathan.cavitt@intel.com \
--to=jonathan.cavitt@intel.com \
--cc=alex.zuo@intel.com \
--cc=francois.dugast@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=nirmoy.das@intel.com \
--cc=saurabhg.gupta@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