From mboxrd@z Thu Jan 1 00:00:00 1970 From: "S, Deepak" Subject: Re: [PATCH 1/9] drm/i915: Clarify RC6 enabling Date: Fri, 07 Feb 2014 11:00:05 +0530 Message-ID: <52F46F5D.8040807@intel.com> References: <1390969547-1018-1-git-send-email-benjamin.widawsky@intel.com> <1390969547-1018-2-git-send-email-benjamin.widawsky@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTP id EFACFFB81D for ; Thu, 6 Feb 2014 21:30:08 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jan 29, 2014 at 9:55 AM, Ben Widawsky > > wrote: > > At one time, we though all future platforms would have the deeper RC6 > states. As it turned out, they killed it after Ivybridge, and began > using other means to achieve the power savings (the stuff we need to get > to PC7+). > > The enable function was left in a weird state of odd corner cases as a > result. Since the future is now, and we also have some insight into > what's currently the future, we have an opportunity to simplify, and > future proof the function. > > NOTE: VLV will be addressed in a subsequent patch. This patch was trying > not to change functionality. > > NOTE2: All callers sanitize the return value anyway, so this patch is > simply to have the code make a bit more sense. > > Signed-off-by: Ben Widawsky > > --- > drivers/gpu/drm/i915/intel_pm.c | 10 +++------- > 1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_pm.c > b/drivers/gpu/drm/i915/intel_pm.c > index 53d64bb..bcbdac2 100644 > --- a/drivers/gpu/drm/i915/intel_pm.c > +++ b/drivers/gpu/drm/i915/intel_pm.c > @@ -3161,14 +3161,10 @@ int intel_enable_rc6(const struct drm_device > *dev) > if (INTEL_INFO(dev)->gen == 5) > return 0; > > - if (IS_HASWELL(dev)) > - return INTEL_RC6_ENABLE; > - > - /* snb/ivb have more than one rc6 state. */ > - if (INTEL_INFO(dev)->gen == 6) > + if (IS_IVYBRIDGE(dev) || IS_VALLEYVIEW(dev)) > + return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE); > + else > return INTEL_RC6_ENABLE; > - > - return (INTEL_RC6_ENABLE | INTEL_RC6p_ENABLE); > } > > static void gen6_enable_rps_interrupts(struct drm_device *dev) > -- > 1.8.5.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > > Reviewed-by: Deepak S