From patchwork Sun May 21 22:02:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9739543 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A91106034C for ; Mon, 22 May 2017 00:49:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94C5028622 for ; Mon, 22 May 2017 00:49:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 859D028643; Mon, 22 May 2017 00:49:06 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 11DE028622 for ; Mon, 22 May 2017 00:49:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 423448997E; Mon, 22 May 2017 00:49:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 36EC86E0CD for ; Sun, 21 May 2017 22:02:21 +0000 (UTC) Received: by mail-pf0-x243.google.com with SMTP id f27so15610542pfe.0 for ; Sun, 21 May 2017 15:02:21 -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; bh=lUHWyMDA9B8AdeBj2vdQqszIdsqcSmyRdPftSTRphEI=; b=R1GuPDYysy9lGmk/xQxH9fybFLSA6iQf8kQ8MyiElALatx94OlhNs7bw8hxC1kVpqQ aHChZ9kSJSEIxrN3JbWVDJdV86ar3jx41LogPox2XTifX1+kOgtiNuMPeU13RT2o78cR pV8MGQDSOdAj0n70m8RivLZUXsXK+QF6XDgDBQ62Ay9y08pR3r3uLxTUEdwoOvTEVRac sc0C6I5UCyVLa4PMKqbej9yk0Wmh1GdKEJSieChx/d2cr/8bEixYGLKe6FKRO+uhvwTJ ziHCmqZ5PCLBC44jxNAGJZ/M3j++AGSvsZJ6B7fakpy00muvt7ai/XCSxl6hOIDWZCc3 5v1Q== 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; bh=lUHWyMDA9B8AdeBj2vdQqszIdsqcSmyRdPftSTRphEI=; b=DanGh3TCRWbmiVAmgVqtIl3L9bioyolv8dRHZrel/vvSBYNg5mt0WDTJMjUKF5bRtF pXSEkU+cawTUviFyoaRLAYkCCtQriQynEksb2yL7ZZcKhktzKimYLL2lc/McWywJyjzm X8NWjRAGHEOQpnKbRzPeek+N51PCum1K9ajim+bHSPYdPGd0n8p2ps8uQ4/JskSo6hES CBsHEflpXO8CBQURVqSomfT1Px94tTRNJFuX1r0aEW84iZ7JTKgIgY07PgZ7YkjErWMh UmyVKwobcfvu6wGS7TPHQSHMvMD1NaVD1s3aWiANC2UzQRFbRLisBIy3h9uD3MSaHui1 3tmg== X-Gm-Message-State: AODbwcCPbM+xpa7VZv4boraxicPfVa/IQJn1yohUp49aRjsjAh/P0HyI ZCi3G8x+epALcw== X-Received: by 10.84.213.143 with SMTP id g15mr24946830pli.53.1495404140854; Sun, 21 May 2017 15:02:20 -0700 (PDT) Received: from mappy.skldolphin.net (c-24-5-209-231.hsd1.ca.comcast.net. [24.5.209.231]) by smtp.googlemail.com with ESMTPSA id r13sm28849023pgn.16.2017.05.21.15.02.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 May 2017 15:02:19 -0700 (PDT) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: Philipp Zabel Subject: [PATCH] gpu: ipu-v3: vdic: include AUTO field order bit in ipu_vdi_set_field_order Date: Sun, 21 May 2017 15:02:10 -0700 Message-Id: <1495404130-11115-1-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 2.7.4 X-Mailman-Approved-At: Mon, 22 May 2017 00:49:01 +0000 Cc: Steve Longerbeam , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The field order selection in VDIC_C register uses different bits depending on whether the VDIC is receiving from a CSI ("AUTO") or from memory ("MAN"). Since the VDIC cannot receive from both CSI and memory at the same time, set or clear both field order bits to cover both cases. Signed-off-by: Steve Longerbeam --- drivers/gpu/ipu-v3/ipu-vdi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-vdi.c b/drivers/gpu/ipu-v3/ipu-vdi.c index f27bf5a..a663893 100644 --- a/drivers/gpu/ipu-v3/ipu-vdi.c +++ b/drivers/gpu/ipu-v3/ipu-vdi.c @@ -88,9 +88,9 @@ void ipu_vdi_set_field_order(struct ipu_vdi *vdi, v4l2_std_id std, u32 field) reg = ipu_vdi_read(vdi, VDI_C); if (top_field_0) - reg &= ~VDI_C_TOP_FIELD_MAN_1; + reg &= ~(VDI_C_TOP_FIELD_MAN_1 | VDI_C_TOP_FIELD_AUTO_1); else - reg |= VDI_C_TOP_FIELD_MAN_1; + reg |= VDI_C_TOP_FIELD_MAN_1 | VDI_C_TOP_FIELD_AUTO_1; ipu_vdi_write(vdi, reg, VDI_C); spin_unlock_irqrestore(&vdi->lock, flags);