All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: hariom.pandey@intel.com
Subject: [igt-dev] [i-g-t] lib/gem_submission: Remove __gem_execbuf call
Date: Thu,  8 Apr 2021 12:22:31 +0530	[thread overview]
Message-ID: <20210408065231.47694-1-tejaskumarx.surendrakumar.upadhyay@intel.com> (raw)

After reloc support got dropped on GEN12/12+, lot of tests are
reporting failures which should be skipped using check
gem_has_relocations(). The problem is lot of those failures are
due to direct __gem_execbuf() call where we cant put gem_has_
relocations check to skip the test in case platform does not
support reason being it also calls __gem_execbuf which creates
never ending loop. Thus to avoid looping, call __gem_execbuf()
inside gem_has_relocations() is replaced with direct ioctl call.

Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
---
 lib/i915/gem_submission.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index 051f9d04..50a8ae11 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -422,8 +422,14 @@ bool gem_has_relocations(int i915)
 		.buffer_count = 1,
 	};
 	bool has_relocs;
+	int err = 0;
+
+	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf)) {
+		err = -errno;
+		igt_assume(err != 0);
+	}
 
-	has_relocs = __gem_execbuf(i915, &execbuf) == -ENOENT;
+	has_relocs = err == -ENOENT;
 	gem_close(i915, obj.handle);
 
 	return has_relocs;
-- 
2.30.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2021-04-08  7:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  6:52 Tejas Upadhyay [this message]
2021-04-08  9:33 ` [igt-dev] [i-g-t] lib/gem_submission: Remove __gem_execbuf call Zbigniew Kempczyński
2021-04-08  9:39   ` Surendrakumar Upadhyay, TejaskumarX
2021-04-08  9:44     ` Zbigniew Kempczyński
2021-04-08  9:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-04-08 11:57 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20210408065231.47694-1-tejaskumarx.surendrakumar.upadhyay@intel.com \
    --to=tejaskumarx.surendrakumar.upadhyay@intel.com \
    --cc=hariom.pandey@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.