All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915/gem: Leave reloading kernel context on resume to GT
Date: Fri, 1 Nov 2019 15:47:01 +0200	[thread overview]
Message-ID: <20191101134701.GB4215@intel.intel> (raw)
In-Reply-To: <20191030103827.2413-3-chris@chris-wilson.co.uk>

Hi Chris,

On Wed, Oct 30, 2019 at 10:38:25AM +0000, Chris Wilson wrote:
> As we already do reload the kernel context in intel_gt_resume, repeating
> that action inside i915_gem_resume() as well is redundant.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

reviewed-by: Andi Shyti <andi.shyti@intel.com>

Thanks,
Andi

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_pm.c | 30 --------------------------
>  1 file changed, 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> index e2ee9c04ece8..64dd04ae3d57 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> @@ -11,32 +11,6 @@
>  
>  #include "i915_drv.h"
>  
> -static bool switch_to_kernel_context_sync(struct intel_gt *gt)
> -{
> -	bool result = !intel_gt_is_wedged(gt);
> -
> -	if (intel_gt_wait_for_idle(gt, I915_GEM_IDLE_TIMEOUT) == -ETIME) {
> -		/* XXX hide warning from gem_eio */
> -		if (i915_modparams.reset) {
> -			dev_err(gt->i915->drm.dev,
> -				"Failed to idle engines, declaring wedged!\n");
> -			GEM_TRACE_DUMP();
> -		}
> -
> -		/*
> -		 * Forcibly cancel outstanding work and leave
> -		 * the gpu quiet.
> -		 */
> -		intel_gt_set_wedged(gt);
> -		result = false;
> -	}
> -
> -	if (intel_gt_pm_wait_for_idle(gt))
> -		result = false;
> -
> -	return result;
> -}
> -
>  static void user_forcewake(struct intel_gt *gt, bool suspend)
>  {
>  	int count = atomic_read(&gt->user_wakeref);
> @@ -158,10 +132,6 @@ void i915_gem_resume(struct drm_i915_private *i915)
>  	if (intel_gt_resume(&i915->gt))
>  		goto err_wedged;
>  
> -	/* Always reload a context for powersaving. */
> -	if (!switch_to_kernel_context_sync(&i915->gt))
> -		goto err_wedged;
> -
>  	user_forcewake(&i915->gt, false);
>  
>  out_unlock:
> -- 
> 2.24.0.rc1
> 
> _______________________________________________
> 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

WARNING: multiple messages have this Message-ID (diff)
From: Andi Shyti <andi.shyti@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 3/5] drm/i915/gem: Leave reloading kernel context on resume to GT
Date: Fri, 1 Nov 2019 15:47:01 +0200	[thread overview]
Message-ID: <20191101134701.GB4215@intel.intel> (raw)
Message-ID: <20191101134701.PCxQ--q6LZuGKVRG5CNZWOO8LmSiGHruHpvA5PJtAeE@z> (raw)
In-Reply-To: <20191030103827.2413-3-chris@chris-wilson.co.uk>

Hi Chris,

On Wed, Oct 30, 2019 at 10:38:25AM +0000, Chris Wilson wrote:
> As we already do reload the kernel context in intel_gt_resume, repeating
> that action inside i915_gem_resume() as well is redundant.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

reviewed-by: Andi Shyti <andi.shyti@intel.com>

Thanks,
Andi

> ---
>  drivers/gpu/drm/i915/gem/i915_gem_pm.c | 30 --------------------------
>  1 file changed, 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pm.c b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> index e2ee9c04ece8..64dd04ae3d57 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_pm.c
> @@ -11,32 +11,6 @@
>  
>  #include "i915_drv.h"
>  
> -static bool switch_to_kernel_context_sync(struct intel_gt *gt)
> -{
> -	bool result = !intel_gt_is_wedged(gt);
> -
> -	if (intel_gt_wait_for_idle(gt, I915_GEM_IDLE_TIMEOUT) == -ETIME) {
> -		/* XXX hide warning from gem_eio */
> -		if (i915_modparams.reset) {
> -			dev_err(gt->i915->drm.dev,
> -				"Failed to idle engines, declaring wedged!\n");
> -			GEM_TRACE_DUMP();
> -		}
> -
> -		/*
> -		 * Forcibly cancel outstanding work and leave
> -		 * the gpu quiet.
> -		 */
> -		intel_gt_set_wedged(gt);
> -		result = false;
> -	}
> -
> -	if (intel_gt_pm_wait_for_idle(gt))
> -		result = false;
> -
> -	return result;
> -}
> -
>  static void user_forcewake(struct intel_gt *gt, bool suspend)
>  {
>  	int count = atomic_read(&gt->user_wakeref);
> @@ -158,10 +132,6 @@ void i915_gem_resume(struct drm_i915_private *i915)
>  	if (intel_gt_resume(&i915->gt))
>  		goto err_wedged;
>  
> -	/* Always reload a context for powersaving. */
> -	if (!switch_to_kernel_context_sync(&i915->gt))
> -		goto err_wedged;
> -
>  	user_forcewake(&i915->gt, false);
>  
>  out_unlock:
> -- 
> 2.24.0.rc1
> 
> _______________________________________________
> 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

  reply	other threads:[~2019-11-01 13:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-30 10:38 [PATCH 1/5] drm/i915/gt: Always track callers to intel_rps_mark_interactive() Chris Wilson
2019-10-30 10:38 ` [Intel-gfx] " Chris Wilson
2019-10-30 10:38 ` [PATCH 2/5] drm/i915/gt: Call intel_gt_sanitize() directly Chris Wilson
2019-10-30 10:38   ` [Intel-gfx] " Chris Wilson
2019-11-01 14:04   ` Andi Shyti
2019-11-01 14:04     ` [Intel-gfx] " Andi Shyti
2019-10-30 10:38 ` [PATCH 3/5] drm/i915/gem: Leave reloading kernel context on resume to GT Chris Wilson
2019-10-30 10:38   ` [Intel-gfx] " Chris Wilson
2019-11-01 13:47   ` Andi Shyti [this message]
2019-11-01 13:47     ` Andi Shyti
2019-10-30 10:38 ` [PATCH 4/5] drm/i915/gt: Move user_forcewake application " Chris Wilson
2019-10-30 10:38   ` [Intel-gfx] " Chris Wilson
2019-11-01 13:42   ` Andi Shyti
2019-11-01 13:42     ` [Intel-gfx] " Andi Shyti
2019-10-30 10:38 ` [PATCH 5/5] drm/i915: Defer rc6 shutdown to suspend_late Chris Wilson
2019-10-30 10:38   ` [Intel-gfx] " Chris Wilson
2019-10-30 23:57   ` Andi Shyti
2019-10-30 23:57     ` [Intel-gfx] " Andi Shyti
2019-10-30 11:06 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/gt: Always track callers to intel_rps_mark_interactive() Patchwork
2019-10-30 11:06   ` [Intel-gfx] " Patchwork
2019-10-30 11:30 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-30 11:30   ` [Intel-gfx] " Patchwork
2019-10-30 12:34 ` [PATCH 1/5] " Andi Shyti
2019-10-30 12:34   ` [Intel-gfx] " Andi Shyti
2019-10-31 11:55 ` ✓ Fi.CI.IGT: success for series starting with [1/5] " Patchwork
2019-10-31 11:55   ` [Intel-gfx] " 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=20191101134701.GB4215@intel.intel \
    --to=andi.shyti@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.