From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/5] drm/i915: wrap up gt powersave enabling functions Date: Mon, 25 Jun 2012 09:20:11 +0200 Message-ID: <20120625072011.GA4708@phenom.ffwll.local> References: <1340548956-4097-1-git-send-email-daniel.vetter@ffwll.ch> <1340548956-4097-2-git-send-email-daniel.vetter@ffwll.ch> <4FE79CAC.2060109@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 091DD9E822 for ; Mon, 25 Jun 2012 00:18:39 -0700 (PDT) Received: by wgbdr1 with SMTP id dr1so2894154wgb.12 for ; Mon, 25 Jun 2012 00:18:39 -0700 (PDT) Content-Disposition: inline In-Reply-To: <4FE79CAC.2060109@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: eugeni.dodonov@intel.com Cc: Daniel Vetter , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Sun, Jun 24, 2012 at 08:03:08PM -0300, Eugeni Dodonov wrote: > On 06/24/2012 11:42 AM, Daniel Vetter wrote: > > ... instead of calling each one for each generation indiviudally. > > > > Notice that we've already managed to be inconsistent, the resume path > > is missing an IS_VLV check. As a nice benefit we can mark all the > > platform specific enable/disable functions as static and hide them in > > intel_pm.c > > > > Signed-Off-by: Daniel Vetter > > I have very similar patch for this as well (for HSW patches to come > somewhat later this week), you beat me on sending it by a few days. So: > > Reviewed-by: Eugeni Dodonov > > Just one (actually, two) bikesheds below. > > > +void intel_disable_gt_powersave(struct drm_device *dev) > > +{ > > + if (IS_IRONLAKE_M(dev)) > > + ironlake_disable_drps(dev); > > + if (INTEL_INFO(dev)->gen >= 6 && !IS_VALLEYVIEW(dev)) > > + gen6_disable_rps(dev); > > +} > > Just a minor bikeshed on those if loops. Wouldn't it be cleaner to > transform the 2nd if into 'else if'? I guess I'll leave that for your hsw patches ;-) -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48