From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Subject: Re: [Linaro-mm-sig] [RFCv2 PATCH 4/9] v4l: add buffer exporting via dmabuf Date: Thu, 22 Mar 2012 15:43:25 +0100 Message-ID: <8330623.7CgU4IWk4B@avalon> References: <1331633827-503-1-git-send-email-t.stanislaws@samsung.com> <2231087.KvxzldpGDu@avalon> <20120322142608.GA21024@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [95.142.166.194]) by gabe.freedesktop.org (Postfix) with ESMTP id 1296E9E789 for ; Thu, 22 Mar 2012 07:42:54 -0700 (PDT) In-Reply-To: <20120322142608.GA21024@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Tomasz Stanislawski , Subash Patel , dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com, sakari.ailus@iki.fi, airlied@redhat.com List-Id: dri-devel@lists.freedesktop.org On Thursday 22 March 2012 15:26:08 Daniel Vetter wrote: > On Thu, Mar 22, 2012 at 03:07:18PM +0100, Laurent Pinchart wrote: > > > >> + * Contains data used for exporting a video buffer as DMABUF file > > > >> + * descriptor. Uses the same 'cookie' as mmap() syscall. All > > > >> reserved > > > >> fields > > > >> + * must be set to zero. > > > >> + */ > > > >> +struct v4l2_exportbuffer { > > > >> + __u32 fd; > > > >> + __u32 reserved0; > > > > > > > > Why is there a reserved field here ? > > > > > > +1 to Laurent. Any particular need for reserved0 and reserved[13] below? > > > I think one void user pointer is sufficient even for future need. > > > > I'd rather have more than one void user pointer, just in case. A couple of > > bytes won't be expensive, and they will save lots of hassle in the future > > if we need to add a couple of fields. I was just wondering why there was > > a reserved field between fd and mem_offset. > > Quick comment from a random bystander: __u32 is not big enough for a void* > pointer from userspace ... That's why I'm happy with 14 reserved __u32. That should be enough for userspace pointers in the foreseable future :-) -- Regards, Laurent Pinchart