From: Arjun Melkaveri <arjun.melkaveri@intel.com>
To: arjun.melkaveri@intel.com, igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH] [PATCH i-g-t][V2]tests/i915/gem_exec_nop:-Fixed Crash issue seen on few platform
Date: Fri, 27 Mar 2020 10:34:35 +0530 [thread overview]
Message-ID: <20200327050435.8531-1-arjun.melkaveri@intel.com> (raw)
Crash issue was seen w.r.t engines on different platforms.
Fixed this by initializing engine and engine name with
maximum supported engines value.
V2:
Made changes for other tests using engine array.
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
Signed-off-by: Arjun Melkaveri <arjun.melkaveri@intel.com>
---
tests/i915/gem_exec_nop.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c
index 6da6234f..823788f8 100644
--- a/tests/i915/gem_exec_nop.c
+++ b/tests/i915/gem_exec_nop.c
@@ -55,6 +55,7 @@
#define MAX_PRIO LOCAL_I915_CONTEXT_MAX_USER_PRIORITY
#define MIN_PRIO LOCAL_I915_CONTEXT_MIN_USER_PRIORITY
+#define GEM_MAX_ENGINES I915_EXEC_RING_MASK + 1
#define FORKED 1
#define CHAINED 2
@@ -225,7 +226,7 @@ static void poll_sequential(int fd, const char *name, int timeout)
struct drm_i915_gem_exec_object2 obj[2];
struct drm_i915_gem_relocation_entry reloc[4], *r;
uint32_t *bbe[2], *state, *batch;
- unsigned engines[16], nengine, flags;
+ unsigned engines[GEM_MAX_ENGINES], nengine, flags;
struct timespec tv = {};
unsigned long cycles;
uint64_t elapsed;
@@ -435,14 +436,15 @@ static void parallel(int fd, uint32_t handle, int timeout)
const struct intel_execution_engine2 *e;
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_exec_object2 obj;
- unsigned engines[16];
- char *names[16];
+ unsigned engines[GEM_MAX_ENGINES];
+ char *names[GEM_MAX_ENGINES];
unsigned nengine;
unsigned long count;
double time, sum;
sum = 0;
nengine = 0;
+
__for_each_physical_engine(fd, e) {
engines[nengine] = e->flags;
names[nengine++] = strdup(e->name);
@@ -497,8 +499,8 @@ static void independent(int fd, uint32_t handle, int timeout)
const struct intel_execution_engine2 *e;
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_exec_object2 obj;
- unsigned engines[16];
- char *names[16];
+ unsigned engines[GEM_MAX_ENGINES];
+ char *names[GEM_MAX_ENGINES];
unsigned nengine;
unsigned long count;
double time, sum;
@@ -621,7 +623,7 @@ static void series(int fd, uint32_t handle, int timeout)
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_exec_object2 obj;
struct timespec start, now, sync;
- unsigned engines[16];
+ unsigned engines[GEM_MAX_ENGINES];
unsigned nengine;
unsigned long count;
double time, max = 0, min = HUGE_VAL, sum = 0;
@@ -711,7 +713,7 @@ static void sequential(int fd, uint32_t handle, unsigned flags, int timeout)
const struct intel_execution_engine2 *e;
struct drm_i915_gem_execbuffer2 execbuf;
struct drm_i915_gem_exec_object2 obj[2];
- unsigned engines[16];
+ unsigned engines[GEM_MAX_ENGINES];
unsigned nengine;
double *results;
double time, sum;
@@ -847,7 +849,7 @@ static void fence_signal(int fd, uint32_t handle,
struct drm_i915_gem_exec_object2 obj;
struct intel_execution_engine2 *__e;
struct timespec start, now;
- unsigned engines[16];
+ unsigned engines[GEM_MAX_ENGINES];
unsigned nengine;
int *fences, n;
unsigned long count, signal;
--
2.25.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2020-03-27 5:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 5:04 Arjun Melkaveri [this message]
2020-03-27 5:51 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_exec_nop:-Fixed Crash issue seen on few platform (rev3) Patchwork
2020-03-27 15:36 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-30 10:58 ` [igt-dev] [PATCH] [PATCH i-g-t][V2]tests/i915/gem_exec_nop:-Fixed Crash issue seen on few platform Chris Wilson
2020-03-30 11:36 ` Melkaveri, Arjun
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=20200327050435.8531-1-arjun.melkaveri@intel.com \
--to=arjun.melkaveri@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