Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp603136ima; Fri, 15 Mar 2019 09:46:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkeh0wcOMWCIk21r1MJ69LXUDOWLM7DkDnYxSGRfvD2BrwWtCatLlOgCvnIqOXtmqotSuv X-Received: by 2002:a17:902:a7:: with SMTP id a36mr5251462pla.267.1552668370116; Fri, 15 Mar 2019 09:46:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552668370; cv=none; d=google.com; s=arc-20160816; b=C27Fc91i/a3PppP98VxBla/4MZloNxkhw0Sg1IfHtuX8yM9OnVh6BwEOVjyZgirIJc 1m6dyUi69X7lI05GoK4EIL9tBjhbRHJf+wRKa3rE5Y5RPQ72IpKc0hZwnz1cmCs0uRcz AfyEFm88xAZfIFbW4hHOTON15DyNXIJsFOY3CR6m/Y2InGb+TmQr3NIPXYVMDkRn87QQ c57yiRxaXZ7j8Ek2L5XDuAukZNwnyZTgOwXMKSUcsNbJ+qRmJCiZhYy53hU5kLFvCL5q fxBfh4iG5bMtDIv+17etq4MV1gNKajUnwJJSdy6skbr86JY2BqSgWCE1ggPvFMNhU2Np I+NA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2T8MjrvOeAmDixGxesDMIamos+ABA6++ViFQO3M+hrY=; b=IKXfRMxwuRdQ/WwBQZhSmMi7ijMRiFuMrKPGQ+5ca8sftiLMqXca/vJXjolfzTLWtH yAJIIrpLEDpcmhqkrNe57GH8m6sdxfGA/glsiAp+2ZKPriW3qKT6dt5YYd02AEqWuXMr O1N3MdEtUfPD131gsIhhvUJRtgpEoMj0947Xgni5dozfuBoWtS3nTsRgTDFSltEbecV+ yjgPDWdhxRaKenbTV2tFt2bcJ6zA4yhF4tsAJg8W4SNLG/olEK4c4bpQIQiaujVKd44f 09Vnu0pGHjqW6xPwHlqcUB+/U9PbuQzSUaSJOT1OGITqTLjA2YiJl/gWrYKUkAunHmwb JBcw== 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 n9si2234779pgc.472.2019.03.15.09.45.54; Fri, 15 Mar 2019 09:46:10 -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 S1729675AbfCOQpH (ORCPT + 99 others); Fri, 15 Mar 2019 12:45:07 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48980 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729661AbfCOQpF (ORCPT ); Fri, 15 Mar 2019 12:45:05 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 4A58F281584 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, lucmaga@gmail.com, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 02/16] media: vimc: Remove unnecessary stream check Date: Fri, 15 Mar 2019 13:43:45 -0300 Message-Id: <20190315164359.626-3-andrealmeid@collabora.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190315164359.626-1-andrealmeid@collabora.com> References: <20190315164359.626-1-andrealmeid@collabora.com> 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 Since V4L2 already checks if the stream is running (and avoid starting it twice), remove the check at subdevices. Signed-off-by: André Almeida --- drivers/media/platform/vimc/vimc-debayer.c | 3 --- drivers/media/platform/vimc/vimc-scaler.c | 3 --- drivers/media/platform/vimc/vimc-sensor.c | 4 ---- 3 files changed, 10 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-debayer.c b/drivers/media/platform/vimc/vimc-debayer.c index fc3babdb3a1c..5f84cb38f0f9 100644 --- a/drivers/media/platform/vimc/vimc-debayer.c +++ b/drivers/media/platform/vimc/vimc-debayer.c @@ -337,9 +337,6 @@ static int vimc_deb_s_stream(struct v4l2_subdev *sd, int enable) const struct v4l2_format_info *pix_info; unsigned int frame_size; - if (vdeb->src_frame) - return 0; - /* We only support translating bayer to RGB24 */ if (src_pixelformat != V4L2_PIX_FMT_RGB24) { dev_err(vdeb->dev, diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c index d613297a75b8..3102febefd63 100644 --- a/drivers/media/platform/vimc/vimc-scaler.c +++ b/drivers/media/platform/vimc/vimc-scaler.c @@ -213,9 +213,6 @@ static int vimc_sca_s_stream(struct v4l2_subdev *sd, int enable) const struct v4l2_format_info *pix_info; unsigned int frame_size; - if (vsca->src_frame) - return 0; - if (!vimc_sca_is_pixfmt_supported(pixelformat)) { dev_err(vsca->dev, "pixfmt (%s) is not supported\n", v4l2_get_fourcc_name(pixelformat)); diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c index cfa72dd39748..44a75099ce7f 100644 --- a/drivers/media/platform/vimc/vimc-sensor.c +++ b/drivers/media/platform/vimc/vimc-sensor.c @@ -197,10 +197,6 @@ static int vimc_sen_s_stream(struct v4l2_subdev *sd, int enable) const struct v4l2_format_info *pix_info; unsigned int frame_size; - if (vsen->kthread_sen) - /* tpg is already executing */ - return 0; - /* Calculate the frame size */ pix_info = v4l2_format_info(pixelformat); frame_size = vsen->mbus_format.width * pix_info->bpp[0] * -- 2.21.0