public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/i915: Expose RPCS (SSEU) configuration to userspace (Gen11 only)
Date: Mon, 31 Dec 2018 15:21:15 +0000	[thread overview]
Message-ID: <b453ae92-27a9-8335-f852-46d739946e06@linux.intel.com> (raw)
In-Reply-To: <154479439232.11001.6147923981431404435@skylake-alporthouse-com>


On 14/12/2018 13:33, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-12-14 12:34:47)
>> +static int get_sseu(struct i915_gem_context *ctx,
>> +                   struct drm_i915_gem_context_param *args)
>> +{
>> +       struct drm_i915_gem_context_param_sseu user_sseu;
>> +       struct intel_engine_cs *engine;
>> +       struct intel_context *ce;
>> +       int ret;
>> +
>> +       if (args->size == 0)
>> +               goto out;
>> +       else if (args->size < sizeof(user_sseu))
>> +               return -EINVAL;
>> +
>> +       if (copy_from_user(&user_sseu, u64_to_user_ptr(args->value),
>> +                          sizeof(user_sseu)))
>> +               return -EFAULT;
>> +
>> +       if (user_sseu.rsvd1 || user_sseu.rsvd2)
>> +               return -EINVAL;
> 
> I'd vote for s/rsvd2/flags/ straight away as already I can suggest we
> allow for USE_CTX_ENGINE to swap class/instance for engine-id so that we
> can set rpcs for, and not least, a virtual engine.

Hm.. would it be useful? It would just be a way of indirection.

engines = [vcs:0, vcs:1]
ctx.set_map(engines)

And then a):

foreach engine in engines:
	ctx.set_sseu(engine, flags=0)

vs b):

for i = 0; i < len(engines); i++:
	ctx.set_sseu(i, flags=USE_CTX_ENGINE)

So I don't see any benefit. But maybe I missed your idea.

Regards,

Tvrtko

> 
>> +
>> +       engine = intel_engine_lookup_user(ctx->i915,
>> +                                         user_sseu.class,
>> +                                         user_sseu.instance);
>> +       if (!engine)
>> +               return -EINVAL;
> -Chris
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-12-31 15:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 12:34 [PATCH 0/7] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2018-12-14 12:34 ` [PATCH 1/7] drm/i915/execlists: Move RPCS setup to context pin Tvrtko Ursulin
2018-12-14 12:34 ` [PATCH 2/7] drm/i915: Record the sseu configuration per-context & engine Tvrtko Ursulin
2018-12-14 12:34 ` [PATCH 3/7] drm/i915/perf: lock powergating configuration to default when active Tvrtko Ursulin
2018-12-14 12:34 ` [PATCH 4/7] drm/i915: Add timeline barrier support Tvrtko Ursulin
2018-12-14 13:26   ` Chris Wilson
2018-12-14 12:34 ` [PATCH 5/7] drm/i915: Expose RPCS (SSEU) configuration to userspace (Gen11 only) Tvrtko Ursulin
2018-12-14 13:33   ` Chris Wilson
2018-12-31 15:21     ` Tvrtko Ursulin [this message]
2018-12-31 15:33       ` Chris Wilson
2018-12-31 15:39         ` Tvrtko Ursulin
2018-12-14 12:34 ` [PATCH 6/7] drm/i915/icl: Support co-existence between per-context SSEU and OA Tvrtko Ursulin
2018-12-14 12:34 ` [PATCH 7/7] drm/i915/selftests: Context SSEU reconfiguration tests Tvrtko Ursulin
2018-12-14 13:04   ` Chris Wilson
2018-12-14 13:22   ` Chris Wilson
2018-12-14 12:55 ` ✗ Fi.CI.CHECKPATCH: warning for Per context dynamic (sub)slice power-gating (rev8) Patchwork
2018-12-14 12:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-14 13:11 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-14 15:07 ` ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2018-12-31 16:06 [PATCH 0/7] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2018-12-31 16:06 ` [PATCH 5/7] drm/i915: Expose RPCS (SSEU) configuration to userspace (Gen11 only) Tvrtko Ursulin
2019-01-08 11:22 [PATCH 0/7] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2019-01-08 11:22 ` [PATCH 5/7] drm/i915: Expose RPCS (SSEU) configuration to userspace (Gen11 only) Tvrtko Ursulin
2019-01-08 14:22   ` Joonas Lahtinen
2019-01-08 14:35     ` Tvrtko Ursulin
2019-01-08 14:57       ` 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=b453ae92-27a9-8335-f852-46d739946e06@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    /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