From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 2/2] drm/i915: load a ring frequency scaling table Date: Tue, 28 Jun 2011 10:40:49 -0700 Message-ID: <20110628104049.1a71d315@jbarnes-desktop> References: <1308939194-3568-1-git-send-email-jbarnes@virtuousgeek.org> <1308939194-3568-2-git-send-email-jbarnes@virtuousgeek.org> <87iprruplj.fsf@eliezer.anholt.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from oproxy4-pub.bluehost.com (oproxy4-pub.bluehost.com [69.89.21.11]) by gabe.freedesktop.org (Postfix) with SMTP id BC7D79E880 for ; Tue, 28 Jun 2011 10:40:59 -0700 (PDT) In-Reply-To: <87iprruplj.fsf@eliezer.anholt.net> 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: Eric Anholt Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, 27 Jun 2011 10:54:48 -0700 Eric Anholt wrote: > > + for (gpu_freq = dev_priv->max_delay; gpu_freq >= dev_priv->min_delay; > > + gpu_freq--) { > > + int diff = dev_priv->max_delay - gpu_freq; > > + > > + /* > > + * For GPU frequencies less than 750MHz, just use the lowest > > + * ring freq. > > + */ > > + if (gpu_freq < min_freq) > > + ia_freq = 800; > > + else > > + ia_freq = max_ia_freq - ((diff * scaling_factor) / 2); > > + ia_freq = DIV_ROUND_CLOSEST(ia_freq, 100); > > If the GPU has a wide enough clock range (diff large) and the CPU is low > enough clocked (max_ia_freq low now), could we end up with the ia_freq < > 800, and would that be a bad thing? In other words, should > scaling_factor be non-constant? scaling_factor probably should be non-constant, but I don't know what function it should follow. ia_freq < 800 shouldn't break anything, but would probably result in sub-optimal GPU performance. OTOH it would save power... -- Jesse Barnes, Intel Open Source Technology Center