From patchwork Tue Feb 25 09:10:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 3713641 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 47B57BF40C for ; Tue, 25 Feb 2014 09:11:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 783032018E for ; Tue, 25 Feb 2014 09:11:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96B3F2016C for ; Tue, 25 Feb 2014 09:11:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752033AbaBYJLX (ORCPT ); Tue, 25 Feb 2014 04:11:23 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:26472 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751495AbaBYJLU (ORCPT ); Tue, 25 Feb 2014 04:11:20 -0500 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie2.idc.renesas.com with ESMTP; 25 Feb 2014 18:11:18 +0900 Received: from relmlac1.idc.renesas.com (relmlac1.idc.renesas.com [10.200.69.21]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 60868472C1; Tue, 25 Feb 2014 18:11:18 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id 5F30880193; Tue, 25 Feb 2014 18:11:18 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id 5AAA380177; Tue, 25 Feb 2014 18:11:18 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac1.idc.renesas.com with ESMTP id UAL21636; Tue, 25 Feb 2014 18:11:18 +0900 X-IronPort-AV: E=Sophos;i="4.97,538,1389711600"; d="scan'208";a="154063514" Received: from unknown (HELO relay41.aps.necel.com) ([10.29.19.9]) by relmlii1.idc.renesas.com with ESMTP; 25 Feb 2014 18:11:18 +0900 Received: from julia (du2com5.eu.necel.com [172.29.24.35] (may be forged)) by relay41.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id s1P9BGd0003387; Tue, 25 Feb 2014 18:11:17 +0900 (JST) Received: by julia (Postfix, from userid 2) id 265ED4B239; Tue, 25 Feb 2014 10:11:16 +0100 (CET) Received: from DU0NOTES13.ad.ree.renesas.com (unknown [172.29.24.131]) by julia (Postfix) with ESMTP id 14F0A4B215; Tue, 25 Feb 2014 10:11:16 +0100 (CET) Received: from duacsls.ad.ree.renesas.com ([172.29.43.47]) by DU0NOTES13.ad.ree.renesas.com (Lotus Domino Release 8.5.3 HF466) with ESMTP id 2014022510103029-203843 ; Tue, 25 Feb 2014 10:10:30 +0100 From: Phil Edworthy To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org, Valentine Barshak , Simon Horman , Magnus Damm , Kuninori Morimoto , Laurent Pinchart , Mauro Carvalho Chehab , Hans Verkuil , Guennadi Liakhovetski , Phil Edworthy X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <2516843.7QqJLHtUZT@avalon> References: <2516843.7QqJLHtUZT@avalon> X-TNEFEvaluated: 1 Message-ID: <1393319427-14515-1-git-send-email-phil.edworthy@renesas.com> Date: Tue, 25 Feb 2014 09:10:27 +0000 Subject: [PATCH v2] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras X-MIMETrack: Itemize by SMTP Server on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 25.02.2014 10:10:30, Serialize by Router on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 25.02.2014 10:10:31, Serialize complete at 25.02.2014 10:10:31 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,KHOP_BIG_TO_CC, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Signed-off-by: Phil Edworthy Acked-by: Vladimir Barinov --- v2: - Fix silly mistake with missing break. drivers/media/platform/soc_camera/rcar_vin.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 3b1c05a..702dc47 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -68,6 +68,8 @@ #define VNMC_YCAL (1 << 19) #define VNMC_INF_YUV8_BT656 (0 << 16) #define VNMC_INF_YUV8_BT601 (1 << 16) +#define VNMC_INF_YUV10_BT656 (2 << 16) +#define VNMC_INF_YUV10_BT601 (3 << 16) #define VNMC_INF_YUV16 (5 << 16) #define VNMC_VUP (1 << 10) #define VNMC_IM_ODD (0 << 3) @@ -275,6 +277,12 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) /* BT.656 8bit YCbCr422 or BT.601 8bit YCbCr422 */ vnmc |= priv->pdata->flags & RCAR_VIN_BT656 ? VNMC_INF_YUV8_BT656 : VNMC_INF_YUV8_BT601; + break; + case V4L2_MBUS_FMT_YUYV10_2X10: + /* BT.656 10bit YCbCr422 or BT.601 10bit YCbCr422 */ + vnmc |= priv->pdata->flags & RCAR_VIN_BT656 ? + VNMC_INF_YUV10_BT656 : VNMC_INF_YUV10_BT601; + break; default: break; } @@ -1003,6 +1011,7 @@ static int rcar_vin_get_formats(struct soc_camera_device *icd, unsigned int idx, switch (code) { case V4L2_MBUS_FMT_YUYV8_1X16: case V4L2_MBUS_FMT_YUYV8_2X8: + case V4L2_MBUS_FMT_YUYV10_2X10: if (cam->extra_fmt) break;