public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: add register read IOCTL
Date: Wed, 18 Jul 2012 20:12:16 +0200	[thread overview]
Message-ID: <20120718181216.GL5348@phenom.ffwll.local> (raw)
In-Reply-To: <20120718102201.3d1b0b57@bwidawsk.net>

On Wed, Jul 18, 2012 at 10:22:01AM -0700, Ben Widawsky wrote:
> On Wed, 18 Jul 2012 10:14:46 -0700
> Eric Anholt <eric@anholt.net> wrote:
> 
> > Ben Widawsky <ben@bwidawsk.net> writes:
> > 
> > > The interface's immediate purpose is to do synchronous timestamp queries
> > > as required by GL_TIMESTAMP. The GPU has a register for reading the
> > > timestamp but because that would normally require root access through
> > > libpciaccess, the IOCTL can provide this service instead.
> > >
> > > Currently the implementation whitelists only the render ring timestamp
> > > register, because that is the only thing we need to expose at this time.
> > >
> > > v2: make size implicit based on the register offset
> > > Add a generation check
> > 
> > > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
> > > index 8cc7083..fbe7757 100644
> > > --- a/include/drm/i915_drm.h
> > > +++ b/include/drm/i915_drm.h
> > > @@ -203,6 +203,7 @@ typedef struct _drm_i915_sarea {
> > >  #define DRM_I915_GEM_WAIT	0x2c
> > >  #define DRM_I915_GEM_CONTEXT_CREATE	0x2d
> > >  #define DRM_I915_GEM_CONTEXT_DESTROY	0x2e
> > > +#define DRM_I915_REG_READ	0x30
> > 
> > Is 0x2f some other outstanding ioctl?
> >
> 
> I was saving it for some yet to be realized context ioctl. We can use
> 0x2f, I don't care. Daniel - feel free to change it or not as you
> please when/if you suck it in.

Patch queued for -next (with ioctl number 0x31, I've figure when I'll
change it I might as well avoid conflicts with the set_cacheing stuff).
Can you please adjust the i-g-t test and commit that one, too?

Thanks, Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-07-18 18:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-12  0:07 [PATCH] drm/i915: add register read IOCTL Ben Widawsky
2012-07-12  0:08 ` [PATCH] reg_read: basic register read ioctl test Ben Widawsky
2012-07-12  8:06   ` Daniel Vetter
2012-07-12  7:58 ` [PATCH] drm/i915: add register read IOCTL Daniel Vetter
2012-07-12  8:11   ` Chris Wilson
2012-07-12 18:01 ` [PATCH v2] " Ben Widawsky
2012-07-12 18:01   ` [PATCH] reg_read: basic register read ioctl test Ben Widawsky
2012-07-18 17:14   ` [PATCH v2] drm/i915: add register read IOCTL Eric Anholt
2012-07-18 17:22     ` Ben Widawsky
2012-07-18 18:12       ` Daniel Vetter [this message]
2012-07-12 19:42 ` [PATCH] " Eric Anholt
2012-07-12 20:08   ` Ben Widawsky

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=20120718181216.GL5348@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    /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