From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Tomasz Lis <tomasz.lis@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: mika.kuoppala@intel.com
Subject: Re: [PATCH v2] drm/i915/gen11: Preempt-to-idle support in execlists.
Date: Thu, 19 Apr 2018 15:23:29 -0700 [thread overview]
Message-ID: <5ca57ac4-c661-95cc-c45f-a63fe8cf3021@intel.com> (raw)
In-Reply-To: <152413922405.6471.4903347191337879121@mail.alporthouse.com>
<snip>
>>
>> @@ -1010,7 +1033,15 @@ static void execlists_submission_tasklet(unsigned long data)
>> GEN8_CTX_STATUS_PREEMPTED))
>> execlists_set_active(execlists,
>> EXECLISTS_ACTIVE_HWACK);
>> - if (status & GEN8_CTX_STATUS_ACTIVE_IDLE)
>> +
>> + /*
>> + * Check if switched to idle or preempted to idle.
>> + * The STATUS_IDLE_ACTIVE flag is really used to mark
>> + * preemtion from idle to idle, this is not a mistake.
>> + */
>> + if ((status & GEN8_CTX_STATUS_ACTIVE_IDLE) ||
>> + ((status & GEN8_CTX_STATUS_IDLE_ACTIVE) &&
>> + (status & GEN11_CTX_STATUS_PREEMPT_IDLE)))
>> execlists_clear_active(execlists,
>> EXECLISTS_ACTIVE_HWACK);
>
> But still pointless, no?
>
Just to understand, is it pointless because we have a preemption in
flight and we're thus going to call execlists_dequeue below, which will
eventually clear the flag in execlists_submit_ports? Or do we just don't
care if this gets cleared here because we always clear it before a write
to the elsp and we're only interested in it being clear between the
write and the subsequent csb event?
Also, now that I think about it, with the current flow it doesn't look
like we would clear EXECLISTS_ACTIVE_PREEMPT if a preempt-to-idle
happens on idle HW, so we still need a condition for that even if we
drop the one for EXECLISTS_ACTIVE_HWACK.
Daniele
>> @@ -1020,8 +1051,13 @@ static void execlists_submission_tasklet(unsigned long data)
>> /* We should never get a COMPLETED | IDLE_ACTIVE! */
>> GEM_BUG_ON(status & GEN8_CTX_STATUS_IDLE_ACTIVE);
>>
>> - if (status & GEN8_CTX_STATUS_COMPLETE &&
>> - buf[2*head + 1] == execlists->preempt_complete_status) {
>> + /*
>> + * Check if preempted to real idle, either directly or
>> + * the preemptive context already finished executing
>> + */
>> + if ((status & GEN11_CTX_STATUS_PREEMPT_IDLE) ||
>> + (status & GEN8_CTX_STATUS_COMPLETE &&
>> + buf[2*head + 1] == execlists->preempt_complete_status)) {
>> GEM_TRACE("%s preempt-idle\n", engine->name);
>>
>> execlists_cancel_port_requests(execlists);
>> @@ -2157,7 +2193,8 @@ static void execlists_set_default_submission(struct intel_engine_cs *engine)
>> engine->unpark = NULL;
>>
>> engine->flags |= I915_ENGINE_SUPPORTS_STATS;
>> - if (engine->i915->preempt_context)
>> + if (engine->i915->preempt_context ||
>> + HAS_HW_PREEMPT_TO_IDLE(engine->i915))
>> engine->flags |= I915_ENGINE_HAS_PREEMPTION;
>
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-04-19 22:23 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 15:17 [PATCH v1] drm/i915/gen11: Preempt-to-idle support in execlists Tomasz Lis
2018-03-27 15:40 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2018-03-27 15:56 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-27 20:50 ` ✓ Fi.CI.IGT: " Patchwork
2018-03-27 23:27 ` [PATCH v1] " Chris Wilson
2018-03-28 16:06 ` Lis, Tomasz
2018-03-28 22:28 ` Chris Wilson
2018-03-30 15:42 ` Lis, Tomasz
2018-03-30 19:45 ` Daniele Ceraolo Spurio
2018-04-26 14:02 ` Lis, Tomasz
2018-03-30 18:23 ` Daniele Ceraolo Spurio
2018-04-12 17:15 ` Lis, Tomasz
2018-04-19 11:44 ` [PATCH v2] " Tomasz Lis
2018-04-19 12:00 ` Chris Wilson
2018-04-19 22:23 ` Daniele Ceraolo Spurio [this message]
2018-04-19 11:58 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev2) Patchwork
2018-04-19 11:59 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-04-19 12:13 ` ✓ Fi.CI.BAT: success " Patchwork
2018-04-19 16:08 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-11 15:45 ` [PATCH v3] drm/i915/gen11: Preempt-to-idle support in execlists - v3 notes Tomasz Lis
2018-05-11 15:45 ` [PATCH v3] drm/i915/gen11: Preempt-to-idle support in execlists Tomasz Lis
2018-05-18 21:08 ` Daniele Ceraolo Spurio
2018-05-21 10:16 ` Lis, Tomasz
2018-05-22 14:39 ` Ceraolo Spurio, Daniele
2018-05-22 14:54 ` Lis, Tomasz
2018-05-11 16:15 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev3) Patchwork
2018-05-11 16:16 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-11 16:33 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-11 17:46 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-05-25 18:26 ` [PATCH v4] drm/i915/gen11: Preempt-to-idle support in execlists Tomasz Lis
2018-06-11 16:37 ` Daniele Ceraolo Spurio
2018-06-29 16:50 ` Lis, Tomasz
2018-07-02 17:36 ` Daniele Ceraolo Spurio
2018-05-25 18:51 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev4) Patchwork
2018-05-25 18:52 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-05-25 19:08 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-26 5:18 ` ✓ Fi.CI.IGT: " Patchwork
2018-07-06 15:52 ` [PATCH v5] drm/i915/gen11: Preempt-to-idle support in execlists Tomasz Lis
2018-07-06 16:08 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev5) Patchwork
2018-07-06 16:08 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-06 16:25 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-07 14:09 ` ✓ Fi.CI.IGT: " Patchwork
2018-07-16 13:07 ` [PATCH v6] drm/i915: Add IOCTL Param to control data port coherency Tomasz Lis
2018-07-16 13:35 ` Tvrtko Ursulin
2018-07-18 13:24 ` Joonas Lahtinen
2018-07-18 14:42 ` Tvrtko Ursulin
2018-07-18 15:28 ` Lis, Tomasz
2018-07-19 7:12 ` Joonas Lahtinen
2018-07-19 15:10 ` Lis, Tomasz
2018-07-16 14:36 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev6) Patchwork
2018-07-16 14:37 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-07-16 14:58 ` ✓ Fi.CI.BAT: success " Patchwork
2018-07-16 19:26 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-10-15 17:29 ` [PATCH v5] drm/i915/icl: Preempt-to-idle support in execlists Tomasz Lis
2018-10-16 10:53 ` Joonas Lahtinen
2018-10-19 16:00 ` Lis, Tomasz
2018-10-23 9:13 ` Joonas Lahtinen
2018-10-23 9:24 ` Lis, Tomasz
2018-10-15 17:44 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev7) Patchwork
2018-10-15 17:45 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-15 18:07 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-15 23:55 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-11-09 17:18 ` [PATCH v6] drm/i915/icl: Preempt-to-idle support in execlists Tomasz Lis
2018-12-10 15:40 ` Tvrtko Ursulin
2018-12-14 11:10 ` Joonas Lahtinen
2018-12-17 15:21 ` Lis, Tomasz
2018-11-09 18:17 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gen11: Preempt-to-idle support in execlists. (rev8) Patchwork
2018-11-09 18:18 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-09 18:33 ` ✓ Fi.CI.BAT: success " Patchwork
2018-11-10 3:29 ` ✓ 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=5ca57ac4-c661-95cc-c45f-a63fe8cf3021@intel.com \
--to=daniele.ceraolospurio@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.com \
--cc=tomasz.lis@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.