From patchwork Thu Mar 8 12:26:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 47764 X-Patchwork-Delegate: hverkuil@xs4all.nl Received: from vger.kernel.org ([209.132.180.67]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etue2-0005pw-8D; Thu, 08 Mar 2018 12:27:38 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755544AbeCHM0y (ORCPT + 1 other); Thu, 8 Mar 2018 07:26:54 -0500 Received: from srv-hp10-72.netsons.net ([94.141.22.72]:54704 "EHLO srv-hp10-72.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751271AbeCHM0w (ORCPT ); Thu, 8 Mar 2018 07:26:52 -0500 Received: from [109.168.11.45] (port=53502 helo=pc-ceresoli.dev.aim) by srv-hp10.netsons.net with esmtpa (Exim 4.89_1) (envelope-from ) id 1etudE-003XXy-6l; Thu, 08 Mar 2018 13:26:48 +0100 From: Luca Ceresoli To: linux-media@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Luca Ceresoli , Laurent Pinchart , Pawel Osciak , Marek Szyprowski , Kyungmin Park , Mauro Carvalho Chehab Subject: [PATCH v2 1/3] media: vb2-core: vb2_buffer_done: consolidate docs Date: Thu, 8 Mar 2018 13:26:20 +0100 Message-Id: <1520511982-985-1-git-send-email-luca@lucaceresoli.net> X-Mailer: git-send-email 2.7.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - srv-hp10.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: srv-hp10.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: srv-hp10.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Documentation about what start_streaming() should do on failure are scattered in two places and mostly duplicated, so consolidate them in one of the two places. Signed-off-by: Luca Ceresoli Cc: Laurent Pinchart Cc: Pawel Osciak Cc: Marek Szyprowski Cc: Kyungmin Park Cc: Mauro Carvalho Chehab --- Changes v1 -> v2: none. --- include/media/videobuf2-core.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 5b6c541e4e1b..f1a479060f9e 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -602,9 +602,7 @@ void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no); * Either %VB2_BUF_STATE_DONE if the operation finished * successfully, %VB2_BUF_STATE_ERROR if the operation finished * with an error or %VB2_BUF_STATE_QUEUED if the driver wants to - * requeue buffers. If start_streaming fails then it should return - * buffers with state %VB2_BUF_STATE_QUEUED to put them back into - * the queue. + * requeue buffers. * * This function should be called by the driver after a hardware operation on * a buffer is finished and the buffer may be returned to userspace. The driver @@ -613,9 +611,9 @@ void *vb2_plane_cookie(struct vb2_buffer *vb, unsigned int plane_no); * to the driver by &vb2_ops->buf_queue can be passed to this function. * * While streaming a buffer can only be returned in state DONE or ERROR. - * The start_streaming op can also return them in case the DMA engine cannot - * be started for some reason. In that case the buffers should be returned with - * state QUEUED. + * The &vb2_ops->start_streaming op can also return them in case the DMA engine + * cannot be started for some reason. In that case the buffers should be + * returned with state QUEUED to put them back into the queue. */ void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state);