From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 18/21] drm/i915: Split out i915_gem_object_move_to_ring() from execbuffer Date: Sat, 16 Apr 2011 15:18:46 +0100 Message-ID: References: <1302945465-32115-1-git-send-email-chris@chris-wilson.co.uk> <1302945465-32115-19-git-send-email-chris@chris-wilson.co.uk> <20110416135455.GG3498@viiv.ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" 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 43EF59E85D for ; Sat, 16 Apr 2011 07:18:49 -0700 (PDT) In-Reply-To: <20110416135455.GG3498@viiv.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: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Sat, 16 Apr 2011 15:54:56 +0200, Daniel Vetter wrote: > On Sat, Apr 16, 2011 at 10:17:42AM +0100, Chris Wilson wrote: > > As we can make use of the ability to insert semaphores to serialise > > accessing buffers between ring elsewhere, separate out the function from > > the execbuffer code and make it generic. > > Perhaps add a small note somewhere that move_to_ring now does the right > thing when to == NULL (falling back to wait_rendering). I've hunted around > a bit for that ... /** * Serialise an object between rings: wait for it to complete on the first * ring, before it can be used on the next. * * If the object is staying on the same ring, this is a no-op. * * If the object is not currently on a ring, this is a no-op. * * If the object is moving off a ring (i.e. to == NULL), then we wait for * rendering to complete entirely. * * The interesting case is when we move between two different rings. On * pre-SandyBridge hw, we have no choice but to wait until rendering has * finished. SandyBridge, however introduces the GPU semaphore which we * can use to cause one ring to wait upon the signal of another - avoiding * the CPU stall. * * We assume that the caller has emitted all required flushes. */ -Chris -- Chris Wilson, Intel Open Source Technology Centre