From patchwork Fri Dec 16 01:24:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9477169 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 5028860827 for ; Fri, 16 Dec 2016 01:24:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F7FC28876 for ; Fri, 16 Dec 2016 01:24:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1450B288A7; Fri, 16 Dec 2016 01:24:07 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9435728876 for ; Fri, 16 Dec 2016 01:24:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757302AbcLPBYE (ORCPT ); Thu, 15 Dec 2016 20:24:04 -0500 Received: from galahad.ideasonboard.com ([185.26.127.97]:50169 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757064AbcLPBYA (ORCPT ); Thu, 15 Dec 2016 20:24:00 -0500 Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 4A50520877; Fri, 16 Dec 2016 02:23:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1481851424; bh=4mXjLnpR+PhVtbN9f+Qql/FtWgfcmUHhD7HV/07MvFo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=V2V+UnWwDtp884O25gmac1fdGruf3mg7M35FwkUPopM8Czre0dwHX+EgYpgTyNlVq f4o8oSjH0IjBqgUMHr2oI9pEKfnAJQxxdbB8eO16I9Ps4R3mNT0CJiUtAVo7onAgLB +b3EqrBArlR/zHtGe8fHtA9kuFWXPPfsEO81obP4= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Pawel Osciak , Marek Szyprowski , Kyungmin Park , Hans Verkuil , Sumit Semwal , Rob Clark , Daniel Vetter , Laura Abbott , Sakari Ailus Subject: [RFC v2 06/11] vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAP Date: Fri, 16 Dec 2016 03:24:20 +0200 Message-Id: <20161216012425.11179-7-laurent.pinchart+renesas@ideasonboard.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161216012425.11179-1-laurent.pinchart+renesas@ideasonboard.com> References: <20161216012425.11179-1-laurent.pinchart+renesas@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sakari Ailus 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 --- Changes since v1: - Fixed typo in documentation --- 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 bfad0588bb2b..15084b90e2d5 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