Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5300152imb; Thu, 7 Mar 2019 12:20:50 -0800 (PST) X-Google-Smtp-Source: APXvYqx25LGoOgJEsO1k+pA8FxP39YjyJwHroAGHVvZc5OyffUryFnKznCqtFuc5JCO1iZ4dCTq/ X-Received: by 2002:a62:f204:: with SMTP id m4mr14368440pfh.58.1551990050358; Thu, 07 Mar 2019 12:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551990050; cv=none; d=google.com; s=arc-20160816; b=W5pGgrXzdxRw2/vDfxFq7TiE6UOh9XUUICaPS+YTYnzzZGoN3FmhL+tFMtfeiCIbvS K5F1AC1YAgrCvH47LqDdgDg8ZW88G4Ow0PDlAV6cLw7njBjcf+Q+AvsVc6zBgskiJAII IC9zv0C6WpjDnP+PS4JnbtxbAr4sUc9UhJpFDr7R5CoFDWq7pjG8WRgKs4Qf6WN38pPY TxUeM1ZQEf9H/qrDjDvwWHWb5prwmWkHmzk0TtJTXfIU6CpTK3QcICx9gBLeCexFe0iS IqfWrpoFPfZvkvjD6SbfUyVmZ+MIGySUEiufYUCbBucl2FSHTjCuU/n/5OghCgcvt7Gh ubtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=DP+WatLrI3zAa9B8uhcTfRm2JlfZq5fy4MLdtMCPdJo=; b=dnnW04ZEYWeQB0x3vZtB2H18Fq2+Guuk661M6KtdRcybYkeTiw9vlelwx/90D/VJNg a2LqyzRjXfQxETZWs0YyFeUj/IrmadnJ3nUvq2rznmIBmxbD8F7OmdzMMrxzo9F4496c lRRavZbYDw8yNac9Fqie7ePSVMWviloEYIP9GY6TW8Rp5P70Y77/a0/JvesjuGKPUQMR fH8TuIeQAnwADf+cY77koOhF4ZAg4r6Ee+cL9FfhAdrmPTTthSkKPALLkgf7ImHKPlcF 0DSNnwSi6yZjyLmK9NwwqD2BisfuTV4XxmPZ3afJlyYxN6fIRM0ro9V32o+gArYiCwhC vuOQ== 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 b17si4868582pfm.57.2019.03.07.12.20.34; Thu, 07 Mar 2019 12:20:50 -0800 (PST) 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 S1726248AbfCGUUJ (ORCPT + 99 others); Thu, 7 Mar 2019 15:20:09 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39124 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726166AbfCGUUI (ORCPT ); Thu, 7 Mar 2019 15:20:08 -0500 Received: from [IPv6:2804:431:d719:9975:b343:652b:e214:3dca] (unknown [IPv6:2804:431:d719:9975:b343:652b:e214:3dca]) (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 69626260A49; Thu, 7 Mar 2019 20:20:05 +0000 (GMT) Subject: Re: [PATCH 5/8] media: vimc: stream: cleanup frame field from struct vimc_stream To: Helen Koike , linux-media@vger.kernel.org Cc: lucmaga@gmail.com, linux-kernel@vger.kernel.org, lkcamp@lists.libreplanetbr.org, Hans Verkuil , kernel@collabora.com References: <20190306224244.21070-1-helen.koike@collabora.com> <20190306224244.21070-6-helen.koike@collabora.com> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: Date: Thu, 7 Mar 2019 17:19:15 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: <20190306224244.21070-6-helen.koike@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, I've tested the stream (with the default media bus format and using an alternative one) using a custom user space application and tested all capture entities using qv4l2 -d /dev/videoX (where X is each of the capture entities). Also, I have checked v4l2-compliance -d /dev/videoX and with v4l2-compliance --streaming=5 -d /dev/videoX and no regressions where found. On 3/6/19 7:42 PM, Helen Koike wrote: > There is no need to have the frame field in the vimc_stream struct. > > Signed-off-by: Helen Koike Tested-by: André Almeida > --- > > 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; > }; >