From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: [PATCH 04/16] drm/i915: unify legacy S3 suspend and S4 freeze handlers Date: Thu, 11 Sep 2014 15:39:41 +0300 Message-ID: <1410439181.4879.20.camel@intelbox> References: <1410362229-814-1-git-send-email-imre.deak@intel.com> <1410362229-814-5-git-send-email-imre.deak@intel.com> <20140911090002.GG15520@phenom.ffwll.local> Reply-To: imre.deak@intel.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0442503120==" Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id 97FB46E090 for ; Thu, 11 Sep 2014 05:40:12 -0700 (PDT) In-Reply-To: <20140911090002.GG15520@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0442503120== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-3hGmlex4k6c3jNfXIDxL" --=-3hGmlex4k6c3jNfXIDxL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2014-09-11 at 11:00 +0200, Daniel Vetter wrote: > On Wed, Sep 10, 2014 at 06:16:57PM +0300, Imre Deak wrote: > > i915_suspend() is called from the DRM legacy S3 suspend/S4 freeze paths > > and the switcheroo suspend path. For switcheroo we only ever need to > > perform a full suspend (PM_EVENT_SUSPEND) and for the DRM legacy path > > we can handle the S4 freeze (PM_EVENT_FREEZE) the same way as S3 > > suspend. The only difference atm between suspend and freeze is that > > during freeze we don't disable the PCI device, but there is no reason > > why we can't do so. So unify the two cases to reduce complexity. > >=20 > > Note that for the DRM legacy case the thaw event is not handled, so > > we disable the display before creating the hibernation image and it > > won't get re-enabled until reboot. We could fix this leaving the > > display enabled for the image creation/writing (if we care enough > > about UMS), but this can be done as a follow-up. >=20 > UMS doesn't even get compiled any more, please don't try to fix it ;-) Ok. That reference above to UMS was only for a future possible fix, but then we can ignore it. There are some UMS (aka legacy s/r) related changes/fixes in this patchset too, but they are done alongside the switcheroo fixes, since in the end the two things are handled the same way. --Imre > My plan is to garbage-collect it all around when 3.17 is out the door. > -Daniel >=20 > >=20 > > Signed-off-by: Imre Deak > > --- > > drivers/gpu/drm/i915/i915_drv.c | 8 +++----- > > 1 file changed, 3 insertions(+), 5 deletions(-) > >=20 > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i91= 5_drv.c > > index 7fa34bd..bf4ff5e 100644 > > --- a/drivers/gpu/drm/i915/i915_drv.c > > +++ b/drivers/gpu/drm/i915/i915_drv.c > > @@ -648,11 +648,9 @@ int i915_suspend(struct drm_device *dev, pm_messag= e_t state) > > if (error) > > return error; > > =20 > > - if (state.event =3D=3D PM_EVENT_SUSPEND) { > > - /* Shut down the device */ > > - pci_disable_device(dev->pdev); > > - pci_set_power_state(dev->pdev, PCI_D3hot); > > - } > > + /* Shut down the device */ > > + pci_disable_device(dev->pdev); > > + pci_set_power_state(dev->pdev, PCI_D3hot); > > =20 > > return 0; > > } > > --=20 > > 1.8.4 > >=20 > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx >=20 --=-3hGmlex4k6c3jNfXIDxL 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) iQEcBAABAgAGBQJUEZgNAAoJEORIIAnNuWDFer0IANbuiJZ6xdePMbKKJQrJKbfF bL/Ec1ondAthRaFdLB9WA2S4WeeGm/tSOU7aRiP6BE3YYNzQ8D5RO/QwvpyNVh1U F+xWM/K3vV9Ma2/IIQPehd4CrV5XP+jUL641WznINeNs95NTsr7x6NmqV41rbvGo 51Jwae87qX79VktowkkWaVtc89Cc/Z/82ekNRRnMrD0RLreQmwohleyY+jfdQrIh gkwhEmj8pK6H61fCYK5msxCrjbArxRCTi82JMTt5X+q4i6HkUEx+Qb63iu8gNzRI kUXLs+hCK0k47llfme3CkyU3hp3fHhCkY+6P07SZQbVf6/K6dzNhbXeSK4pRhtY= =pcC5 -----END PGP SIGNATURE----- --=-3hGmlex4k6c3jNfXIDxL-- --===============0442503120== 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 --===============0442503120==--