From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH] [CFT] drm/i915: Only set the down rps limit when at the loweset frequency Date: Thu, 26 Jul 2012 10:23:46 +0100 Message-ID: <1343294631_1804@CP5-2952> References: <1343254184_355@CP5-2952> <1343294174-21811-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id 506359F74D for ; Thu, 26 Jul 2012 02:23:56 -0700 (PDT) In-Reply-To: <1343294174-21811-1-git-send-email-daniel.vetter@ffwll.ch> 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: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Thu, 26 Jul 2012 11:16:14 +0200, Daniel Vetter wrote: > The power docs say that when the gt leaves rc6, it is in the lowest > frequency and only about 25 usec later will switch to the frequency > selected in GEN6_RPNSWREQ. If the downclock limit expires in that > window and the down limit is set to the lowest possible frequency, the > hw will not send the down interrupt. Which leads to a too high gpu > clock and wasted power. > > Chris Wilson already worked on this with > > commit 7b9e0ae6da0a7eaf2680a1a788f08df123724f3b > Author: Chris Wilson > Date: Sat Apr 28 08:56:39 2012 +0100 > > drm/i915: Always update RPS interrupts thresholds along with > frequency > > but got the logic inverted: The current code set the down limit as > long as we haven't reached it. Instead of only once with reached the > lowest frequency. > > Note that we can't always set the downclock limit to 0, because > otherwise the hw will keep on bugging us with downclock request irqs > once the lowest level is reached. > > For similar reasons also always set the upclock limit, otherwise the > hw might poke us again with interrupts. > > v2: Chris Wilson noticed that the limit reg is also computed in > sanitize_pm. To avoid duplication, extract the code into a common > function. Aye, that's the patch I wish I wrote. Reviewed-by: Chris Wilson Though since I was clearly confused in the first place... -Chris -- Chris Wilson, Intel Open Source Technology Centre