Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1062131ybi; Sat, 15 Jun 2019 19:15:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUeS0qUXpxwULqaEm0mpWk5cwiAF4mPSp99mFD/D3MlOdv16DHShbxq02yssDmHNMMcsoF X-Received: by 2002:a17:902:bd94:: with SMTP id q20mr14702937pls.307.1560651315600; Sat, 15 Jun 2019 19:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560651315; cv=none; d=google.com; s=arc-20160816; b=jDzhI2LwulEoP6ZF8K6alEg1tzOusiHNUZo3wImTVrTUH49tr5qTfAZuR0qf5g05Bo HJpLm7QzdqVyG7aNxXuXGD5fCwsXI6sNkxug7Tf4CNg0Hhtb+s5DCanPsrM10jAh/oYT SWRHf4ZRqcEmJFapTRmBAY/ThARRMuPIKeF+qmHa0KrtP1EkJiqT5Ro9iMIlhfNpseWL DnwcOCJvHj+KbvO3Y8o1bh57QpKttHOC0J+CpDOlx/ZsJNegrXmwe8YZkGKSdgveKCV6 74bt/X7N2HadwpoHo+6hXmH7MRpFRDJ37iq9Ay/+Lgb3SeS0qBi5Qdrpy1DPrzk5UXZs ku5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Yo03gvMuvHdJz75+E8swIjwPV+NPNcs4ZRekW1b3ELY=; b=e26/adfJqobSeVf7lCrXJ0mK0FwzkYR/kn/AXUqEz0z4kTYcpnMiZml4V862fwOE+L OsHwc5yN71IAk1g4ID/5eEstQgXgOvap8kuoJQZH7aKALgfjbSgI3Ir5hBpZkuMEaDge yse/D9hFpDCtgGSXuyaU4wyWu4WoxUnguZSeg9mF8qG5ZmSLK/nrAl8OCL9i9WmLnjMY fARylb+9y/+l7Uo5To+loFeeeZCDniEiaEvmwyTr6iVneE8T55JEHnzexRRwe0QPV1b/ sZnurNuX192/6C3Y+v86yO8HFCw991j2cGe3O1UMEFKoJAOpwcfrMLeWEtM5Dxwnn/7C 6LVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si6612937pgi.74.2019.06.15.19.14.58; Sat, 15 Jun 2019 19:15:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726926AbfFPCKk (ORCPT + 99 others); Sat, 15 Jun 2019 22:10:40 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43950 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbfFPCKk (ORCPT ); Sat, 15 Jun 2019 22:10:40 -0400 Received: from turingmachine.home (unknown [IPv6:2804:431:d719:ae74:d711:794d:1c68:5ed3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tonyk) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 69BE8260C7A; Sun, 16 Jun 2019 03:10:35 +0100 (BST) From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: linux-media@vger.kernel.org Cc: mchehab@kernel.org, hverkuil@xs4all.nl, helen.koike@collabora.com, kernel@collabora.com, linux-kernel@vger.kernel.org, =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v2 1/2] media: vimc: stream: add missing function documentation Date: Sat, 15 Jun 2019 23:09:58 -0300 Message-Id: <20190616020959.7360-1-andrealmeid@collabora.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add comments at vimc_streamer_s_stream and vimc_streamer_thread, making the vimc-stream totally documented. Signed-off-by: André Almeida --- Commit extracted from [PATCH 0/4] media: vimc: Minor code cleanup and documentation Changes in v2: fix typos drivers/media/platform/vimc/vimc-streamer.c | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc/vimc-streamer.c index 236ade38f1da..76435e87d609 100644 --- a/drivers/media/platform/vimc/vimc-streamer.c +++ b/drivers/media/platform/vimc/vimc-streamer.c @@ -122,6 +122,14 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream, return -EINVAL; } +/* + * vimc_streamer_thread - process frames through the pipeline + * + * @data: vimc_stream struct of the current streaming + * + * From the source to the sink, gets a frame from each subdevice and send to + * the next one of the pipeline in a fixed framerate. + */ static int vimc_streamer_thread(void *data) { struct vimc_stream *stream = data; @@ -149,6 +157,20 @@ static int vimc_streamer_thread(void *data) return 0; } +/* + * vimc_streamer_s_stream - start/stop the streaming on the media pipeline + * + * @stream: the pointer to the stream structure of the current stream + * @ved: pointer to the vimc entity of the entity of the stream + * @enable: flag to determine if stream should start/stop + * + * When starting, check if there is no stream->kthread allocated. This should + * indicate that a streaming is already running. Then, it initializes + * the pipeline, creates and runs a kthread to consume buffers through the + * pipeline. + * When stopping, analogously check if there is a stream running, stops + * the thread and terminates the pipeline. + */ int vimc_streamer_s_stream(struct vimc_stream *stream, struct vimc_ent_device *ved, int enable) -- 2.22.0