From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/8] drm/i915/gt: Use the local engine wakeref when checking RING registers
Date: Mon, 12 Aug 2019 15:16:49 +0300 [thread overview]
Message-ID: <87muge7f4e.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190812091045.29587-7-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> Now that we can atomically acquire the engine wakeref, make use of it
> when check whether the RING registers are idle.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index 7d174af30f8c..c7b241417ee1 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -1008,16 +1008,12 @@ void intel_engine_get_instdone(struct intel_engine_cs *engine,
>
> static bool ring_is_idle(struct intel_engine_cs *engine)
> {
> - struct drm_i915_private *dev_priv = engine->i915;
> - intel_wakeref_t wakeref;
> bool idle = true;
>
> if (I915_SELFTEST_ONLY(!engine->mmio_base))
> return true;
>
> - /* If the whole device is asleep, the engine must be idle */
> - wakeref = intel_runtime_pm_get_if_in_use(&dev_priv->runtime_pm);
> - if (!wakeref)
> + if (!intel_engine_pm_get_if_awake(engine))
> return true;
>
> /* First check that no commands are left in the ring */
> @@ -1026,11 +1022,11 @@ static bool ring_is_idle(struct intel_engine_cs *engine)
> idle = false;
>
> /* No bit for gen2, so assume the CS parser is idle */
> - if (INTEL_GEN(dev_priv) > 2 &&
> + if (INTEL_GEN(engine->i915) > 2 &&
> !(ENGINE_READ(engine, RING_MI_MODE) & MODE_IDLE))
> idle = false;
>
> - intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref);
> + intel_engine_pm_put(engine);
>
> return idle;
> }
> --
> 2.23.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-08-12 12:17 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 9:10 [PATCH 1/8] drm/i915/execlists: Avoid sync calls during park Chris Wilson
2019-08-12 9:10 ` [PATCH 2/8] drm/i915/selftests: Prevent the timeslice expiring during suppression tests Chris Wilson
2019-08-12 9:39 ` Mika Kuoppala
2019-08-12 9:58 ` Chris Wilson
2019-08-12 10:28 ` Mika Kuoppala
2019-08-12 9:10 ` [PATCH 3/8] drm/i915/guc: Use a local cancel_port_requests Chris Wilson
2019-08-12 9:10 ` [PATCH 4/8] drm/i915: Push the wakeref->count deferral to the backend Chris Wilson
2019-08-12 9:10 ` [PATCH 5/8] drm/i915/gt: Save/restore interrupts around breadcrumb disable Chris Wilson
2019-08-12 9:10 ` [PATCH 6/8] drm/i915/guc: Keep the engine awake until the tasklet is idle Chris Wilson
2019-08-12 10:44 ` Chris Wilson
2019-08-12 20:38 ` Daniele Ceraolo Spurio
2019-08-12 20:42 ` Chris Wilson
2019-08-12 9:10 ` [PATCH 7/8] drm/i915/gt: Use the local engine wakeref when checking RING registers Chris Wilson
2019-08-12 12:16 ` Mika Kuoppala [this message]
2019-08-12 9:10 ` [PATCH 8/8] drm/i915/execlists: Lift process_csb() out of the irq-off spinlock Chris Wilson
2019-08-12 11:13 ` [PATCH] " Chris Wilson
2019-08-12 15:29 ` kbuild test robot
2019-08-12 9:27 ` [PATCH 1/8] drm/i915/execlists: Avoid sync calls during park Mika Kuoppala
2019-08-12 9:33 ` Chris Wilson
2019-08-12 9:40 ` Mika Kuoppala
2019-08-12 12:54 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/8] drm/i915/execlists: Avoid sync calls during park (rev2) Patchwork
2019-08-12 12:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-08-12 13:22 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-12 19:21 ` ✓ 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=87muge7f4e.fsf@gaia.fi.intel.com \
--to=mika.kuoppala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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 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.