From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [Linaro-mm-sig] [RFCv2 PATCH 4/9] v4l: add buffer exporting via dmabuf Date: Thu, 22 Mar 2012 15:26:08 +0100 Message-ID: <20120322142608.GA21024@phenom.ffwll.local> References: <1331633827-503-1-git-send-email-t.stanislaws@samsung.com> <2646632.PEZlYAVAnk@avalon> <4F6B2FAD.50900@gmail.com> <2231087.KvxzldpGDu@avalon> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F777A0E7D for ; Thu, 22 Mar 2012 07:29:02 -0700 (PDT) Received: by wgbdr12 with SMTP id dr12so1129362wgb.12 for ; Thu, 22 Mar 2012 07:29:01 -0700 (PDT) Content-Disposition: inline In-Reply-To: <2231087.KvxzldpGDu@avalon> 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: Laurent Pinchart 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 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 ... -Daniel -- Daniel Vetter Mail: daniel@ffwll.ch Mobile: +41 (0)79 365 57 48