From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [RFC] [PATCH] i965: better ClientWaitSync Date: Thu, 7 Jun 2012 21:08:49 +0200 Message-ID: <20120607190848.GE4751@phenom.ffwll.local> References: <1339085562-7358-1-git-send-email-ben@bwidawsk.net> <1339085562-7358-2-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ey0-f177.google.com (mail-ey0-f177.google.com [209.85.215.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FAC7A0A4E for ; Thu, 7 Jun 2012 12:07:19 -0700 (PDT) Received: by eaaf11 with SMTP id f11so505010eaa.36 for ; Thu, 07 Jun 2012 12:07:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1339085562-7358-2-git-send-email-ben@bwidawsk.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: Ben Widawsky Cc: Mesa dev , Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Thu, Jun 07, 2012 at 09:12:42AM -0700, Ben Widawsky wrote: > Use the new libdrm functionality to actually do timed waits on the sync > object. > > This patch is missing the configure.ac update to check for the correct > libdrm supporting this function. As of now, libdrm has not yet received > the version bump. That's mostly why this patch is "RFC" > > Since intel_client_wait_sync function previously had no way of reporting > back the errors/timeouts, and I do not have a good test case anyway, > I've decided to not worry about this also. > > Signed-off-by: Ben Widawsky > --- > src/mesa/drivers/dri/intel/intel_syncobj.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/intel/intel_syncobj.c b/src/mesa/drivers/dri/intel/intel_syncobj.c > index b303ea8..4dd8b7b 100644 > --- a/src/mesa/drivers/dri/intel/intel_syncobj.c > +++ b/src/mesa/drivers/dri/intel/intel_syncobj.c > @@ -93,7 +93,7 @@ static void intel_client_wait_sync(struct gl_context *ctx, struct gl_sync_object > struct intel_sync_object *sync = (struct intel_sync_object *)s; > > if (sync->bo) { > - drm_intel_bo_wait_rendering(sync->bo); > + drm_intel_gem_bo_wait(sync->bo, timeout); If I've read the core mesa code correctly, StatusFlag = 1 means that the fence has actually signalled. I guess you need to add a check for the return value and do the below 3 lines only when the wait hasn't timed out (or failed for another stupid reason). -Daniel > s->StatusFlag = 1; > drm_intel_bo_unreference(sync->bo); > sync->bo = NULL; > -- > 1.7.10.3 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48