From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Stanislawski Subject: Re: [RFCv2 PATCH 5/9] v4l: vb2: add buffer exporting via dmabuf Date: Fri, 23 Mar 2012 12:50:55 +0100 Message-ID: <4F6C639F.9060703@samsung.com> References: <1331633827-503-1-git-send-email-t.stanislaws@samsung.com> <1331633827-503-6-git-send-email-t.stanislaws@samsung.com> <1604412.tb2UCcFAAP@avalon> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id AF36D9E872 for ; Fri, 23 Mar 2012 04:51:00 -0700 (PDT) Received: from euspt2 (mailout1.w1.samsung.com [210.118.77.11]) by mailout1.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTP id <0M1C006R368ADB@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 23 Mar 2012 11:50:34 +0000 (GMT) Received: from [106.116.48.223] by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPA id <0M1C00DID68VE9@spt2.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 23 Mar 2012 11:50:56 +0000 (GMT) In-reply-to: <1604412.tb2UCcFAAP@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: ben@bwidawsk.net, daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com, sakari.ailus@iki.fi, airlied@redhat.com, m.szyprowski@samsung.com List-Id: dri-devel@lists.freedesktop.org Hi Laurent, Thank you for you comments. On 03/22/2012 12:24 PM, Laurent Pinchart wrote: > Hi Tomasz, > > Thanks for the patch. > > On Tuesday 13 March 2012 11:17:03 Tomasz Stanislawski wrote: >> This patch adds extension to videobuf2-core. It allow to export a mmap >> buffer as a file descriptor. >> >> Signed-off-by: Tomasz Stanislawski >> Signed-off-by: Kyungmin Park >> --- >> drivers/media/video/videobuf2-core.c | 64 >> ++++++++++++++++++++++++++++++++++ include/media/videobuf2-core.h | >> 2 + >> 2 files changed, 66 insertions(+), 0 deletions(-) >> >> diff --git a/drivers/media/video/videobuf2-core.c >> b/drivers/media/video/videobuf2-core.c index e7df560..41c4bf8 100644 >> --- a/drivers/media/video/videobuf2-core.c >> +++ b/drivers/media/video/videobuf2-core.c >> @@ -1553,6 +1553,70 @@ int vb2_dqbuf(struct vb2_queue *q, struct v4l2_buffer >> *b, bool nonblocking) } >> EXPORT_SYMBOL_GPL(vb2_dqbuf); >> >> +static int __find_plane_by_offset(struct vb2_queue *q, unsigned long off, >> + unsigned int *_buffer, unsigned int *_plane); >> + > > Could you please move __find_plane_by_offset() up or move vb2_expbuf() down to > avoid the forward declaration ? The later might make more sense, you could > declare vb2_expbuf() right after vb2_mmap() (here and in videobuf2-core.h), > both functions perform similar tasks. > Ok. I will move it. I used the forward declaration to have only-plus patch while keeping all vb2_*buf functions together. Regards, Tomasz Stanislawski