From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/1] drm/i915: Adding Gfx Clock, Wake and Gunit save/restore logic in PM suspend/resume paths. Date: Fri, 8 Aug 2014 09:42:45 +0200 Message-ID: <20140808074245.GL8727@phenom.ffwll.local> References: <20140728185140.GI4747@phenom.ffwll.local> <1406876761-15814-1-git-send-email-sagar.a.kamble@intel.com> <20140804080710.GI8727@phenom.ffwll.local> <1407480764.14962.2.camel@sagar-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f176.google.com (mail-we0-f176.google.com [74.125.82.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C0D76E80E for ; Fri, 8 Aug 2014 00:42:34 -0700 (PDT) Received: by mail-we0-f176.google.com with SMTP id q58so5180882wes.35 for ; Fri, 08 Aug 2014 00:42:33 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1407480764.14962.2.camel@sagar-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Sagar Arun Kamble Cc: paulo.r.zanoni@intel.com, daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org, "Goel, Akash" List-Id: intel-gfx@lists.freedesktop.org On Fri, Aug 08, 2014 at 12:22:44PM +0530, Sagar Arun Kamble wrote: > Hi Daniel, > On Mon, 2014-08-04 at 10:07 +0200, Daniel Vetter wrote: > > On Fri, Aug 01, 2014 at 12:34:56PM +0530, sagar.a.kamble@intel.com wrote: > > > From: Sagar Kamble > > > @@ -562,7 +567,12 @@ static int i915_drm_freeze(struct drm_device *dev) > > > > > > intel_display_set_init_power(dev_priv, false); > > > > > > - return 0; > > > + /* Save Gunit State and clear wake - Need to make sure > > > + * changes in vlv_runtime_suspend path don't impact this path */ > > > + if (IS_VALLEYVIEW(dev)) > > > + ret = vlv_runtime_suspend(dev_priv); > > > > Maybe I wasn't clear, but I absolutely don't want any IS_VLV additions to > > core resume/thaw code. This should be shovelled into the runtime pm > > handling code, which should be reused in the suspend/resume code. > This piece of code does not fit into any of the power well get/put path. > Its specific sequence that need to be followed in VLV when Gunit gets > power gated. So we have to keep this IS_VLV related functionality in > both runtime and pm suspend/resume. Well we support S0ix now. Which means our system suspend/resume code actually calls into the runtime pm code. So either that design is broken (and we need to fix this) or something else is amiss. Or we don't need this code any more. But duplicating it is not the right approach. And yeah the power domain stuff might not be the right place, I've just used that as a place-holder for all the runtime pm code we have. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch