From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [RFC] libdrm_intel: Add support for userptr objects Date: Mon, 12 May 2014 18:00:37 +0200 Message-ID: <20140512160037.GG25056@phenom.ffwll.local> References: <1393432901-31951-1-git-send-email-tvrtko.ursulin@linux.intel.com> <20140509001024.GB24078@bwidawsk.net> <20140509053011.GE3443@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by gabe.freedesktop.org (Postfix) with ESMTP id D28C36E902 for ; Mon, 12 May 2014 09:00:41 -0700 (PDT) Received: by mail-we0-f178.google.com with SMTP id u56so6937141wes.23 for ; Mon, 12 May 2014 09:00:40 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140509053011.GE3443@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Ben Widawsky , Tvrtko Ursulin , Intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, May 09, 2014 at 06:30:11AM +0100, Chris Wilson wrote: > On Thu, May 08, 2014 at 05:10:24PM -0700, Ben Widawsky wrote: > > On Wed, Feb 26, 2014 at 04:41:41PM +0000, Tvrtko Ursulin wrote: > > > +struct drm_i915_gem_userptr { > > > + __u64 user_ptr; > > > + __u64 user_size; > > > + __u32 flags; > > > +#define I915_USERPTR_READ_ONLY 0x1 > > > +#define I915_USERPTR_UNSYNCHRONIZED 0x80000000 > > > + /** > > > + * Returned handle for the object. > > > + * > > > + * Object handles are nonzero. > > > + */ > > > + __u32 handle; > > > +}; > > > + > > > > Oh yeah. I want a ctx_id here as well. Chris, any objection to adding > > this? > > What for? bo are file-scoped not context-scoped. I think what Ben actually wants is a ctx_id in the soft-pin ioctl. Makes his mirrored ppgtt POC a 2 ioctl thing, but the resulting orthogonality of interfaces is imo something much to be preferred. Since we still need real bos for scanout targets and similar, and I'm going to rip everyone's head off if we do that by shmem-mapping+userptr ;-) -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch