From: Simon Farnsworth Subject: Half-complete kernel interface for waiting on CS completion Date: Fri, 3 Feb 2012 16:30:26 +0000 Message-ID: <1328286629-9833-1-git-send-email-simon.farnsworth@onelan.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from claranet-outbound-smtp06.uk.clara.net (claranet-outbound-smtp06.uk.clara.net [195.8.89.39]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FC349E730 for ; Fri, 3 Feb 2012 08:30:37 -0800 (PST) Received: from 110.100.155.90.in-addr.arpa ([90.155.100.110]:55630 helo=f12simon.office.onelan.co.uk) by relay06.mail.eu.clara.net (relay.clara.net [213.253.3.46]:1025) with esmtpa (authdaemon_plain:simon.farnsworth@onelan.co.uk) id 1RtM1z-0006s2-Ju for dri-devel@lists.freedesktop.org (return-path ); Fri, 03 Feb 2012 16:30:35 +0000 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org Hello, I've run out of time to work on this, as I have a fix (the unused BO trick) that's good enough for my needs. I've taken Christian's patches (1 and 2 of this series) and added the obvious ioctl interface on top, enabling userspace to wait for a kernel fence *if* the kernel gives it some opaque tokens (currently the kernel ring and sequence number). I got stuck trying to work out how to pass those tokens back out of the CS ioctl. Return value isn't enough, as I have 96 bits of information in my token (32-bit ring number, 64-bit seqno), so I experimented with adding an extra chunk that the CS ioctl writes. However, I hit pain trying to work out what to do when writing to that extra chunk fails - the CS has already been submitted to hardware here, so returning an error is unfriendly. As I've got the fix I need (Mesa-dev message "[PATCH] r600g: Use a fake reloc to sleep for fences"), I can't really justify continuing to work on this, so I'm putting out what I've got, complete with known problems, in case someone else gets interested. -- Simon Farnsworth Software Engineer ONELAN Limited http://www.onelan.com/