Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp603398ima; Fri, 15 Mar 2019 09:46:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1FEAdQMHlxcCPa84tXjw8N08jQD8sVD/vzlMpmxO7bXIGKcJHp/AvCy/i5LV4Q3iM0qUh X-Received: by 2002:a17:902:8ecb:: with SMTP id x11mr5167193plo.40.1552668387640; Fri, 15 Mar 2019 09:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552668387; cv=none; d=google.com; s=arc-20160816; b=XSUZ2+ujQU59nzMo/MIIhGfl8uT3XJ1yYlI/H8aAvBzYSAu3/wgV7s1ItFLdggYSgj b838+PiwBOFTyZjHkTRFnU0Tnl3vhGdKOdQINiRPUMQx5FV/de6GQIu65sZuzoZzQv6k hlDJd/mPZfR4fegumeYRDa/JKk2q8FNKHDdmmbhjXllicVjkpHEwRJ3U3uih/bRJSO3D haOp7kiEs5Qx4Zb4zVDJZAtwI3U7PQhgqLNcYOb0GhsD6SWGShZxzWNr8nYvSobxL8N5 ijvH1S70+Y5qPbHoKKx51jTjv2qDXVwBAWbIdUXHPPT9iyJO2DzNn/0bBmnaOcL3vEaC aIWQ== 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=ZRW0RccH3nVeduxmq8VaC/07UB6JPdztLxHvAduvK/w=; b=bJ4KGvf/j55KTlkgG6LrOc1R9vbObhayDNhblA0v9Fl/gC1zqjj+b8s22WoBMHd3+J Mi1jKmJSppDBgeznnGLZINIHmLkn4JITBBdRs7W1ee4jZ2gk0syBftCaEofZFOQ752aO YEGoC6JsJ9Sarm7XMfWQQ5VgQFQ0UmdmfAmviuq17cR8o74bYODMb7ZwZ6Rf7JizzA1E VKcZLHif1J561WCQ0FdC7KDHQVrFPU5nuYdHX+HnoqIkOaFFGPzBnEzCHp1EFoY9bo7K gm5GwEDMNtuy1cJ2WMjnW/t9iYicctfULwvbatVulNkt2psC9FCcWFK0lOtgeucz+wjV EAoQ== 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 f73si2380089pff.184.2019.03.15.09.46.13; Fri, 15 Mar 2019 09:46:27 -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 S1729749AbfCOQpU (ORCPT + 99 others); Fri, 15 Mar 2019 12:45:20 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:49012 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729702AbfCOQpS (ORCPT ); Fri, 15 Mar 2019 12:45:18 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 4EC08281581 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 06/16] media: vimc: cap: Dynamically define stream pixelformat Date: Fri, 15 Mar 2019 13:43:49 -0300 Message-Id: <20190315164359.626-7-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 Define the pixelformat of the streamer depending to the mode (single/multiplanar). Signed-off-by: André Almeida --- drivers/media/platform/vimc/vimc-capture.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/vimc/vimc-capture.c b/drivers/media/platform/vimc/vimc-capture.c index c7ec55c4fe13..a93241d53953 100644 --- a/drivers/media/platform/vimc/vimc-capture.c +++ b/drivers/media/platform/vimc/vimc-capture.c @@ -282,7 +282,12 @@ static int vimc_cap_start_streaming(struct vb2_queue *vq, unsigned int count) return ret; } - vcap->stream.producer_pixfmt = vcap->format.fmt.pix.pixelformat; + if (vcap->format.type == V4L2_CAP_VIDEO_CAPTURE_MPLANE) + vcap->stream.producer_pixfmt = + vcap->format.fmt.pix_mp.pixelformat; + else + vcap->stream.producer_pixfmt = + vcap->format.fmt.pix.pixelformat; ret = vimc_streamer_s_stream(&vcap->stream, &vcap->ved, 1); if (ret) { -- 2.21.0