Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5427626img; Wed, 27 Mar 2019 08:19:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxd4lVj0T/OKHXhm12HFC1zmYet5AcrnWFMcOvRkSKMMiMqzb5acWnoysosT+aan3Oj2BNm X-Received: by 2002:a63:e10b:: with SMTP id z11mr31372506pgh.46.1553699988338; Wed, 27 Mar 2019 08:19:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553699988; cv=none; d=google.com; s=arc-20160816; b=Ly9cZONVsQ56vF+Rn4NlflAc6x5U+SU26F9s2Oz3hEJlz7wWzPIrfzfQELTQqCrJR/ 5OmdXwYsWNd1p37vSc72W/UuN/o3/Tow+K9dGXI2A6Q8SToYMFt3BK9y62KieKYUHZBA dNZOwTEYY8IzDKILscjAsdXhsuhE1ZJPW5hrZKTMQti0gMr0dEmH4DJRniZkYXjhRw1P r05otLlWIWUIbe5fLs/W9r2yW0feXC3rnQ3geS5QaJeZE3HV5ri8OaHkvJsewoKtfBKo fm8abcizozYSsP9GvoPUB7RVMMQ1f07ySeLwiTuh99o6C8wORmF5d+l62Bc5+n73uvBn YuRA== 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 :message-id:date:subject:cc:to:from; bh=7zTMvIBL47ih2MPF8ilruRkbmaC3YEkeegLDLulgy1k=; b=BD+OFwu9HE8ZR+dqMegb47zPPRDcIwBJFwvO5wAmALnF+5twHYticHp0P+81Owfkx7 ILT5L9qTW3Lt7/EST+xYaa++x1g199+fddiem8DiU5Z5tjfMspcj31vOZqCAgAEgz/9o /xoDjHb7HnSZwaxq+bv/l1wiOE+kholI/pwfGCXyZgYumjuL5ZNbMPLBPWiwMz+OFinS e7YciDy7yY6pkNfrQtvTRXAgBOZKJIAFs8uluxHusP8TAy8D7X22RAwoulOZxTXO0pfY xDBprDnaU2gvjQP+xfpkU++EhaD9UGxrsyh5MtowsTM+Xg+csTUMMysqWM2GOh8a7t3m 17tw== 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 q17si18445563pgq.392.2019.03.27.08.19.33; Wed, 27 Mar 2019 08:19:48 -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 S1729381AbfC0PSv (ORCPT + 99 others); Wed, 27 Mar 2019 11:18:51 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48460 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725764AbfC0PSv (ORCPT ); Wed, 27 Mar 2019 11:18:51 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 8EDD6281FF2 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 00/15] media: vimc: Add support for multiplanar formats Date: Wed, 27 Mar 2019 12:17:28 -0300 Message-Id: <20190327151743.18528-1-andrealmeid@collabora.com> X-Mailer: git-send-email 2.21.0 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 Hello, This series implements support for multiplane pixel formats at Vimc. A lot of changes were required since vimc support for singleplane was "hardcoded". The code has been adapted in order to support both formats. When was possible, the functions were written generically, avoiding functions for just one type of pixel format. The debayer subdevice is the only one that currently doesn't supports multiplanar formats. Documentation to each device will be made in a future patch. In hardcoded topology, the exposed capture device `RGB/YUV Capture` have a debayer in the pipeline, so it will fail when tested with multiplanar formats. The last commit of this series was tested using Hans' virtme.sh[1] script here are the summary of results: Grand Total for vivid device /dev/media0: 631, Succeeded: 631, Failed: 0, Warnings: 6 Grand Total for vivid device /dev/media1: 631, Succeeded: 631, Failed: 0, Warnings: 6 Grand Total for vim2m device /dev/media3: 61, Succeeded: 61, Failed: 0, Warnings: 0 Grand Total for vimc device /dev/media3: 478, Succeeded: 478, Failed: 0, Warnings: 0 Final Summary: 1801, Succeeded: 1801, Failed: 0, Warnings: 12 This patch depends on this one: "[PATCH] media: vimc: propagate pixel format in the stream" Thanks, André [1] https://hverkuil.home.xs4all.nl/virtme/virtme.sh Changes in v2: - Fix typos - Fix indentations - Enhance v4l2_fmt_* documentation - Change the order of commits, now the multiplanar parameter is the last one with the commit to set the device capabilities - Squash "unnecessary checks" commits together - In v1, the whole media device was in singleplanar or in multiplanar format. Now, each stream/pipeline can be in a format - Check the capture capabilities to get if the stream is in singleplanar/multiplanar mode, instead of checking the module parameter. - Change `if (multiplanar)` to `if (IS_MULTIPLANAR(vcap))` - Add a new commit to propagate in the stream if the capture device is in multiplanar or singleplanar mode André Almeida (15): media: Move sp2mp functions to v4l2-common media: vimc: Remove unnecessary stream checks media: vimc: cap: Change vimc_cap_device.format type media: vimc: cap: Dynamically define stream pixelformat media: vimc: cap: Add handler for singleplanar fmt ioctls media: vimc: cap: Add handler for multiplanar fmt ioctls media: vimc: cap: Add multiplanar formats media: vimc: cap: Add multiplanar default format media: vimc: cap: Allocate and verify mplanar buffers media: vimc: Propagate multiplanar state in the stream media: vimc: Add and use new struct vimc_frame media: vimc: sen: Add support for multiplanar formats media: vimc: sca: Add support for multiplanar formats media: vimc: cap: Add support for multiplanar formats media: vimc: Create multiplanar parameter drivers/media/platform/vimc/vimc-capture.c | 351 +++++++++++++++--- drivers/media/platform/vimc/vimc-common.c | 36 ++ drivers/media/platform/vimc/vimc-common.h | 49 ++- drivers/media/platform/vimc/vimc-debayer.c | 39 +- drivers/media/platform/vimc/vimc-scaler.c | 128 ++++--- drivers/media/platform/vimc/vimc-sensor.c | 65 ++-- drivers/media/platform/vimc/vimc-streamer.c | 2 +- drivers/media/platform/vimc/vimc-streamer.h | 3 + drivers/media/platform/vivid/vivid-vid-cap.c | 6 +- .../media/platform/vivid/vivid-vid-common.c | 59 --- .../media/platform/vivid/vivid-vid-common.h | 9 - drivers/media/platform/vivid/vivid-vid-out.c | 6 +- drivers/media/v4l2-core/v4l2-common.c | 62 ++++ include/media/v4l2-common.h | 37 ++ 14 files changed, 618 insertions(+), 234 deletions(-) -- 2.21.0