public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: make system freeze support depend on	CONFIG_ACPI_SLEEP
Date: Tue, 24 Jun 2014 16:54:13 +0300	[thread overview]
Message-ID: <87a9928lbu.fsf@intel.com> (raw)
In-Reply-To: <1403527562-28919-1-git-send-email-imre.deak@intel.com>

On Mon, 23 Jun 2014, Imre Deak <imre.deak@intel.com> wrote:
> To achieve further power savings during system freeze (aka connected
> standby, or s0ix) we have to send a PCI_D1 opregion notification. As
> the information about the state we're entering (system freeze,
> suspend to ram or suspend to disk) is only available through the ACPI
> subsystem, make this support depend on the relevant kconfig option.
> Things will still work if this option isn't set, albeit with less than
> optimial power saving.
>
> This also fixes a compile breakage when the option is not set introduced
> in
>
> commit e5747e3adcd67ae27105003ec99fb58cba180105
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Thu Jun 12 08:35:47 2014 -0700
>
>     drm/i915: send proper opregion notifications on suspend/resume
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index 7ae4e2a..43dc8f7 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -544,10 +544,11 @@ static int i915_drm_freeze(struct drm_device *dev)
>  
>  	i915_save_state(dev);
>  
> -	if (acpi_target_system_state() >= ACPI_STATE_S3)
> -		opregion_target_state = PCI_D3cold;
> -	else
> +	opregion_target_state = PCI_D3cold;
> +#if IS_ENABLED(CONFIG_ACPI_SLEEP)

Maybe this should just check for CONFIG_ACPI?

BR,
Jani.

> +	if (acpi_target_system_state() < ACPI_STATE_S3)
>  		opregion_target_state = PCI_D1;
> +#endif
>  	intel_opregion_notify_adapter(dev, opregion_target_state);
>  
>  	intel_uncore_forcewake_reset(dev, false);
> -- 
> 1.8.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

  reply	other threads:[~2014-06-24 13:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-23 12:46 [PATCH] drm/i915: make system freeze support depend on CONFIG_ACPI_SLEEP Imre Deak
2014-06-24 13:54 ` Jani Nikula [this message]
2014-06-24 14:37   ` Imre Deak
2014-06-24 14:53     ` Jani Nikula
2014-06-24 15:12       ` Imre Deak
2014-07-07 23:13         ` Rafael J. Wysocki
2014-07-07 23:39           ` Rafael J. Wysocki
2014-07-08  8:31             ` Daniel Vetter

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=87a9928lbu.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=imre.deak@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