From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 02/16] drm/i915: remove dead code from legacy suspend handler Date: Tue, 21 Oct 2014 14:56:46 +0300 Message-ID: <20141021115646.GC4284@intel.com> References: <1410362229-814-1-git-send-email-imre.deak@intel.com> <1410362229-814-3-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id DFD188986D for ; Tue, 21 Oct 2014 04:56:49 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1410362229-814-3-git-send-email-imre.deak@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Imre Deak Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Sep 10, 2014 at 06:16:55PM +0300, Imre Deak wrote: > The legacy DRM suspend logic (effective in UMS) doesn't handle any S4 thaw > events so we don't need to care about it either. Only S3 suspend and S4 > freeze events are handled. Leave an assert behind to be sure. > = > Signed-off-by: Imre Deak Looks correct. Although it the lack of .thaw() means there's no error recovery when things go south. But this is UMS so who cares. Reviewed-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/i915/i915_drv.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > = > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_= drv.c > index 2365875..f36e2d2 100644 > --- a/drivers/gpu/drm/i915/i915_drv.c > +++ b/drivers/gpu/drm/i915/i915_drv.c > @@ -618,9 +618,9 @@ int i915_suspend(struct drm_device *dev, pm_message_t= state) > return -ENODEV; > } > = > - if (state.event =3D=3D PM_EVENT_PRETHAW) > - return 0; > - > + if (WARN_ON_ONCE(state.event !=3D PM_EVENT_SUSPEND && > + state.event !=3D PM_EVENT_FREEZE)) > + return -EINVAL; > = > if (dev->switch_power_state =3D=3D DRM_SWITCH_POWER_OFF) > return 0; > -- = > 1.8.4 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC