From patchwork Thu Aug 8 01:18:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 11083041 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5531B1398 for ; Thu, 8 Aug 2019 01:19:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45FFD28AD2 for ; Thu, 8 Aug 2019 01:19:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A5E028AD9; Thu, 8 Aug 2019 01:19:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4ABC528AE8 for ; Thu, 8 Aug 2019 01:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388501AbfHHBTs (ORCPT ); Wed, 7 Aug 2019 21:19:48 -0400 Received: from bin-mail-out-06.binero.net ([195.74.38.229]:62715 "EHLO bin-mail-out-06.binero.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389520AbfHHBTr (ORCPT ); Wed, 7 Aug 2019 21:19:47 -0400 X-Halon-ID: 9074e45a-b97a-11e9-bdc3-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [145.14.112.32]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id 9074e45a-b97a-11e9-bdc3-005056917a89; Thu, 08 Aug 2019 03:19:37 +0200 (CEST) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Laurent Pinchart , Kieran Bingham , linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, =?utf-8?q?Niklas_S=C3=B6derlund?= Subject: [PATCH v2 0/6] rcar-vin: Add support for V4L2_FIELD_ALTERNATE Date: Thu, 8 Aug 2019 03:18:44 +0200 Message-Id: <20190808011850.21219-1-niklas.soderlund+renesas@ragnatech.se> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, This series adds support for V4L2_FIELD_ALTERNATE to rcar-vin. This removes a limitation in the driver where a video sources delivering video using the alternating field format was forced to use the rcar-vin interlacer and V4L2_FIELD_INTERLACED was delivers to the user. After this series the use of the interlacer is still default but the user have the option to explicit ask for alternate. It is based on latest media-tree and tested on R-Car Gen2 and Gen3 hardware. Patch 1/6, 2/6 and 3/6 prepares for the work by fixing a broken return statement, use available macros and renaming a poorly variable. Patch 4/6 fixes a problem with scaling (Gen2 only) which was found when testing alternating between V4L2_FIELD_ALTERNATE and V4L2_FIELD_INTERLACED. Patch 5/6 is the real change adding support for the new field format. Last 6/6 takes advantage of that the hardware interlacer is no longer a requirement and removes a bit of ugly code as a result. Niklas Söderlund (6): rcar-vin: Fix incorrect return statement in rvin_try_format() rcar-vin: Make use of V4L2_FIELD_IS_INTERLACED() macro rcar-vin: Rename rectangle holding the video source information rcar-vin: Do not reset the crop and compose rectangles in s_fmt rcar-vin: Add support for V4L2_FIELD_ALTERNATE rcar-vin: Clean up how format is set on subdevice drivers/media/platform/rcar-vin/rcar-dma.c | 54 ++++++----- drivers/media/platform/rcar-vin/rcar-v4l2.c | 100 +++++++++----------- drivers/media/platform/rcar-vin/rcar-vin.h | 4 +- 3 files changed, 78 insertions(+), 80 deletions(-)