From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 1/3] drm/i915: Unbind the bo if the user requests a different alignment Date: Wed, 14 Apr 2010 12:23:37 +0200 Message-ID: <20100414102336.GA3440@viiv.ffwll.ch> References: <1270416921-25483-1-git-send-email-chris@chris-wilson.co.uk> <87ljcswq9t.fsf@pollan.anholt.net> <89khjo$f4ssom@orsmga002.jf.intel.com> <87aat6vrol.fsf@pollan.anholt.net> <89k304$i8icq3@orsmga001.jf.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.ffwll.ch (cable-static-49-187.intergga.ch [157.161.49.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 0D1F89E7F0 for ; Wed, 14 Apr 2010 03:23:23 -0700 (PDT) Content-Disposition: inline In-Reply-To: <89k304$i8icq3@orsmga001.jf.intel.com> 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: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Apr 14, 2010 at 10:29:24AM +0100, Chris Wilson wrote: > Darn. The current incarnation was literally for glyph masks, clip masks > and all the other short-lived write-once, immediately use as source > buffers within the same batch, and then discard. But there is nothing to > ensure that they exist only within a batch, and so they could well fall > foul of a17. I wonder if we can simply lazily rebind the bo at the point > of fence allocation rather than at tiling change. I am not sure if that > even makes sense yet. The other approach would seem to be to SET_TILING > on the last use within a batch and hope that doesn't cause a stall. Maybe > also a mechanism to mark the buffer contents as uninitialized so that if > we need to unbind, we can simply discard and allocate fresh pages? (An > extension to madvise, MADV_UNINITIALIZED or MADV_CLEAN?) At least currently, set_tiling always stalls when actually changing something (if the alignment doesn't match or if there's a wrong fence reg attached to the buffer). btw I think the libdrm bo caching has a bug wrt to this: It resets tiling parameters before inserting a bo into the cache, while the bo might still be busy. My first try at a patch a few weeks ago blew up tough, so I left it as-is. Comments? -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48