public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/8] drm/i915/vlv/chv: Move resume_prepare() after uncore_early_sanitize()
Date: Mon, 18 May 2015 22:30:14 +0300	[thread overview]
Message-ID: <1431977414.8397.14.camel@ideak-mobl> (raw)
In-Reply-To: <1431975235-1037-3-git-send-email-damien.lespiau@intel.com>

On Mon, 2015-05-18 at 19:53 +0100, Damien Lespiau wrote:
> It's probably a good idea to run the uncore sanitize function before
> vlv_resume_prepare() writes registers.
> 
> At the same time, moving the debug message makes it dispay something if
> skl_resume_prepare ever returns non 0. Oh, and re-order the if/else
> ladder to have some semblence of ordering.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 5cc57f2..5a9399c 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -808,17 +808,17 @@ static int i915_drm_resume_early(struct drm_device *dev)
>  
>  	pci_set_master(dev->pdev);
>  
> -	if (IS_VALLEYVIEW(dev_priv))
> -		ret = vlv_resume_prepare(dev_priv, false);
> -	if (ret)
> -		DRM_ERROR("Resume prepare failed: %d,Continuing resume\n", ret);
> -
>  	intel_uncore_early_sanitize(dev, true);
>  
> -	if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
> -		hsw_disable_pc8(dev_priv);
> -	else if (IS_SKYLAKE(dev_priv))
> +	if (IS_SKYLAKE(dev_priv))
>  		ret = skl_resume_prepare(dev_priv);
> +	else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv))
> +		hsw_disable_pc8(dev_priv);
> +	else if (IS_VALLEYVIEW(dev_priv))
> +		ret = vlv_resume_prepare(dev_priv, false);
> +
> +	if (ret)
> +		DRM_ERROR("Resume prepare failed: %d,Continuing resume\n", ret);

vlv_resume_prepare() needs to run before intel_uncore_early_sanitize(),
as the former includes the steps to wake the HW from RC6 for the first
time after suspend. At the time intel_resume_prepare() was removed, I
suggested to instead split out the part from vlv_resume_prepare() that
needs to be done early into a separate function, so that would be one
way to go about this.

>  
>  	intel_uncore_sanitize(dev);
>  	intel_power_domains_init_hw(dev_priv);


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

  reply	other threads:[~2015-05-18 19:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 18:53 [PATCH 0/8] SKL S3, take 2 Damien Lespiau
2015-05-18 18:53 ` [PATCH 1/8] drm/i915: Fix 'suspedn' typo Damien Lespiau
2015-05-18 18:53 ` [PATCH 2/8] drm/i915/vlv/chv: Move resume_prepare() after uncore_early_sanitize() Damien Lespiau
2015-05-18 19:30   ` Imre Deak [this message]
2015-05-19 10:44     ` Damien Lespiau
2015-05-18 18:53 ` [PATCH 3/8] drm/i915/bxt: Also add bxt_resume_prepare() to the S3/S4 path Damien Lespiau
2015-05-18 19:50   ` Imre Deak
2015-05-18 18:53 ` [PATCH 4/8] drm/i915: Extract a common intel_resume_prepare() function Damien Lespiau
2015-05-18 18:53 ` [PATCH 5/8] drm/i915: Add a space after ', ' and don't capitalize mid-sentence Damien Lespiau
2015-05-18 18:53 ` [PATCH 6/8] drm/i915: Kill the dev variable in intel_suspend_complete() Damien Lespiau
2015-05-18 18:53 ` [PATCH 7/8] drm/i915: Store boot CDCLK in dev_priv on DDI platforms Damien Lespiau
2015-05-18 18:53 ` [PATCH 8/8] drm/i915/skl: Deinit/init the display at suspend/resume Damien Lespiau
2015-05-19 21:44   ` shuang.he

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=1431977414.8397.14.camel@ideak-mobl \
    --to=imre.deak@intel.com \
    --cc=damien.lespiau@intel.com \
    --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