From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tursulin@ursulin.net>
Subject: Re: [PATCH 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace
Date: Wed, 15 Aug 2018 12:51:28 +0100 [thread overview]
Message-ID: <53b33a90-140f-a066-4028-d0426f57f4d6@linux.intel.com> (raw)
In-Reply-To: <153426016153.4061.4368356408491615910@skylake-alporthouse-com>
On 14/08/2018 16:22, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2018-08-14 15:40:58)
>> +static int
>> +i915_gem_context_reconfigure_sseu(struct i915_gem_context *ctx,
>> + struct intel_engine_cs *engine,
>> + struct intel_sseu sseu)
>> +{
>> + struct drm_i915_private *i915 = ctx->i915;
>> + struct i915_request *rq;
>> + struct intel_ring *ring;
>> + int ret;
>> +
>> + lockdep_assert_held(&i915->drm.struct_mutex);
>> +
>> + /* Submitting requests etc needs the hw awake. */
>> + intel_runtime_pm_get(i915);
>> +
>> + i915_retire_requests(i915);
>> +
>> + /* Now use the RCS to actually reconfigure. */
>> + engine = i915->engine[RCS];
>> +
>> + rq = i915_request_alloc(engine, i915->kernel_context);
>> + if (IS_ERR(rq)) {
>> + ret = PTR_ERR(rq);
>> + goto out_put;
>> + }
>> +
>> + ret = engine->emit_rpcs_config(rq, ctx, sseu);
>> + if (ret)
>> + goto out_add;
>> +
>> + /* Queue this switch after all other activity */
>> + list_for_each_entry(ring, &i915->gt.active_rings, active_link) {
>> + struct i915_request *prev;
>> +
>> + prev = last_request_on_engine(ring->timeline, engine);
>> + if (prev)
>> + i915_sw_fence_await_sw_fence_gfp(&rq->submit,
>> + &prev->submit,
>> + I915_FENCE_GFP);
>> + }
>> +
>> + i915_gem_set_global_barrier(i915, rq);
>> +
>> +out_add:
>> + i915_request_add(rq);
>> +out_put:
>> + intel_runtime_pm_put(i915);
>> +
>> + return ret;
>
> Looks like we should be able to hook this up to a selftest to confirm
> the modification does land in the target context image, and a SRM to
> confirm it loaded.
Lionel wrote an IGT which reads it back via SRM so that should be
covered. I will be posting the IGT counterpart at some point as well,
ideally when the agreement on the i915 side is there.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-08-15 11:51 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 14:40 [PATCH v10 0/8] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 1/8] drm/i915: Program RPCS for Broadwell Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 2/8] drm/i915: Record the sseu configuration per-context & engine Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 3/8] drm/i915/perf: simplify configure all context function Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 4/8] drm/i915/perf: reuse intel_lrc ctx regs macro Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 5/8] drm/i915/perf: lock powergating configuration to default when active Tvrtko Ursulin
2018-08-14 14:59 ` Lionel Landwerlin
2018-08-15 11:58 ` Tvrtko Ursulin
2018-08-16 7:31 ` Tvrtko Ursulin
2018-08-16 9:56 ` Lionel Landwerlin
2018-08-14 14:40 ` [PATCH 6/8] drm/i915: Add global barrier support Tvrtko Ursulin
2018-08-14 14:59 ` Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 7/8] drm/i915: Explicitly mark Global GTT address spaces Tvrtko Ursulin
2018-08-14 14:40 ` [PATCH 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace Tvrtko Ursulin
2018-08-14 14:59 ` Chris Wilson
2018-08-14 15:11 ` Lionel Landwerlin
2018-08-14 15:18 ` Chris Wilson
2018-08-14 16:05 ` Lionel Landwerlin
2018-08-14 16:09 ` Lionel Landwerlin
2018-08-14 18:44 ` Tvrtko Ursulin
2018-08-14 18:53 ` Chris Wilson
2018-08-15 9:12 ` Tvrtko Ursulin
2018-08-14 15:22 ` Chris Wilson
2018-08-15 11:51 ` Tvrtko Ursulin [this message]
2018-08-15 11:56 ` Chris Wilson
2018-08-14 14:45 ` [PATCH v10 0/8] Per context dynamic (sub)slice power-gating Tvrtko Ursulin
2018-08-14 15:15 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-08-14 15:19 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-08-14 15:32 ` ✓ Fi.CI.BAT: success " Patchwork
2018-08-14 20:22 ` ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2018-04-25 11:45 [PATCH 0/8] drm/i915: per context slice/subslice powergating Lionel Landwerlin
2018-04-25 11:45 ` [PATCH 8/8] drm/i915: Expose RPCS (SSEU) configuration to userspace Lionel Landwerlin
2018-04-26 10:00 ` Joonas Lahtinen
2018-04-26 10:22 ` Lionel Landwerlin
2018-05-03 16:04 ` Joonas Lahtinen
2018-05-03 16:14 ` Chris Wilson
2018-05-03 16:25 ` Lionel Landwerlin
2018-05-03 16:30 ` Tvrtko Ursulin
2018-05-03 17:18 ` Tvrtko Ursulin
2018-05-04 16:25 ` Lionel Landwerlin
2018-05-08 4:04 ` Rogozhkin, Dmitry V
2018-05-08 8:24 ` Tvrtko Ursulin
2018-05-08 16:00 ` Rogozhkin, Dmitry V
2018-05-08 20:56 ` Chris Wilson
2018-05-09 15:35 ` Lionel Landwerlin
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=53b33a90-140f-a066-4028-d0426f57f4d6@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=chris@chris-wilson.co.uk \
--cc=tursulin@ursulin.net \
/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).