From patchwork Wed Oct 22 04:05:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 5129561 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8896AC11AC for ; Wed, 22 Oct 2014 04:06:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B277F201ED for ; Wed, 22 Oct 2014 04:06:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C84F200E8 for ; Wed, 22 Oct 2014 04:06:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750837AbaJVEG1 (ORCPT ); Wed, 22 Oct 2014 00:06:27 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:56310 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbaJVEG1 (ORCPT ); Wed, 22 Oct 2014 00:06:27 -0400 Received: by mail-pa0-f46.google.com with SMTP id fa1so2802571pad.5 for ; Tue, 21 Oct 2014 21:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=a0snAEE1buF44rABPXUG03cf1/hqGI/xjTt+e6CjJO0=; b=g2zTWKa4STB8i9X2efTvOmrTmQasg0wqnF8ot7jDzL53yhbss2u6rwlQHYcNMAVENP j1YmmCDdoZmjb1qXwH8q9xLuh1b8RfuvZcvzaJmvP6D9njRjF8QHrCSsgeq1+8t70EV/ 6Yajdv3YiCHMQ4huR03fo9VnWN6DuzHaf2JpsFGvQmuuPs49BUp5zygP53Cdab292/5W qetDR3Av0BPImuUf4OL3za6ikxHXp1eJlOe51Q3xUgXTsXAKcdxz4UWatOOm3rYZ80e4 gPjH/qZIgoIshD/TaGLVZKTPCeaJPTEnTQh/BPqBB7Duw2QRFeiP6YQdlxfWlpBLb134 WgvQ== X-Received: by 10.68.248.40 with SMTP id yj8mr39712671pbc.58.1413950786769; Tue, 21 Oct 2014 21:06:26 -0700 (PDT) Received: from localhost.localdomain (p5095-ipngn6701marunouchi.tokyo.ocn.ne.jp. [153.174.4.95]) by mx.google.com with ESMTPSA id pc8sm6167990pbc.10.2014.10.21.21.06.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Oct 2014 21:06:26 -0700 (PDT) From: Yoshihiro Kaneko To: linux-media@vger.kernel.org Cc: Guennadi Liakhovetski , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH v2] media: soc_camera: rcar_vin: Enable VSYNC field toggle mode Date: Wed, 22 Oct 2014 13:05:36 +0900 Message-Id: <1413950736-8230-1-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Koji Matsuoka By applying this patch, it sets to VSYNC field toggle mode not only at the time of progressive mode but at the time of an interlace mode. Signed-off-by: Koji Matsuoka Signed-off-by: Yoshihiro Kaneko Acked-by: Simon Horman --- This patch is against master branch of linuxtv.org/media_tree.git. v2 [Yoshihiro Kaneko] * improve the macro definition for the VLV field drivers/media/platform/soc_camera/rcar_vin.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 9300076..beaf8e5 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -107,6 +107,7 @@ #define VNDMR2_VPS (1 << 30) #define VNDMR2_HPS (1 << 29) #define VNDMR2_FTEV (1 << 17) +#define VNDMR2_VLV(n) ((n & 0xf) << 12) #define VIN_MAX_WIDTH 2048 #define VIN_MAX_HEIGHT 2048 @@ -827,7 +828,7 @@ static int rcar_vin_set_bus_param(struct soc_camera_device *icd) if (ret < 0 && ret != -ENOIOCTLCMD) return ret; - val = priv->field == V4L2_FIELD_NONE ? VNDMR2_FTEV : 0; + val = VNDMR2_FTEV | VNDMR2_VLV(1); if (!(common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)) val |= VNDMR2_VPS; if (!(common_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW))