From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915: Limit calling mark-busy only for potential scanouts Date: Thu, 3 May 2012 16:34:07 +0200 Message-ID: <20120503143407.GH4983@phenom.ffwll.local> References: <1336044921-9666-1-git-send-email-chris@chris-wilson.co.uk> <1336044921-9666-2-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A2B09E95C for ; Thu, 3 May 2012 07:33:02 -0700 (PDT) Received: by werp11 with SMTP id p11so1397744wer.36 for ; Thu, 03 May 2012 07:33:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1336044921-9666-2-git-send-email-chris@chris-wilson.co.uk> 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, May 03, 2012 at 12:35:21PM +0100, Chris Wilson wrote: > The principle of intel_mark_busy() is that we want to spot the > transition of when the display engine is being used in order to bump > powersaving modes and increase display clocks. As such it is only > important when the display is changing, i.e. when rendering to the > scanout or other sprite/plane, and these are characterised by being > pinned. > > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_gem_execbuffer.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c > index 451efa3..10bb075 100644 > --- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c > +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c > @@ -979,7 +979,8 @@ i915_gem_execbuffer_move_to_active(struct list_head *objects, > obj->pending_gpu_write = true; > list_move_tail(&obj->gpu_write_list, > &ring->gpu_write_list); > - intel_mark_busy(ring->dev, obj); > + if (obj->pin_count) /* check for potential scanout */ > + intel_mark_busy(ring->dev, obj); intel_mark_busy also controls ips power sharing on ilk, so if we have loads of batchbuffers not rendering to the a framebuffer, this might hurt performance. Another thing I've noticed is that we fail to call intel_mark_busy on pageflips, and I presume running the display at a low refresh rate instead of the expected high when e.g. displaying videos could decently confuse userspace. Care to throw in that fix, too? -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48