intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Sagar Arun Kamble <sagar.a.kamble@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/6] drm/i915: Move GT powersaving init to i915_gem_init()
Date: Thu, 2 Nov 2017 20:05:17 +0530	[thread overview]
Message-ID: <1f80005d-537e-2fd6-dbd4-918d5231a676@intel.com> (raw)
In-Reply-To: <20171102124226.30086-3-chris@chris-wilson.co.uk>



On 11/2/2017 6:12 PM, Chris Wilson wrote:
> GT powersaving is tightly coupled to the request infrastructure. To
> avoid complications with the order of initialisation in the next patch
> (where we want to send requests to hw during GEM init) move the
> powersaving initialisation into the purview of i915_gem_init().
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>   drivers/gpu/drm/i915/i915_gem.c      | 7 ++++++-
>   drivers/gpu/drm/i915/intel_display.c | 2 --
>   drivers/gpu/drm/i915/intel_pm.c      | 2 --
>   3 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9470ba0c1930..e36a3a840552 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -5017,6 +5017,12 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
>   		goto out_unlock;
>   
>   	ret = i915_gem_init_hw(dev_priv);
> +	if (ret)
> +		goto out_unlock;
> +
> +	intel_init_gt_powersave(dev_priv);
Can this be moved before gem_init_hw. That way SLPC can get the initial 
platform RP configuration during uc_init.
> +
> +out_unlock:
>   	if (ret == -EIO) {
>   		/* Allow engine initialisation to fail by marking the GPU as
>   		 * wedged. But we only want to do this where the GPU is angry,
> @@ -5029,7 +5035,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv)
>   		ret = 0;
>   	}
>   
> -out_unlock:
>   	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
>   	mutex_unlock(&dev_priv->drm.struct_mutex);
>   
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 737de251d0f8..c3bf87c2036c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -15174,8 +15174,6 @@ void intel_modeset_gem_init(struct drm_device *dev)
>   {
>   	struct drm_i915_private *dev_priv = to_i915(dev);
>   
> -	intel_init_gt_powersave(dev_priv);
> -
>   	intel_setup_overlay(dev_priv);
>   }
>   
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 07118c0b69d3..6e1358d4e764 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -7900,7 +7900,6 @@ void intel_init_gt_powersave(struct drm_i915_private *dev_priv)
>   		intel_runtime_pm_get(dev_priv);
>   	}
>   
> -	mutex_lock(&dev_priv->drm.struct_mutex);
>   	mutex_lock(&dev_priv->pcu_lock);
>   
>   	/* Initialize RPS limits (for userspace) */
> @@ -7942,7 +7941,6 @@ void intel_init_gt_powersave(struct drm_i915_private *dev_priv)
>   	rps->boost_freq = rps->max_freq;
>   
>   	mutex_unlock(&dev_priv->pcu_lock);
> -	mutex_unlock(&dev_priv->drm.struct_mutex);
>   
>   	intel_autoenable_gt_powersave(dev_priv);
>   }

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-11-02 14:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 12:42 Context isolation Chris Wilson
2017-11-02 12:42 ` [PATCH 1/6] drm/i915: Force the switch to the i915->kernel_context Chris Wilson
2017-11-02 13:45   ` Joonas Lahtinen
2017-11-02 15:40   ` Mika Kuoppala
2017-11-02 15:45     ` Chris Wilson
2017-11-02 12:42 ` [PATCH 2/6] drm/i915: Move GT powersaving init to i915_gem_init() Chris Wilson
2017-11-02 13:46   ` Joonas Lahtinen
2017-11-02 14:35   ` Sagar Arun Kamble [this message]
2017-11-02 14:55     ` Chris Wilson
2017-11-02 15:38       ` Sagar Arun Kamble
2017-11-02 12:42 ` [PATCH 3/6] drm/i915: Inline intel_modeset_gem_init() Chris Wilson
2017-11-02 13:47   ` Joonas Lahtinen
2017-11-02 12:42 ` [PATCH 4/6] drm/i915: Record the default hw state after reset upon load Chris Wilson
2017-11-02 13:56   ` Mika Kuoppala
2017-11-02 14:10     ` Chris Wilson
2017-11-02 14:23   ` Ville Syrjälä
2017-11-02 14:37     ` Chris Wilson
2017-11-02 14:26   ` Joonas Lahtinen
2017-11-02 12:42 ` [PATCH 5/6] drm/i915: Remove redundant intel_autoenable_gt_powersave() Chris Wilson
2017-11-02 13:36   ` Joonas Lahtinen
2017-11-02 12:42 ` [PATCH 6/6] drm/i915: Stop caching the "golden" renderstate Chris Wilson
2017-11-02 14:43   ` Joonas Lahtinen
2017-11-02 14:54     ` Rodrigo Vivi
2017-11-02 14:56       ` Joonas Lahtinen
2017-11-02 22:36         ` Oscar Mateo
2017-11-02 23:34           ` Rodrigo Vivi
2017-11-02 23:36             ` Chris Wilson
2017-11-03  8:39             ` Joonas Lahtinen
2017-11-03 17:44               ` Rodrigo Vivi
2017-11-02 13:14 ` ✗ Fi.CI.BAT: failure for series starting with [1/6] drm/i915: Force the switch to the i915->kernel_context 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=1f80005d-537e-2fd6-dbd4-918d5231a676@intel.com \
    --to=sagar.a.kamble@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;
as well as URLs for NNTP newsgroup(s).