From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915: Fix gem_context_has_engine_map() for older kernels
Date: Tue, 2 Jul 2019 11:50:34 +0100 [thread overview]
Message-ID: <20190702105034.2535-1-chris@chris-wilson.co.uk> (raw)
CI is currently breaking on linus/drm-intel-fixes due to the assert that
the kernel supports context engine maps. Report the lack of maps on
older kernels gracefully!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
---
lib/i915/gem_engine_topology.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index cae5a0292..cc2b3ff6e 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -321,10 +321,13 @@ bool gem_context_has_engine_map(int fd, uint32_t ctx)
.param = I915_CONTEXT_PARAM_ENGINES,
.ctx_id = ctx
};
- int ret;
- ret = __gem_context_get_param(fd, ¶m);
- igt_assert_eq(ret, 0);
+ /*
+ * If the kernel is too old to support PARAM_ENGINES,
+ * then naturally is has no engine map.
+ */
+ if (__gem_context_get_param(fd, ¶m))
+ return false;
return param.size;
}
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-07-02 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 10:50 Chris Wilson [this message]
2019-07-02 11:43 ` [igt-dev] [PATCH i-g-t] i915: Fix gem_context_has_engine_map() for older kernels Tvrtko Ursulin
2019-07-02 12:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-07-03 7:13 ` [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=20190702105034.2535-1-chris@chris-wilson.co.uk \
--to=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@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