From: Matthew Auld <matthew.auld@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] tests/intel/xe_pat: add sanity check for NULL mappings
Date: Fri, 1 Dec 2023 15:14:14 +0000 [thread overview]
Message-ID: <20231201151414.538960-1-matthew.auld@intel.com> (raw)
Any platform supported pat_index should be compatible with NULL bindings
from KMD pov. Make sure that holds true.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
---
tests/intel/xe_pat.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/tests/intel/xe_pat.c b/tests/intel/xe_pat.c
index 78bd96d11..5c61a5169 100644
--- a/tests/intel/xe_pat.c
+++ b/tests/intel/xe_pat.c
@@ -113,12 +113,30 @@ static void pat_index_all(int fd)
size, DRM_XE_VM_BIND_OP_MAP, 0, NULL, 0, 0,
pat_index, 0),
-EINVAL);
+
+ igt_assert_eq(__xe_vm_bind(fd, vm, 0, 0, 0, 0x40000,
+ size, DRM_XE_VM_BIND_OP_MAP,
+ DRM_XE_VM_BIND_FLAG_NULL, NULL, 0, 0,
+ pat_index, 0),
+ -EINVAL);
} else {
igt_assert_eq(__xe_vm_bind(fd, vm, 0, bo, 0, 0x40000,
size, DRM_XE_VM_BIND_OP_MAP, 0, NULL, 0, 0,
pat_index, 0),
0);
xe_vm_unbind_sync(fd, vm, 0, 0x40000, size);
+
+ /*
+ * There is no real memory being mapped here, so any
+ * platform supported pat_index should be acceptable for
+ * NULL mappings.
+ */
+ igt_assert_eq(__xe_vm_bind(fd, vm, 0, 0, 0, 0x40000,
+ size, DRM_XE_VM_BIND_OP_MAP,
+ DRM_XE_VM_BIND_FLAG_NULL, NULL, 0, 0,
+ pat_index, 0),
+ 0);
+ xe_vm_unbind_sync(fd, vm, 0, 0x40000, size);
}
}
@@ -127,6 +145,12 @@ static void pat_index_all(int fd)
pat_index, 0),
-EINVAL);
+ igt_assert_eq(__xe_vm_bind(fd, vm, 0, 0, 0, 0x40000,
+ size, DRM_XE_VM_BIND_OP_MAP,
+ DRM_XE_VM_BIND_FLAG_NULL, NULL, 0, 0,
+ pat_index, 0),
+ -EINVAL);
+
gem_close(fd, bo);
/* coh_none is never allowed with cpu_caching WB. */
--
2.43.0
next reply other threads:[~2023-12-01 15:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-01 15:14 Matthew Auld [this message]
2023-12-01 17:18 ` [igt-dev] [PATCH i-g-t] tests/intel/xe_pat: add sanity check for NULL mappings Souza, Jose
2023-12-01 18:08 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-12-01 19:32 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-12-03 2:28 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-12-04 10:10 ` Kamil Konieczny
2023-12-05 13:09 ` [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=20231201151414.538960-1-matthew.auld@intel.com \
--to=matthew.auld@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