From patchwork Mon May 8 15:03:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 9716371 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E5D8A6035D for ; Mon, 8 May 2017 15:05:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA286205F6 for ; Mon, 8 May 2017 15:05:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CEB2A24151; Mon, 8 May 2017 15:05:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 602FA205F6 for ; Mon, 8 May 2017 15:05:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F20E6E264; Mon, 8 May 2017 15:05:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0F086E260 for ; Mon, 8 May 2017 15:05:13 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2017 08:05:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,309,1491289200"; d="scan'208";a="84085414" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga002.jf.intel.com with ESMTP; 08 May 2017 08:05:03 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 1303B21396; Mon, 8 May 2017 18:04:27 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 504A8200A5; Mon, 8 May 2017 18:03:32 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Subject: [RFC v4 14/18] vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAP Date: Mon, 8 May 2017 18:03:26 +0300 Message-Id: <1494255810-12672-15-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1494255810-12672-1-git-send-email-sakari.ailus@linux.intel.com> References: <1494255810-12672-1-git-send-email-sakari.ailus@linux.intel.com> Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, hverkuil@xs4all.nl, kyungmin.park@samsung.com, laurent.pinchart@ideasonboard.com, posciak@chromium.org, m.szyprowski@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 08f1d0e..dd67ae6 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -46,16 +46,16 @@ struct vb2_threadio_data; /** * struct vb2_mem_ops - memory handling/memory allocator operations - * @alloc: allocate video memory and, optionally, allocator private data, - * return ERR_PTR() 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 ERR_PTR() 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 memory 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_dmabuf: acquire userspace memory for a hardware operation; used for