From: Daniel Vetter Subject: [PATCH] libdrm changes to allow exact fence usage accounting Date: Thu, 22 Apr 2010 22:48:45 +0200 Message-ID: <1271969327-16945-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 mail.ffwll.ch (cable-static-49-187.intergga.ch [157.161.49.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BAF39E760 for ; Thu, 22 Apr 2010 13:48:11 -0700 (PDT) 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: intel-gfx@lists.freedesktop.org Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org Hi all, Currently libdrm pessimistically assumes that every tiled bo needs a fence on 2nd and 3rd gen hw on _every_ aperture space checks. Especially with execbuf2 this results in needlessly small batchbuffers. My libdrm patch solves this problem by adding a function to libdrm to disable all fence accounting. Fence usage can then be checked in the client, where enough information is available to do it exactly. Comments highly welcome. And if you like this please merge it - I don't have commit rights on mesa/libdrm and I'd like someone else's explicit sign-off on interface changes, anyway. As an example I've also included a patch to convert xf86-video-intel to do its own fence accounting. This is just for illustration, that patch is in no way merge-ready - it's totally killing performance on some cairo traces. On gvim-0 it even hits the brick-wall and slows it down by a factor of ten :( Yours, Daniel Daniel Vetter (1): i830 uxa: track fence reg usage exactly src/i830.h | 13 ++++++- src/i830_batchbuffer.c | 2 + src/i830_driver.c | 32 ++++++++++++++++ src/i830_render.c | 12 +++--- src/i830_uxa.c | 95 +++++++++++++++++++++++++++++++++++++++++------- src/i915_render.c | 13 ++++--- 6 files changed, 139 insertions(+), 28 deletions(-)