intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Antonio Argenziano <antonio.argenziano@intel.com>,
	Dale B Stimson <dale.b.stimson@intel.com>,
	igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH i-g-t] lib/i915/gem_engine_topology.c - intel_get_current_engine invalid result
Date: Fri, 14 Feb 2020 18:54:43 +0000	[thread overview]
Message-ID: <158170648335.15393.7332630257064965325@skylake-alporthouse-com> (raw)
In-Reply-To: <158170587922.15393.4799274587942949539@skylake-alporthouse-com>

+static void libapi(int i915)
+{
+       I915_DEFINE_CONTEXT_PARAM_ENGINES(engines, 0);
+       struct drm_i915_gem_context_param p = {
+               .ctx_id = gem_context_create(i915),
+               .param = I915_CONTEXT_PARAM_ENGINES,
+               .value = to_user_pointer(&engines),
+               .size = sizeof(engines),
+       };
+       const struct intel_execution_engine2 *e;
+       unsigned int count = 0;
+
+       gem_context_set_param(i915, &p);
+
+       for_each_context_engine(i915, p.ctx_id, e)
+               count++;
+       igt_assert_eq(count, 0);
+
+       ____for_each_physical_engine(i915, p.ctx_id, e)
+               count++;
+       igt_assert_eq(count, 0);
+
+       gem_context_destroy(i915, p.ctx_id);
+}

I leave find a home and correcting the whitespace to the reader.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-02-14 18:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 19:26 [Intel-gfx] [PATCH i-g-t] lib/i915/gem_engine_topology.c - intel_get_current_engine invalid result Dale B Stimson
2020-02-13 20:44 ` Chris Wilson
2020-02-14 18:43 ` Antonio Argenziano
2020-02-14 18:44   ` Chris Wilson
2020-02-14 18:54     ` Chris Wilson [this message]
2020-02-14 19:14       ` Chris Wilson

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=158170648335.15393.7332630257064965325@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=antonio.argenziano@intel.com \
    --cc=dale.b.stimson@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).