Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp599546imu; Wed, 9 Jan 2019 03:14:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN4d54mCDd1lc7yzntdv6JMz6LkdmARbbljDuZVPm8CVOT0yWGOI8nhJrnE1lbpIwVQ2sK/K X-Received: by 2002:a17:902:7614:: with SMTP id k20mr5673614pll.285.1547032485844; Wed, 09 Jan 2019 03:14:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547032485; cv=none; d=google.com; s=arc-20160816; b=AX3vKKLPJYaGBn4XtaiRSHeesBNmfl+Fu30IM7obogrFN2lyisft89WZSx+YPkR1+T cIAaqkbvCMIDmI8L16/6urz/HrTidoD9m4ACv4ZMroWAqkprPUS8LARKHLucquZChhTX /BnhG8NsxklNElqTHXhHi8+kLDdWOGec8CPZEFOGe2OqESaSZblv6UhN3sjkgCaAZhRX jC3D61LNsF0uyEoFMpGzqb7THI/sjSUchQ0MbAx8+tXES6VMmpidy1SS3PdLCrIsfLVm 6tR0dFZEpEakIxcLtgQb5OuFWwd5SrqhdzAg/lPa0qnmccNzSkOf8SGXv8eYJYD+idd7 efaA== 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:date:cc:to:from:subject:message-id; bh=GCmQ/+vh8hoeuZXJIVRVlNvI2oxCErxoFpWChcsR10Y=; b=llBjQKxurIqERIIF5pQx1cojpAcJGqXXHM7nsB0Xt37XwCrpVITx/baQw9F4P/jDj1 jAJaa0ZID6UIhlCL3yprsI197G1tXZJ+LODq4JqP3GlgzTifMALMc4g71ckmtsOn3ZZu TW05N132VSc2wbu9qiWkIYvjmu629XWfZyFf3WHWmUDz2BDDb/dv50fmSqVvzNFM7s8x V9lG18rS+ZWY0QdXpT8+4S/9zp+a5M8O6xKXcL/5/itsb14UMGJq4I7oNFgQBhXKUdM5 foMQmtm6TPT1DaB/ypOw8/U7xHumQEBCI04olNn6CjKEOzLeBHr3mw2FvF12YxH7iRgX +qJQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t4si16770532pga.83.2019.01.09.03.14.29; Wed, 09 Jan 2019 03:14:45 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730724AbfAILLz (ORCPT + 99 others); Wed, 9 Jan 2019 06:11:55 -0500 Received: from metis.ext.pengutronix.de ([85.220.165.71]:40215 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730569AbfAILLy (ORCPT ); Wed, 9 Jan 2019 06:11:54 -0500 Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtp (Exim 4.89) (envelope-from ) id 1ghBm0-00032G-H6; Wed, 09 Jan 2019 12:11:48 +0100 Message-ID: <1547032306.4160.0.camel@pengutronix.de> Subject: Re: [PATCH v6 02/12] gpu: ipu-csi: Swap fields according to input/output field types From: Philipp Zabel To: Steve Longerbeam , linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Greg Kroah-Hartman , Bartlomiej Zolnierkiewicz , "open list:DRM DRIVERS FOR FREESCALE IMX" , open list , "open list:STAGING SUBSYSTEM" , "open list:FRAMEBUFFER LAYER" Date: Wed, 09 Jan 2019 12:11:46 +0100 In-Reply-To: <20190109001551.16113-3-slongerbeam@gmail.com> References: <20190109001551.16113-1-slongerbeam@gmail.com> <20190109001551.16113-3-slongerbeam@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2019-01-08 at 16:15 -0800, Steve Longerbeam wrote: > The function ipu_csi_init_interface() was inverting the F-bit for > NTSC case, in the CCIR_CODE_1/2 registers. The result being that > for NTSC bottom-top field order, the CSI would swap fields and > capture in top-bottom order. > > Instead, base field swap on the field order of the input to the CSI, > and the field order of the requested output. If the input/output > fields are sequential but different, swap fields, otherwise do > not swap. This requires passing both the input and output mbus > frame formats to ipu_csi_init_interface(). > > Move this code to a new private function ipu_csi_set_bt_interlaced_codes() > that programs the CCIR_CODE_1/2 registers for interlaced BT.656 (and > possibly interlaced BT.1120 in the future). > > When detecting input video standard from the input frame width/height, > make sure to double height if input field type is alternate, since > in that case input height only includes lines for one field. > > Signed-off-by: Steve Longerbeam > Reviewed-by: Philipp Zabel Also Acked-by: Philipp Zabel to be merged via the media tree regards Philipp