[igt-dev] [PATCH i-g-t] Check caching ioctl before forking
Vikas Srivastava
vikas.srivastava at intel.com
Wed Oct 19 09:26:30 UTC 2022
Several subtests for gem_exec_flush require the SET_CACHING
ioctl to run. However, the function that calls it is
wrapped by an igt_require and thus causes a skip when the
ioctl fails. Unfortunately, MTL currently fails this check
with -EOPNOTSUPP.
While the ioctl failing and resulting in a skip wouldn't
normally be a problem, the failing call is made within a
forked child process, which causes an error. By checking
whether or not caching is supported before forking, this
error can be downgraded to a graceful skip.
v2: Fix formatting
References: VLK-34086
Signed-off-by: vikas srivastava <vikas.srivastava at intel.com>
Signed-off-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
CC: Fei Yang <fei.yang at intel.com>
---
tests/i915/gem_exec_flush.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/i915/gem_exec_flush.c b/tests/i915/gem_exec_flush.c
index 40c58db2..50cabcbe 100644
--- a/tests/i915/gem_exec_flush.c
+++ b/tests/i915/gem_exec_flush.c
@@ -81,6 +81,8 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
unsigned flags)
{
const unsigned int gen = intel_gen(intel_get_drm_devid(fd));
+ if (!(flags & WC))
+ gem_require_caching(fd);
/* The crux of this testing is whether writes by the GPU are coherent
* from the CPU.
@@ -371,7 +373,8 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
enum batch_mode mode, unsigned flags)
{
const unsigned int gen = intel_gen(intel_get_drm_devid(fd));
-
+ gem_require_caching(fd);
+
if (mode == BATCH_GTT)
gem_require_mappable_ggtt(fd);
--
2.25.1
More information about the igt-dev
mailing list