From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Widawsky Subject: Re: [PATCH 09/10] drm/i915: wait render timeout ioctl Date: Mon, 23 Apr 2012 08:28:35 -0700 Message-ID: <20120423082835.65dd9ee0@bwidawsk.net> References: <1334971412-4826-1-git-send-email-ben@bwidawsk.net> <1334971412-4826-10-git-send-email-ben@bwidawsk.net> <20120422124513.GE4723@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 8DEA29E9AB for ; Mon, 23 Apr 2012 08:28:43 -0700 (PDT) In-Reply-To: <20120422124513.GE4723@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 Sun, 22 Apr 2012 14:45:13 +0200 Daniel Vetter wrote: > On Fri, Apr 20, 2012 at 06:23:31PM -0700, Ben Widawsky wrote: > > Finally we can use the new timed seqno waiting function to allow > > userspace to wait on a request with a timeout. This implements that > > interface. > > > > The new ioctl is very straight forward, there is a flags field which I > > envision may be useful for various flush permutations of the command. > > > > Signed-off-by: Ben Widawsky > > --- > > [cut] > > > diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h > > index f3f8224..e365ab9 100644 > > --- a/include/drm/i915_drm.h > > +++ b/include/drm/i915_drm.h > > @@ -200,6 +200,7 @@ typedef struct _drm_i915_sarea { > > #define DRM_I915_GEM_EXECBUFFER2 0x29 > > #define DRM_I915_GET_SPRITE_COLORKEY 0x2a > > #define DRM_I915_SET_SPRITE_COLORKEY 0x2b > > +#define DRM_I915_GEM_WAIT 0x2c > > > > #define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) > > #define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) > > @@ -243,6 +244,7 @@ typedef struct _drm_i915_sarea { > > #define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs) > > #define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) > > #define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) > > +#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) > > > > /* Allow drivers to submit batchbuffers directly to hardware, relying > > * on the security mechanisms provided by hardware. > > @@ -886,4 +888,11 @@ struct drm_intel_sprite_colorkey { > > __u32 flags; > > }; > > > > +struct drm_i915_gem_wait { > > + __u32 bo_handle; > > + __u64 timeout_ns; > > + __u32 flags; > > + __u32 rsvd; > > +}; > > struct layout gone wrong, you miss a __u32 before the __u64. > -Daniel Got it, thanks. I'm just planning to drop the rsvd field actually.