All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Sagar Arun Kamble <sagar.a.kamble@intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/i915: Move i915_gem_restore_fences to i915_gem_resume
Date: Fri, 29 Sep 2017 10:08:31 +0300	[thread overview]
Message-ID: <1506668911.4729.4.camel@linux.intel.com> (raw)
In-Reply-To: <1506661116-12106-1-git-send-email-sagar.a.kamble@intel.com>

On Fri, 2017-09-29 at 10:28 +0530, Sagar Arun Kamble wrote:
> i915_gem_restore_fences is GEM resumption task hence it is moved to
> i915_gem_resume from i915_restore_state.
> 
> Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Yep, this is a more appropriate place. Locality to the display resume
was probably reason for the odd placement previously (it was added to
fix a bug of fences not being there for display resume).

Do we want to comment this requirement between i915_gem_resume and
i915_restore_state? Chris?

Anyway,

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Regards, Joonas

PS. My guess seems to be correct according to git blame (skipping one
rename in between) info.

> ---
>  drivers/gpu/drm/i915/i915_gem.c     | 1 +
>  drivers/gpu/drm/i915/i915_suspend.c | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 73eeb6b..ab8c694 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4595,6 +4595,7 @@ void i915_gem_resume(struct drm_i915_private *dev_priv)
>  
>  	mutex_lock(&dev->struct_mutex);
>  	i915_gem_restore_gtt_mappings(dev_priv);
> +	i915_gem_restore_fences(dev_priv);
>  
>  	/* As we didn't flush the kernel context before suspend, we cannot
>  	 * guarantee that the context image is complete. So let's just reset
> diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
> index 5c86925a..8f3aa4d 100644
> --- a/drivers/gpu/drm/i915/i915_suspend.c
> +++ b/drivers/gpu/drm/i915/i915_suspend.c
> @@ -108,8 +108,6 @@ int i915_restore_state(struct drm_i915_private *dev_priv)
>  
>  	mutex_lock(&dev_priv->drm.struct_mutex);
>  
> -	i915_gem_restore_fences(dev_priv);
> -
>  	if (IS_GEN4(dev_priv))
>  		pci_write_config_word(pdev, GCDGMBUS,
>  				      dev_priv->regfile.saveGCDGMBUS);
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-09-29  7:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29  4:58 [PATCH 1/1] drm/i915: Move i915_gem_restore_fences to i915_gem_resume Sagar Arun Kamble
2017-09-29  5:20 ` ✗ Fi.CI.BAT: warning for series starting with [1/1] " Patchwork
2017-09-29  6:52 ` [PATCH 1/1] " Michal Wajdeczko
2017-09-29  7:08 ` Joonas Lahtinen [this message]
2017-09-29 10:34   ` 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=1506668911.4729.4.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sagar.a.kamble@intel.com \
    /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.