From patchwork Fri Sep 11 11:50:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 7159941 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73FF4BEEC1 for ; Fri, 11 Sep 2015 11:53:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A73062084F for ; Fri, 11 Sep 2015 11:53:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B7E8120844 for ; Fri, 11 Sep 2015 11:53:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbbIKLxB (ORCPT ); Fri, 11 Sep 2015 07:53:01 -0400 Received: from mga02.intel.com ([134.134.136.20]:54509 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752152AbbIKLxA (ORCPT ); Fri, 11 Sep 2015 07:53:00 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 11 Sep 2015 04:53:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,511,1437462000"; d="scan'208";a="802381762" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga002.jf.intel.com with ESMTP; 11 Sep 2015 04:52:59 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 7BA3E21088; Fri, 11 Sep 2015 14:52:24 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 66CC720187; Fri, 11 Sep 2015 14:50:47 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, hverkuil@xs4all.nl, sumit.semwal@linaro.org, robdclark@gmail.com, daniel.vetter@ffwll.ch, labbott@redhat.com Subject: [RFC RESEND 06/11] vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAP Date: Fri, 11 Sep 2015 14:50:29 +0300 Message-Id: <1441972234-8643-7-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.0.231.g7484e3b In-Reply-To: <1441972234-8643-1-git-send-email-sakari.ailus@linux.intel.com> References: <1441972234-8643-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The alloc() and put() ops are for MMAP buffers only. Document it. Signed-off-by: Sakari Ailus Acked-by: Hans Verkuil Reviewed-by: Laurent Pinchart --- include/media/videobuf2-core.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index a825bd5..efc9a19 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -24,16 +24,16 @@ struct vb2_threadio_data; /** * struct vb2_mem_ops - memory handling/memory allocator operations - * @alloc: allocate video memory and, optionally, allocator private data, - * return NULL on failure or a pointer to allocator private, - * per-buffer data on success; the returned private structure - * will then be passed as buf_priv argument to other ops in this - * structure. Additional gfp_flags to use when allocating the - * are also passed to this operation. These flags are from the - * gfp_flags field of vb2_queue. - * @put: inform the allocator that the buffer will no longer be used; - * usually will result in the allocator freeing the buffer (if - * no other users of this buffer are present); the buf_priv + * @alloc: allocate video memory for an MMAP buffer and, optionally, + * allocator private data, return NULL on failure or a pointer + * to allocator private, per-buffer data on success; the returned + * private structure will then be passed as buf_priv argument to + * other ops in this structure. Additional gfp_flags to use when + * allocating the are also passed to this operation. These flags + * are from the gfp_flags field of vb2_queue. + * @put: inform the allocator that the MMAP buffer will no longer be + * used; usually will result in the allocator freeing the buffer + * (if no other users of this buffer are present); the buf_priv * argument is the allocator private per-buffer structure * previously returned from the alloc callback. * @get_userptr: acquire userspace memory for a hardware operation; used for