From patchwork Wed Aug 1 19:12:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 10553295 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 2FE8E15E2 for ; Thu, 2 Aug 2018 07:21:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AE2C2A6E5 for ; Thu, 2 Aug 2018 07:21:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CCA02AF77; Thu, 2 Aug 2018 07:21:35 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F3C7E2A6E5 for ; Thu, 2 Aug 2018 07:21:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC7F46E373; Thu, 2 Aug 2018 07:19:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl0-x242.google.com (mail-pl0-x242.google.com [IPv6:2607:f8b0:400e:c01::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 599856E044 for ; Wed, 1 Aug 2018 19:12:39 +0000 (UTC) Received: by mail-pl0-x242.google.com with SMTP id w3-v6so9232741plq.2 for ; Wed, 01 Aug 2018 12:12:39 -0700 (PDT) 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:in-reply-to :references; bh=pAJbrA/YfR7XZFVIlgPNgmhmafBwE/Gcygtk7HRyCVA=; b=VPMpkQNF8w2HkKUimYFaqk1lnM7fOh4KNAomE2HDV+RZZPTwUnbvSYZd3QvQh2PBJ6 im+WtJttM+GEmyM/rutkZnhaybmVDLqCeUzI5L8x+dcTnNeb5o71jgRa4IQAXYXWFCCC 2MlWkWOPEjJcUsb7KvBPUGoIoLGp4r7I+7GI26fVZ/uCLDdUhxQoC8jCAqzWk/kv8g7Y sIG2YDFa9Ya6VQYLTPNg725eBtRZdQIrNggHGK9aiy24UFWG+WyqbHFWZwVV0MyUbC0G 9mSEnNxUcZDlPcupX+pBd0G+2sYobusRKO0XFkYinqXyQ22lInaZUoRxpI9pFHsE2Epx rBrQ== X-Gm-Message-State: AOUpUlEroC2JbovV2HGm+coEs4p2Y7ZxmPOA8ycv4OzXeQqR0r39tXaR /tC8xUwZuas/TTTecJ3DSIQ= X-Google-Smtp-Source: AAOMgpdNDMNz7bN3uxK9RLcLHv+oxIpomXuwYcUoU5YAG+ob94Rx5sxtVarot8nR1UtrGeAFqrjN6A== X-Received: by 2002:a17:902:3a5:: with SMTP id d34-v6mr2529338pld.98.1533150758942; Wed, 01 Aug 2018 12:12:38 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Aug 2018 12:12:38 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: linux-media@vger.kernel.org Subject: [PATCH v3 02/14] gpu: ipu-csi: Check for field type alternate Date: Wed, 1 Aug 2018 12:12:15 -0700 Message-Id: <1533150747-30677-3-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533150747-30677-1-git-send-email-steve_longerbeam@mentor.com> References: <1533150747-30677-1-git-send-email-steve_longerbeam@mentor.com> X-Mailman-Approved-At: Thu, 02 Aug 2018 07:19:10 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Steve Longerbeam , "open list:DRM DRIVERS FOR FREESCALE IMX" , open list MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When the CSI is receiving from a bt.656 bus, include a check for field type 'alternate' when determining whether to set CSI clock mode to CCIR656_INTERLACED or CCIR656_PROGRESSIVE. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-csi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/ipu-v3/ipu-csi.c b/drivers/gpu/ipu-v3/ipu-csi.c index caa05b0..5450a2d 100644 --- a/drivers/gpu/ipu-v3/ipu-csi.c +++ b/drivers/gpu/ipu-v3/ipu-csi.c @@ -339,7 +339,8 @@ static void fill_csi_bus_cfg(struct ipu_csi_bus_config *csicfg, break; case V4L2_MBUS_BT656: csicfg->ext_vsync = 0; - if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field)) + if (V4L2_FIELD_HAS_BOTH(mbus_fmt->field) || + mbus_fmt->field == V4L2_FIELD_ALTERNATE) csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED; else csicfg->clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;