From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v2] drm/i915: add register read IOCTL Date: Wed, 18 Jul 2012 10:14:46 -0700 Message-ID: <87pq7txa7t.fsf@eliezer.anholt.net> References: <1342051656-32481-1-git-send-email-ben@bwidawsk.net> <1342116066-12164-1-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1995591266==" Return-path: In-Reply-To: <1342116066-12164-1-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: intel-gfx@lists.freedesktop.org Cc: Ben Widawsky List-Id: intel-gfx@lists.freedesktop.org --===============1995591266== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Ben Widawsky 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? Other than that, Reviewed-by: Eric Anholt Note: we have requests both by Arjan and by Valve for the functionality that this patch will allow. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlAG7wYACgkQHUdvYGzw6vcMZgCgi2qa8UIKuJSx78juvBg7q5iP YdIAn3fq+J2+2YLid8M3Pue4kMnLhrb1 =AUjs -----END PGP SIGNATURE----- --=-=-=-- --===============1995591266== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============1995591266==--