From patchwork Wed Aug 1 19:12:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 10552841 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 5763E13BF for ; Wed, 1 Aug 2018 19:12:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 479812B81D for ; Wed, 1 Aug 2018 19:12:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B7972B857; Wed, 1 Aug 2018 19:12:38 +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 C52192B81D for ; Wed, 1 Aug 2018 19:12:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732231AbeHAU7t (ORCPT ); Wed, 1 Aug 2018 16:59:49 -0400 Received: from mail-pl0-f49.google.com ([209.85.160.49]:42518 "EHLO mail-pl0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732120AbeHAU7t (ORCPT ); Wed, 1 Aug 2018 16:59:49 -0400 Received: by mail-pl0-f49.google.com with SMTP id z7-v6so9226285plo.9 for ; Wed, 01 Aug 2018 12:12:36 -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=c+TpJksi3KUHIWKHZGa/TscUMpaaFLmydo0qAedPAvQ=; b=KZhdPmBfOP98eKgPpbuS78clVCiXugaHeOVVEDUjDvlVw0WIb5fTWwXigOzk8ToYxJ yc30/nz70fkLjjS9fq6VpUUiCQ1GoOtx/PTOg4GnlWLMBtpZVGvpE78s6TtnIUZkpApe OHwG39oV22a+AuXmrY4iXBw5X9xDugy9hD2UyDRnGbNccUPINCAzK08ZaahKShApgsH7 5y4BxKNasRGmZigKjoLQCsvlIUDC6s13V9M6iKYeiOZSV4e1ymcBZYsPRlxHLws+BEeX 0AbZPHczcTYs8z6U+1JFaGjPNGqSIcMbQqifmOwApAUS9LV2a7ziUop64QqTe5M6y93N LMiQ== 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=c+TpJksi3KUHIWKHZGa/TscUMpaaFLmydo0qAedPAvQ=; b=SbfXVPSN93hMIUXUwwB7aYooefpeBRhi96D6Lueck4yPfOPHA7Hg+aX9kELErbvuZY 7WS3yo7byzhDTJCYhBoMR/W4sRAqNyQTmujIyFuGd40AxJ7tfKVyaACh2GbQodk2KHyN clIS6GyhdgbOxGLI5YVuKWdAqnpYgEfG1A/3Zq4vGAQi5qwQDpIWzBXypnuP6pXnMX4o 4QflfxyhhUu6RCsUu8ZjngyFXXIMdY4YQo/ukkqO4geQxjKwNKS0OgPddBd4pXn+gkKX xBgRnRAiQ5Do3OvzM2Nj2fg+9Jv3f7xZVK8EwR2/jDQsT4E09lHuGVe+yPLUFA10amw5 dL8Q== X-Gm-Message-State: AOUpUlGJW4FfcfwrVJrKSY7uxP7bQAjai7xIDvyZgf9LOGIeS6Xy08W9 MCTeeM1lnN6lecDnf7DCp/xZ8OQZ X-Google-Smtp-Source: AAOMgpeAYxo44zUXJe/FFTOtgMyBtvKKRupFEIVY7EvkKScck/AboIjS75s3tWGQZOy5Q/q0vAE7bg== X-Received: by 2002:a17:902:ab90:: with SMTP id f16-v6mr26705346plr.182.1533150755616; Wed, 01 Aug 2018 12:12:35 -0700 (PDT) Received: from mappy.world.mentorg.com (c-24-5-209-231.hsd1.ca.comcast.net. [24.5.209.231]) by smtp.googlemail.com with ESMTPSA id u42-v6sm31171336pgn.1.2018.08.01.12.12.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Aug 2018 12:12:34 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Cc: Steve Longerbeam Subject: [PATCH v3 00/14] imx-media: Fixes for interlaced capture Date: Wed, 1 Aug 2018 12:12:13 -0700 Message-Id: <1533150747-30677-1-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 2.7.4 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: 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(). Philipp Zabel (1): gpu: ipu-v3: Allow negative offsets for interlaced scanning Steve Longerbeam (13): media: videodev2.h: Add more field helper macros gpu: ipu-csi: Check for field type alternate gpu: ipu-csi: Swap fields according to input/output field types gpu: ipu-v3: Fix U/V offset macros for planar 4:2:0 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 | 45 ++++++- drivers/gpu/ipu-v3/ipu-csi.c | 136 ++++++++++++++------- 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, 377 insertions(+), 150 deletions(-)