From patchwork Thu Oct 4 18:53:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 10626499 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 342B115E2 for ; Thu, 4 Oct 2018 18:54:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26E3D29548 for ; Thu, 4 Oct 2018 18:54:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AFDE2954B; Thu, 4 Oct 2018 18:54:14 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham 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 0A30129548 for ; Thu, 4 Oct 2018 18:54:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727615AbeJEBsp (ORCPT ); Thu, 4 Oct 2018 21:48:45 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:38613 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727607AbeJEBso (ORCPT ); Thu, 4 Oct 2018 21:48:44 -0400 Received: by mail-wr1-f68.google.com with SMTP id a13-v6so11035851wrt.5 for ; Thu, 04 Oct 2018 11:54:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nOk672qLMVGrpLBOg0yXyFpNsVx2IpBnWORl0t0kQPE=; b=XkqOaI+2pGeyiqz/86ajcCUh4kTQ2qY3/BmZap0rLoQvByzsLROkKni9uyAsLKlN8p tzqmipgzPYvRngcgQj43tD3xVFQ3PlSxTbw2gEYf89ffekNWTol2Dm0OC6SkupUGA4KG w886vsDgF9Jx0lAomzgyiUHmdYNGlFJuYbIEuFg7LQfgEyiyl4nNY/Gi80zm6+6m1kl5 NRntoYMWqr6sRJLUN5FeQ0rK9qvNoT9rY413yixZpkHN38wGBOOpVHPyPTDBmlHVG25D yEt4DOdRoIX8B2GRMQIfdOD/np4Cbc2b1HO5MCaUCQj7djtla+SSTYI48gAY3Ezmbynb q08g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=nOk672qLMVGrpLBOg0yXyFpNsVx2IpBnWORl0t0kQPE=; b=VS0UX88hMJGMRnXNvyRUV6Gns7cENvr0lcH/bi0cVCN7yvmBOdzZdKug9Ezf5j8tqU +zfcRgzGBakRq7S0Kxjh5B+aOZQjxPOzFEJ/I5zvl5BE4dwSe0e2iYAmZzw57E5R4dCp PdjQxWS3J9XK8SCzGK38AqxZygOJGmMx9ii2fWlR6VO64at5E5gyshMW9IaKFfetdPtG E/RG2kh5CPcIDuS0M1W50U7brEorvzluXstmE+VkLExFA68ZW6MOx1bn/kypQ6gmIkv/ EbmTWVrG0yCSHTgwYmG8Wzlr1Drb+dIzeSkpDXt1E3/WejhNDVBs+FQs7LaDxRkkhPzO yt6w== X-Gm-Message-State: ABuFfojrWnlOZkMQ7Y5+E1G5PfJjjD3G+VTEVIpH290ChCOsCVke7fTH HEEEKuVgBVIDJt0lFolL8elpONKK X-Google-Smtp-Source: ACcGV62bwkEQfkPMAMvBRttBhsbIRP+XtN+PbhaBoCWgwhTri/2rzm1TgM22k62FWPM1vRIKMJ9YnQ== X-Received: by 2002:adf:9dc9:: with SMTP id q9-v6mr5547252wre.12.1538679249703; Thu, 04 Oct 2018 11:54:09 -0700 (PDT) Received: from mappy.world.mentorg.com (nat-wv.mentorg.com. [192.94.38.34]) by smtp.gmail.com with ESMTPSA id h78-v6sm8706877wmd.4.2018.10.04.11.54.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Oct 2018 11:54:08 -0700 (PDT) From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH v4 00/11] imx-media: Fixes for interlaced capture Date: Thu, 4 Oct 2018 11:53:50 -0700 Message-Id: <20181004185401.15751-1-slongerbeam@gmail.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A set of patches that fixes some bugs with capturing from an interlaced source, and incompatibilites between IDMAC interlace interweaving and 4:2:0 data write reduction. History: v4: - rebased to latest media-tree master branch. - Make patch author and SoB email addresses the same. v3: - add support for/fix interweaved scan with YUV planar output. - fix bug in 4:2:0 U/V offset macros. - add patch that generalizes behavior of field swap in ipu_csi_init_interface(). - add support for interweaved scan with field order swap. Suggested by Philipp Zabel. - in v2, inteweave scan was determined using field types of CSI (and PRPENCVF) at the sink and source pads. In v3, this has been moved one hop downstream: interweave is now determined using field type at source pad, and field type selected at capture interface. Suggested by Philipp. - make sure to double CSI crop target height when input field type in alternate. - more updates to media driver doc to reflect above. v2: - update media driver doc. - enable idmac interweave only if input field is sequential/alternate, and output field is 'interlaced*'. - move field try logic out of *try_fmt and into separate function. - fix bug with resetting crop/compose rectangles. - add a patch that fixes a field order bug in VDIC indirect mode. - remove alternate field type from V4L2_FIELD_IS_SEQUENTIAL() macro Suggested-by: Nicolas Dufresne . - add macro V4L2_FIELD_IS_INTERLACED(). Steve Longerbeam (11): media: videodev2.h: Add more field helper macros gpu: ipu-csi: Swap fields according to input/output field types gpu: ipu-v3: Add planar support to interlaced scan media: imx: Fix field negotiation media: imx-csi: Double crop height for alternate fields at sink media: imx: interweave and odd-chroma-row skip are incompatible media: imx-csi: Allow skipping odd chroma rows for YVU420 media: imx: vdic: rely on VDIC for correct field order media: imx-csi: Move crop/compose reset after filling default mbus fields media: imx: Allow interweave with top/bottom lines swapped media: imx.rst: Update doc to reflect fixes to interlaced capture Documentation/media/v4l-drivers/imx.rst | 93 ++++++---- drivers/gpu/ipu-v3/ipu-cpmem.c | 26 ++- drivers/gpu/ipu-v3/ipu-csi.c | 132 ++++++++++---- drivers/staging/media/imx/imx-ic-prpencvf.c | 48 +++-- drivers/staging/media/imx/imx-media-capture.c | 14 ++ drivers/staging/media/imx/imx-media-csi.c | 166 ++++++++++++------ drivers/staging/media/imx/imx-media-vdic.c | 12 +- include/uapi/linux/videodev2.h | 7 + include/video/imx-ipu-v3.h | 6 +- 9 files changed, 359 insertions(+), 145 deletions(-)