From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Take a runtime pm wakeref for atomic commits
Date: Tue, 28 May 2019 17:17:58 +0300 [thread overview]
Message-ID: <20190528141758.GM5942@intel.com> (raw)
In-Reply-To: <20190528075354.22341-1-chris@chris-wilson.co.uk>
On Tue, May 28, 2019 at 08:53:54AM +0100, Chris Wilson wrote:
> Before we start prepping the system for an atomic modeset, wake the
> device up. We then keep track of this wakeref until we complete the
> atomic commit, so we hold keep the device awake for all potential HW
> access, and do not allow the device to sleep with a pending modeset.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110771
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
lgtm
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 5 +++++
> drivers/gpu/drm/i915/intel_drv.h | 2 ++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 909171d3ec25..afe7618567c7 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13811,6 +13811,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state)
> intel_uncore_arm_unclaimed_mmio_detection(&dev_priv->uncore);
> intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET, wakeref);
> }
> + intel_runtime_pm_put(dev_priv, intel_state->wakeref);
>
> /*
> * Defer the cleanup of the old state to a separate worker to not
> @@ -13889,6 +13890,8 @@ static int intel_atomic_commit(struct drm_device *dev,
> struct drm_i915_private *dev_priv = to_i915(dev);
> int ret = 0;
>
> + intel_state->wakeref = intel_runtime_pm_get(dev_priv);
> +
> drm_atomic_state_get(state);
> i915_sw_fence_init(&intel_state->commit_ready,
> intel_atomic_commit_ready);
> @@ -13925,6 +13928,7 @@ static int intel_atomic_commit(struct drm_device *dev,
> if (ret) {
> DRM_DEBUG_ATOMIC("Preparing state failed with %i\n", ret);
> i915_sw_fence_commit(&intel_state->commit_ready);
> + intel_runtime_pm_put(dev_priv, intel_state->wakeref);
> return ret;
> }
>
> @@ -13936,6 +13940,7 @@ static int intel_atomic_commit(struct drm_device *dev,
> i915_sw_fence_commit(&intel_state->commit_ready);
>
> drm_atomic_helper_cleanup_planes(dev, state);
> + intel_runtime_pm_put(dev_priv, intel_state->wakeref);
> return ret;
> }
> dev_priv->wm.distrust_bios_wm = false;
> diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
> index f341042b6c79..70aff1d6f597 100644
> --- a/drivers/gpu/drm/i915/intel_drv.h
> +++ b/drivers/gpu/drm/i915/intel_drv.h
> @@ -420,6 +420,8 @@ struct dpll {
> struct intel_atomic_state {
> struct drm_atomic_state base;
>
> + intel_wakeref_t wakeref;
> +
> struct {
> /*
> * Logical state of cdclk (used for all scaling, watermark,
> --
> 2.20.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-05-28 14:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-28 7:53 [PATCH] drm/i915: Take a runtime pm wakeref for atomic commits Chris Wilson
2019-05-28 12:24 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-05-28 14:17 ` Ville Syrjälä [this message]
2019-05-28 16:07 ` ✓ 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=20190528141758.GM5942@intel.com \
--to=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox