linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Helen Koike <helen.koike@collabora.com>
To: linux-media@vger.kernel.org
Cc: lucmaga@gmail.com, linux-kernel@vger.kernel.org,
	lkcamp@lists.libreplanetbr.org, andrealmeid@collabora.com,
	Hans Verkuil <hverkuil@xs4all.nl>,
	kernel@collabora.com
Subject: [PATCH 5/8] media: vimc: stream: cleanup frame field from struct vimc_stream
Date: Wed,  6 Mar 2019 19:42:41 -0300	[thread overview]
Message-ID: <20190306224244.21070-6-helen.koike@collabora.com> (raw)
In-Reply-To: <20190306224244.21070-1-helen.koike@collabora.com>

There is no need to have the frame field in the vimc_stream struct.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
---

 drivers/media/platform/vimc/vimc-streamer.c | 10 ++++------
 drivers/media/platform/vimc/vimc-streamer.h |  1 -
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/media/platform/vimc/vimc-streamer.c b/drivers/media/platform/vimc/vimc-streamer.c
index 392754c18046..b7c1fdef5f0d 100644
--- a/drivers/media/platform/vimc/vimc-streamer.c
+++ b/drivers/media/platform/vimc/vimc-streamer.c
@@ -117,6 +117,7 @@ static int vimc_streamer_pipeline_init(struct vimc_stream *stream,
 static int vimc_streamer_thread(void *data)
 {
 	struct vimc_stream *stream = data;
+	u8 *frame = NULL;
 	int i;
 
 	set_freezable();
@@ -127,12 +128,9 @@ static int vimc_streamer_thread(void *data)
 			break;
 
 		for (i = stream->pipe_size - 1; i >= 0; i--) {
-			stream->frame = stream->ved_pipeline[i]->process_frame(
-					stream->ved_pipeline[i],
-					stream->frame);
-			if (!stream->frame)
-				break;
-			if (IS_ERR(stream->frame))
+			frame = stream->ved_pipeline[i]->process_frame(
+					stream->ved_pipeline[i], frame);
+			if (!frame || IS_ERR(frame))
 				break;
 		}
 		//wait for 60hz
diff --git a/drivers/media/platform/vimc/vimc-streamer.h b/drivers/media/platform/vimc/vimc-streamer.h
index 752af2e2d5a2..dc1d0be431cb 100644
--- a/drivers/media/platform/vimc/vimc-streamer.h
+++ b/drivers/media/platform/vimc/vimc-streamer.h
@@ -19,7 +19,6 @@ struct vimc_stream {
 	struct media_pipeline pipe;
 	struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE];
 	unsigned int pipe_size;
-	u8 *frame;
 	struct task_struct *kthread;
 };
 
-- 
2.20.1


  parent reply	other threads:[~2019-03-06 22:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-06 22:42 [PATCH 0/8] media: vimc: remove media bus code limitation Helen Koike
2019-03-06 22:42 ` [PATCH 1/8] media: vimc: deb: fix default sink bayer format Helen Koike
2019-03-06 22:42 ` [PATCH 2/8] media: vimc: stream: fix thread state before sleep Helen Koike
2019-03-06 22:42 ` [PATCH 3/8] media: vimc: cap: fix step width/height in enum framesize Helen Koike
2019-03-06 22:42 ` [PATCH 4/8] media: v4l2-common: add bayer formats in v4l2_format_info Helen Koike
2019-03-06 22:42 ` Helen Koike [this message]
2019-03-07 20:19   ` [PATCH 5/8] media: vimc: stream: cleanup frame field from struct vimc_stream André Almeida
2019-03-06 22:42 ` [PATCH 6/8] media: vimc: stream: add docs to " Helen Koike
2019-03-06 22:42 ` [PATCH 7/8] media: vimc: stream: init/terminate the first entity Helen Koike
2019-03-07 20:21   ` André Almeida
2019-03-06 22:42 ` [PATCH 8/8] media: vimc: propagate pixel format in the stream Helen Koike
2019-03-07 20:23   ` André Almeida
2019-03-08 13:43   ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190306224244.21070-6-helen.koike@collabora.com \
    --to=helen.koike@collabora.com \
    --cc=andrealmeid@collabora.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lkcamp@lists.libreplanetbr.org \
    --cc=lucmaga@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).