From patchwork Mon Feb 24 15:49:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 3710091 Return-Path: X-Original-To: patchwork-linux-media@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 E167BBF13A for ; Mon, 24 Feb 2014 15:55:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0F7722010C for ; Mon, 24 Feb 2014 15:55:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C79F6200FE for ; Mon, 24 Feb 2014 15:55:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753036AbaBXPzL (ORCPT ); Mon, 24 Feb 2014 10:55:11 -0500 Received: from relmlor4.renesas.com ([210.160.252.174]:25445 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752545AbaBXPzE (ORCPT ); Mon, 24 Feb 2014 10:55:04 -0500 X-Greylist: delayed 303 seconds by postgrey-1.27 at vger.kernel.org; Mon, 24 Feb 2014 10:55:03 EST Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie3.idc.renesas.com with ESMTP; 25 Feb 2014 00:49:59 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 1BF234A67C; Tue, 25 Feb 2014 00:49:59 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 02121280A5; Tue, 25 Feb 2014 00:49:58 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id F1639280A0; Tue, 25 Feb 2014 00:49:58 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id AAK32327; Tue, 25 Feb 2014 00:49:58 +0900 X-IronPort-AV: E=Sophos;i="4.97,535,1389711600"; d="scan'208";a="153982527" Received: from unknown (HELO relay41.aps.necel.com) ([10.29.19.9]) by relmlii1.idc.renesas.com with ESMTP; 25 Feb 2014 00:49:58 +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 s1OFnu7u006943; Tue, 25 Feb 2014 00:49:56 +0900 (JST) Received: by julia (Postfix, from userid 2) id 079184B23B; Mon, 24 Feb 2014 16:49:56 +0100 (CET) Received: from DU0NOTES13.ad.ree.renesas.com (unknown [172.29.24.131]) by julia (Postfix) with ESMTP id ED1314B233; Mon, 24 Feb 2014 16:49:55 +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 2014022416490939-192117 ; Mon, 24 Feb 2014 16:49:09 +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 X-TNEFEvaluated: 1 Message-ID: <1393256945-12781-1-git-send-email-phil.edworthy@renesas.com> Date: Mon, 24 Feb 2014 15:49:05 +0000 Subject: [PATCH] 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 24.02.2014 16:49:09, Serialize by Router on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 24.02.2014 16:49:10, Serialize complete at 24.02.2014 16:49:10 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 --- drivers/media/platform/soc_camera/rcar_vin.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 3b1c05a..9929375 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,10 @@ 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; + 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; default: break; } @@ -1003,6 +1009,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;