From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH] drm/i915: make system freeze support depend on CONFIG_ACPI_SLEEP Date: Tue, 24 Jun 2014 18:12:06 +0300 Message-ID: <1403622726.24758.29.camel@intelbox> References: <1403527562-28919-1-git-send-email-imre.deak@intel.com> <87a9928lbu.fsf@intel.com> <1403620632.24758.26.camel@intelbox> <877g468ilc.fsf@intel.com> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0641958143==" Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 2CF5D6E132 for ; Tue, 24 Jun 2014 08:13:21 -0700 (PDT) In-Reply-To: <877g468ilc.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org, "Rafael J. Wysocki" List-Id: intel-gfx@lists.freedesktop.org --===============0641958143== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-TCcXvIoZnPa0dDG4Qvx0" --=-TCcXvIoZnPa0dDG4Qvx0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2014-06-24 at 17:53 +0300, Jani Nikula wrote: > On Tue, 24 Jun 2014, Imre Deak wrote: > > On Tue, 2014-06-24 at 16:54 +0300, Jani Nikula wrote: > >> On Mon, 23 Jun 2014, Imre Deak 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 ACP= I > >> > subsystem, make this support depend on the relevant kconfig option. > >> > Things will still work if this option isn't set, albeit with less th= an > >> > optimial power saving. > >> > > >> > This also fixes a compile breakage when the option is not set introd= uced > >> > in > >> > > >> > commit e5747e3adcd67ae27105003ec99fb58cba180105 > >> > Author: Jesse Barnes > >> > Date: Thu Jun 12 08:35:47 2014 -0700 > >> > > >> > drm/i915: send proper opregion notifications on suspend/resume > >> > > >> > Reported-by: Randy Dunlap > >> > Signed-off-by: Imre Deak > >> > --- > >> > 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) > >> > =20 > >> > i915_save_state(dev); > >> > =20 > >> > - if (acpi_target_system_state() >=3D ACPI_STATE_S3) > >> > - opregion_target_state =3D PCI_D3cold; > >> > - else > >> > + opregion_target_state =3D PCI_D3cold; > >> > +#if IS_ENABLED(CONFIG_ACPI_SLEEP) > >>=20 > >> Maybe this should just check for CONFIG_ACPI? > > > > I wanted to send the PCI_D1 signal only if we are sure that the target > > sleep state is S0ix (or S1/2) and fall back to the old behavior to send > > PCI_D3cold in all other cases. > > > > But you are right, it would make much sense if CONFIG_ACPI_SLEEP=3Dn th= e > > target state would be always S0ix. Rafael could you confirm this? >=20 > intel_opregion_notify_adapter() is a NOP for CONFIG_ACPI=3Dn anyway. Ok, but the question for me is what's the target sleep state in case of CONFIG_ACPI=3Dy and CONFIG_ACPI_SLEEP=3Dn. > And AFAICT CONFIG_ACPI=3Dy && CONFIG_ACPI_SLEEP=3Dn is broken. But it seems like a valid configuration. So it needs to be fixed separately. --Imre --=-TCcXvIoZnPa0dDG4Qvx0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQEcBAABAgAGBQJTqZVGAAoJEORIIAnNuWDFnTgH/0b19cHliNVRhNH2IIhaPmPZ A4jxN6cl0msScVP/SztsGNBi4nlY7s8lYinvkLpLEBKp1nWrW79dHgh0VMnMsgQE bddX2SP9Kmc11TVy2aQ20uAQzkc0zKSm07N3BWxIBjvtwqXcmb6glSchTNeredR+ CXK2pILHc+XB73zjHKxJmNBAefBZbf/Taz1M4HAImDZGuXkJTkf+y7BKikL6xXBo xJZaxGh2e0e/2w8/v9Fm/GA5KNW/h6JrxaQTanOneNTbUdq0rbqYdAjaTaKB5TEK 77vt1PQJtIjrJQf1Yrp2hs4pvznQLUTNxbVNIuTH8hDIqYYdPcm49lNAnntB7io= =YvB+ -----END PGP SIGNATURE----- --=-TCcXvIoZnPa0dDG4Qvx0-- --===============0641958143== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0641958143==--