From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [CI 20/21] drm/i915: Combined gt.awake/gt.power wakerefs
Date: Mon, 14 Jan 2019 17:04:10 +0200 [thread overview]
Message-ID: <87h8ebz3f9.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190114142129.24398-20-chris@chris-wilson.co.uk>
Chris Wilson <chris@chris-wilson.co.uk> writes:
> As the GT_IRQ power domain implies a wakeref, we can use it inplace of
> our existing redundant rpm grab.
>
> v2: Drop papering over forgetting to take the runtime wakeref in
> selftests
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.h | 1 -
> drivers/gpu/drm/i915/i915_gem.c | 11 ++++-------
> drivers/gpu/drm/i915/intel_lrc.c | 2 +-
> 3 files changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 97200411dfad..fa99824f63b3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1985,7 +1985,6 @@ struct drm_i915_private {
> * is a slight delay before we do so.
> */
> intel_wakeref_t awake;
> - intel_wakeref_t power;
>
> /**
> * The number of times we have woken up.
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 5ed1c8576525..0bfed33178e1 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -176,9 +176,7 @@ static u32 __i915_gem_park(struct drm_i915_private *i915)
> if (INTEL_GEN(i915) >= 6)
> gen6_rps_idle(i915);
>
> - intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ, i915->gt.power);
> -
> - intel_runtime_pm_put(i915, wakeref);
> + intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ, wakeref);
>
> return i915->gt.epoch;
> }
> @@ -203,13 +201,11 @@ void i915_gem_unpark(struct drm_i915_private *i915)
>
> lockdep_assert_held(&i915->drm.struct_mutex);
> GEM_BUG_ON(!i915->gt.active_requests);
> + assert_rpm_wakelock_held(i915);
>
> if (i915->gt.awake)
> return;
>
> - i915->gt.awake = intel_runtime_pm_get_noresume(i915);
> - GEM_BUG_ON(!i915->gt.awake);
> -
> /*
> * It seems that the DMC likes to transition between the DC states a lot
> * when there are no connected displays (no active power domains) during
> @@ -221,7 +217,8 @@ void i915_gem_unpark(struct drm_i915_private *i915)
> * Work around it by grabbing a GT IRQ power domain whilst there is any
> * GT activity, preventing any DC state transitions.
> */
> - i915->gt.power = intel_display_power_get(i915, POWER_DOMAIN_GT_IRQ);
> + i915->gt.awake = intel_display_power_get(i915, POWER_DOMAIN_GT_IRQ);
> + GEM_BUG_ON(!i915->gt.awake);
>
> if (unlikely(++i915->gt.epoch == 0)) /* keep 0 as invalid */
> i915->gt.epoch = 1;
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 1effbf49fa08..608458b92db3 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1045,7 +1045,7 @@ static void execlists_submission_tasklet(unsigned long data)
>
> GEM_TRACE("%s awake?=%d, active=%x\n",
> engine->name,
> - engine->i915->gt.awake,
> + !!engine->i915->gt.awake,
> engine->execlists.active);
>
> spin_lock_irqsave(&engine->timeline.lock, flags);
> --
> 2.20.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-01-14 15:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 14:21 [CI 01/21] drm/i915: Track all held rpm wakerefs Chris Wilson
2019-01-14 14:21 ` [CI 02/21] drm/i915: Markup paired operations on wakerefs Chris Wilson
2019-01-14 14:21 ` [CI 03/21] drm/i915: Track GT wakeref Chris Wilson
2019-01-14 14:21 ` [CI 04/21] drm/i915: Track the rpm wakerefs for error handling Chris Wilson
2019-01-14 14:21 ` [CI 05/21] drm/i915: Mark up sysfs with rpm wakeref tracking Chris Wilson
2019-01-14 14:21 ` [CI 06/21] drm/i915: Mark up debugfs " Chris Wilson
2019-01-14 14:21 ` [CI 07/21] drm/i915/perf: Track the rpm wakeref Chris Wilson
2019-01-14 14:21 ` [CI 08/21] drm/i915/pmu: Track " Chris Wilson
2019-01-14 14:21 ` [CI 09/21] drm/i915/guc: Track the " Chris Wilson
2019-01-14 14:21 ` [CI 10/21] drm/i915/gem: Track the rpm wakerefs Chris Wilson
2019-01-14 14:21 ` [CI 11/21] drm/i915/fb: Track " Chris Wilson
2019-01-14 14:21 ` [CI 12/21] drm/i915/hotplug: Track temporary rpm wakeref Chris Wilson
2019-01-14 14:21 ` [CI 13/21] drm/i915/panel: " Chris Wilson
2019-01-14 14:21 ` [CI 14/21] drm/i915/selftests: Mark up rpm wakerefs Chris Wilson
2019-01-14 14:21 ` [CI 15/21] drm/i915: Syntatic sugar for using intel_runtime_pm Chris Wilson
2019-01-14 14:21 ` [CI 16/21] drm/i915: Markup paired operations on display power domains Chris Wilson
2019-01-14 14:21 ` [CI 17/21] drm/i915: Track the wakeref used to initialise " Chris Wilson
2019-01-14 14:21 ` [CI 18/21] drm/i915/dp: Markup pps lock power well Chris Wilson
2019-01-14 14:21 ` [CI 19/21] drm/i915: Complain if hsw_get_pipe_config acquires the same power well twice Chris Wilson
2019-01-14 14:21 ` [CI 20/21] drm/i915: Combined gt.awake/gt.power wakerefs Chris Wilson
2019-01-14 15:04 ` Mika Kuoppala [this message]
2019-01-14 14:21 ` [CI 21/21] drm/i915: Mark up Ironlake ips with rpm wakerefs Chris Wilson
2019-01-14 14:29 ` ✗ Fi.CI.BAT: failure for series starting with [CI,01/21] drm/i915: Track all held " Patchwork
2019-01-14 14:32 ` Chris Wilson
2019-01-14 17:33 ` 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=87h8ebz3f9.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.