From patchwork Tue May 12 13:07:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 23243 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4CDII5o018868 for ; Tue, 12 May 2009 13:18:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752452AbZELNSN (ORCPT ); Tue, 12 May 2009 09:18:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752539AbZELNSN (ORCPT ); Tue, 12 May 2009 09:18:13 -0400 Received: from mail-pz0-f115.google.com ([209.85.222.115]:47527 "EHLO mail-pz0-f115.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752452AbZELNSM (ORCPT ); Tue, 12 May 2009 09:18:12 -0400 X-Greylist: delayed 477 seconds by postgrey-1.27 at vger.kernel.org; Tue, 12 May 2009 09:18:12 EDT Received: by pzk13 with SMTP id 13so108991pzk.33 for ; Tue, 12 May 2009 06:18:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:date:message-id :subject; bh=Fd28u/ir7y4I6ihdEz6zuS/EGZq2IUjJFBX+Yr/prL0=; b=ZOMP7YKHYwUYUt7F8XT51DSqsnuvLpouzrVHKlG9CoXDEBlzKKAjMRCUl2fJ7W6IfC ry+YmmRj/6xBmCn1hBuaoAb0TM9Hp90MxQDJ+dXmkcJGzbrO4qKSjNKPbVotW1osjWmG iwQ8Atiurh/rXqqJiH4UbBeGxLo/UbyKR/lAU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:date:message-id:subject; b=Vm/eo7FqEaiI3E3ToeyU8Yovfpfw5PjcUKc8b9+qRiPCP2VsytpYO9t3wj66Nu+4ck yAWaYFf133NN3Fkuj2VqRGOW4rtwYPe9gzJeAWskmCJA7cIOlLXGEF7C0RA9TmvnO+GB 5pkSaQmVWL+rtBqff3kveDEU8D+xgEElh3zCI= Received: by 10.114.113.6 with SMTP id l6mr2162958wac.204.1242133815665; Tue, 12 May 2009 06:10:15 -0700 (PDT) Received: from rx1.opensource.se (210.5.32.202.bf.2iij.net [202.32.5.210]) by mx.google.com with ESMTPS id z15sm21444629pod.21.2009.05.12.06.10.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 May 2009 06:10:11 -0700 (PDT) From: Magnus Damm To: linux-media@vger.kernel.org Cc: mchehab@infradead.org, hverkuil@xs4all.nl, linux-mm@kvack.org, lethal@linux-sh.org, hannes@cmpxchg.org, Magnus Damm , akpm@linux-foundation.org Date: Tue, 12 May 2009 22:07:19 +0900 Message-Id: <20090512130719.7857.85985.sendpatchset@rx1.opensource.se> Subject: [PATCH] videobuf-dma-contig: zero copy USERPTR V3 comments Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Magnus Damm This patch adds function descriptions to V3 of the V4L2 videobuf-dma-contig USERPTR zero copy patch. Signed-off-by: Magnus Damm --- drivers/media/video/videobuf-dma-contig.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0005/drivers/media/video/videobuf-dma-contig.c +++ work/drivers/media/video/videobuf-dma-contig.c 2009-05-12 21:14:40.000000000 +0900 @@ -110,6 +110,12 @@ static struct vm_operations_struct video .close = videobuf_vm_close, }; +/** + * videobuf_dma_contig_user_put() - reset pointer to user space buffer + * @mem: per-buffer private videobuf-dma-contig data + * + * This function resets the user space pointer + */ static void videobuf_dma_contig_user_put(struct videobuf_dma_contig_memory *mem) { mem->is_userptr = 0; @@ -117,6 +123,16 @@ static void videobuf_dma_contig_user_put mem->size = 0; } +/** + * videobuf_dma_contig_user_get() - setup user space memory pointer + * @mem: per-buffer private videobuf-dma-contig data + * @vb: video buffer to map + * + * This function validates and sets up a pointer to user space memory. + * Only physically contiguous pfn-mapped memory is accepted. + * + * Returns 0 if successful. + */ static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem, struct videobuf_buffer *vb) {