Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5429831img; Wed, 27 Mar 2019 08:22:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfUwP9YqlWt8hKp6MuXuvGuqBNiYgbgK7aw5OyB2dv8Ag4YL53nXeht1DF7fdlY5bKbMJc X-Received: by 2002:a17:902:2a29:: with SMTP id i38mr38389525plb.22.1553700121261; Wed, 27 Mar 2019 08:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553700121; cv=none; d=google.com; s=arc-20160816; b=P3hjSlNhnCARcZVCUg4A+9ts7yFsiI1Un+WJfl7auP98kXYGhP4eyxMixAn4nCtNd0 agj7bGsA50bBY3zoVYUxC9DQOp/XQmn9G7TaHnyibxMbq0wdIGYxKzZbn9hhPPhYtxV5 1dSSsIIatU7SE/0DHzsLICop3W7znttMivWe/nf09zgs8lagC3oZvI2fkG76F0cbcfCg qNC25l+TfzCH1uFouzn5lBUAhmjDiq71/z93YGazv/uI4h8N6CyRZVi2IHsT3pBTRScG g3ePWrsZX1fxIjxQYhBkCP0uOiHVtzwRlcJ0ow5JJYz67IsRzhZHFMz4HKeS/DWvsTK9 pgNQ== 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=fEajy5CCdvRUcniJx2mA/CR5nqkWUcp0UOH5vnmtqg8=; b=I6JAR1Bcw9TXSLia5hXExQyEAvvh+dkAA7QfAuWaXHH/iUMBaMRjOYyigQNYdk0za3 GKcVmNblTq7bwyYdjFvkHYfBqtlo/b3VPEnpvh8M+7cToats0xfwi0dbF7QHFJSMS7tw gz5vR/l+IDpXQAvzTteCQkrzRqHvGvb6OwWf4JY4WplnwM01Wlao4MX/TzTZUdTGR3Tw I/Hx2mrVb9Yu5VIcm/I6HlQThHStIEPKQ7fdAsv4kTB/6Jqk3vwhebsqaLRdGRKG3KwF WSmrvkUn9i+UK9n/qkHHB+NCi4hljvn17ftMwrVjybXgkG4EiHw9qpTp7wacXMzDdSBS 0xeg== 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 l1si20746001pld.210.2019.03.27.08.21.45; Wed, 27 Mar 2019 08:22:01 -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 S1730874AbfC0PTa (ORCPT + 99 others); Wed, 27 Mar 2019 11:19:30 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48560 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730792AbfC0PT2 (ORCPT ); Wed, 27 Mar 2019 11:19:28 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 6DC82281FF2 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, lkcamp@lists.libreplanetbr.org Subject: [PATCH v2 10/15] media: vimc: Propagate multiplanar state in the stream Date: Wed, 27 Mar 2019 12:17:38 -0300 Message-Id: <20190327151743.18528-11-andrealmeid@collabora.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190327151743.18528-1-andrealmeid@collabora.com> References: <20190327151743.18528-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 Add a multiplanar flag in vimc_stream in order to propagate the state (singleplanar/multiplanar) to subdevices at the stream. Signed-off-by: André Almeida --- Change in v2: - New commit drivers/media/platform/vimc/vimc-capture.c | 7 +++++-- drivers/media/platform/vimc/vimc-streamer.h | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/vimc/vimc-capture.c b/drivers/media/platform/vimc/vimc-capture.c index 57bc2b64b093..3c93fbd51629 100644 --- a/drivers/media/platform/vimc/vimc-capture.c +++ b/drivers/media/platform/vimc/vimc-capture.c @@ -454,12 +454,15 @@ static int vimc_cap_start_streaming(struct vb2_queue *vq, unsigned int count) return ret; } - if (IS_MULTIPLANAR(vcap)) + if (IS_MULTIPLANAR(vcap)) { vcap->stream.producer_pixfmt = vcap->format.fmt.pix_mp.pixelformat; - else + vcap->stream.multiplanar = true; + } else { vcap->stream.producer_pixfmt = vcap->format.fmt.pix.pixelformat; + vcap->stream.multiplanar = false; + } ret = vimc_streamer_s_stream(&vcap->stream, &vcap->ved, 1); if (ret) { diff --git a/drivers/media/platform/vimc/vimc-streamer.h b/drivers/media/platform/vimc/vimc-streamer.h index 2b3667408794..4878e0b72ea7 100644 --- a/drivers/media/platform/vimc/vimc-streamer.h +++ b/drivers/media/platform/vimc/vimc-streamer.h @@ -25,6 +25,8 @@ * processed in the pipeline. * @pipe_size: size of @ved_pipeline * @kthread: thread that generates the frames of the stream. + * @multiplanar: sets if the stream is running in multiplanar or + * singleplanar format mode * @producer_pixfmt: the pixel format requested from the pipeline. This must * be set just before calling vimc_streamer_s_stream(ent, 1). This value is * propagated up to the source of the base image (usually a sensor node) and @@ -40,6 +42,7 @@ struct vimc_stream { struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE]; unsigned int pipe_size; struct task_struct *kthread; + bool multiplanar; u32 producer_pixfmt; }; -- 2.21.0