public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Lawrynowicz, Jacek" <jacek.lawrynowicz@intel.com>,
	Ben Widawsky <ben@bwidawsk.net>, Daniel Vetter <daniel@ffwll.ch>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: TIMESTAMP register
Date: Wed, 18 Apr 2012 08:35:55 +0100	[thread overview]
Message-ID: <1334734573_17140@CP5-2952> (raw)
In-Reply-To: <36D38C1F74839847A52A484C31F3E51A154A153C@IRSMSX101.ger.corp.intel.com>

On Wed, 18 Apr 2012 06:32:04 +0000, "Lawrynowicz, Jacek" <jacek.lawrynowicz@intel.com> wrote:
> I think that ioctl to get GPU timestamp and its resolution would be the best 
> approach.
> This ioctl won't be called very often so there's no need to sacrifice 
> simplicity for performance in this case.
> Using clock_gettime() sounds like trouble to me.
> How would you keep GPU and CPU time synchronized?
The bspec explicitly says that the GPU timestamp is adjusted for changes
in render frequency so that it is consistent. Similarly CLOCK_MONOTONIC.

> Is forcewakeup necessary in case of a register which is not affected by gfx 
> reset?

They are in the GT powerwell, so yes forcewake will be necessary for the
read not to return garbage.

The rule of thumb is to keep interfaces out of the kernel unless there
is a compelling reason otherwise. I think there is a good reason for a
ioctl(QUERY_COUNTER), but I can also see that you can implement
proof-of-principle code for this ARB timer entirely in userspace.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2012-04-18  7:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-17 19:12 TIMESTAMP register Lawrynowicz, Jacek
2012-04-17 19:39 ` Daniel Vetter
2012-04-17 20:34   ` Lawrynowicz, Jacek
2012-04-17 21:04     ` Daniel Vetter
2012-04-17 23:27       ` Ben Widawsky
2012-04-17 23:51         ` Chris Wilson
2012-04-18  6:32           ` Lawrynowicz, Jacek
2012-04-18  7:35             ` Chris Wilson [this message]
2012-04-18  7:53               ` Lawrynowicz, Jacek
2012-04-18  8:05                 ` Chris Wilson
2012-04-30 21:11           ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334734573_17140@CP5-2952 \
    --to=chris@chris-wilson.co.uk \
    --cc=ben@bwidawsk.net \
    --cc=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jacek.lawrynowicz@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox