From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: TIMESTAMP register Date: Tue, 17 Apr 2012 16:27:45 -0700 Message-ID: <20120417162745.229b7608@bwidawsk.net> References: <36D38C1F74839847A52A484C31F3E51A154A0E59@IRSMSX101.ger.corp.intel.com> <20120417193943.GR4104@phenom.ffwll.local> <36D38C1F74839847A52A484C31F3E51A154A12B9@IRSMSX101.ger.corp.intel.com> <20120417210418.GS4104@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from cloud01.chad-versace.us (184-106-247-128.static.cloud-ips.com [184.106.247.128]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D4919E77F for ; Tue, 17 Apr 2012 16:27:54 -0700 (PDT) In-Reply-To: <20120417210418.GS4104@phenom.ffwll.local> 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 Tue, 17 Apr 2012 23:04:18 +0200 Daniel Vetter wrote: > On Tue, Apr 17, 2012 at 08:34:11PM +0000, Lawrynowicz, Jacek wrote: > > ARB_timer_query allows client read TIMESTAMP both asynchronously and synchronously. > > The former can be implemented as you said but the latter requires support from the KMD. > > This must be a simple MMIO read as this is the only way to report "current" GPU time. > > Implementing synchronous TIMESTAMP query using pipe control would render the third example from ARB_timer_query spec useless. > > Ok, I've looked like a dofus again, but now I've read the spec and we > indeed seem to need a synchronous readout of the TIMESTAMP register. I > guess a new register will do, together with some fixed-point integer that > tells userspace how to convert it to nanoseconds. > -Daniel I've not read the spec, but synchronous and "current" doesn't mean the exact same thing to me. I assume the spec doesn't allow getting the value in a batch and then just waiting for rendering to complete? If we go with the register read approach, I vote sysfs.