From patchwork Mon Jan 11 18:00:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 8007781 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2BB8B9F88A for ; Mon, 11 Jan 2016 18:00:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B9DA202DD for ; Mon, 11 Jan 2016 18:00:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7BD1E20295 for ; Mon, 11 Jan 2016 18:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759610AbcAKSAv (ORCPT ); Mon, 11 Jan 2016 13:00:51 -0500 Received: from mail-pa0-f65.google.com ([209.85.220.65]:34423 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759526AbcAKSAv (ORCPT ); Mon, 11 Jan 2016 13:00:51 -0500 Received: by mail-pa0-f65.google.com with SMTP id yy13so24818602pab.1; Mon, 11 Jan 2016 10:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TbCmulI8VL68vT8xBli0I8HLyWKw9KKySErYmtjUh1c=; b=BbZ1GGoC3YpPtHAtZaX2mLrCpV0QgHl/PCdbGl9clfo321yaygL+4/zbXTOLDymMxU b1a7pivW1rN53pDfCf3TAefFZVXz7hlxQAk+L5sYZnu3mdBMc8EP9E3JimM/hMnh+a/i 4gGsXkY19spiO2clDifHR/VUOhGVuW81RRFlHzOHJOEqv655IiYaK7SHjWgjNKHRNG2W WrGyBG6S8MgA51use2Eo25eToVShU+L0xkQKsCZjSbbBngpN3yZQDDXgbf8XgllCCWQk VCWkMKt7ad6YEoDAwg4/SDT/OHdmRdo5lpJUFNpoi+XfwMMbZl8D79z58rCqqpdRMNY5 NQiw== X-Received: by 10.66.234.200 with SMTP id ug8mr106276109pac.129.1452535250780; Mon, 11 Jan 2016 10:00:50 -0800 (PST) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by smtp.gmail.com with ESMTPSA id f12sm120336270pat.20.2016.01.11.10.00.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 10:00:50 -0800 (PST) From: Yoshihiro Kaneko To: linux-media@vger.kernel.org Cc: Guennadi Liakhovetski , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH 3/3] media: soc_camera: rcar_vin: Add ARGB8888 caputre format support Date: Tue, 12 Jan 2016 03:00:11 +0900 Message-Id: <1452535211-4869-4-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1452535211-4869-1-git-send-email-ykaneko0929@gmail.com> References: <1452535211-4869-1-git-send-email-ykaneko0929@gmail.com> Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 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 This patch adds ARGB8888 capture format support for R-Car Gen3. Signed-off-by: Koji Matsuoka Signed-off-by: Yoshihiro Kaneko --- drivers/media/platform/soc_camera/rcar_vin.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index cccd859..afe27bb 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -124,7 +124,7 @@ #define VNDMR_EXRGB (1 << 8) #define VNDMR_BPSM (1 << 4) #define VNDMR_DTMD_YCSEP (1 << 1) -#define VNDMR_DTMD_ARGB1555 (1 << 0) +#define VNDMR_DTMD_ARGB (1 << 0) /* Video n Data Mode Register 2 bits */ #define VNDMR2_VPS (1 << 30) @@ -643,7 +643,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) output_is_yuv = true; break; case V4L2_PIX_FMT_RGB555X: - dmr = VNDMR_DTMD_ARGB1555; + dmr = VNDMR_DTMD_ARGB; break; case V4L2_PIX_FMT_RGB565: dmr = 0; @@ -654,6 +654,14 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) dmr = VNDMR_EXRGB; break; } + case V4L2_PIX_FMT_ARGB32: + if (priv->chip == RCAR_GEN3) + dmr = VNDMR_EXRGB | VNDMR_DTMD_ARGB; + else { + dev_err(icd->parent, "Not support format\n"); + return -EINVAL; + } + break; default: dev_warn(icd->parent, "Invalid fourcc format (0x%x)\n", icd->current_fmt->host_fmt->fourcc); @@ -1304,6 +1312,14 @@ static const struct soc_mbus_pixelfmt rcar_vin_formats[] = { .order = SOC_MBUS_ORDER_LE, .layout = SOC_MBUS_LAYOUT_PACKED, }, + { + .fourcc = V4L2_PIX_FMT_ARGB32, + .name = "ARGB8888", + .bits_per_sample = 32, + .packing = SOC_MBUS_PACKING_NONE, + .order = SOC_MBUS_ORDER_LE, + .layout = SOC_MBUS_LAYOUT_PACKED, + }, }; static int rcar_vin_get_formats(struct soc_camera_device *icd, unsigned int idx, @@ -1611,6 +1627,7 @@ static int rcar_vin_set_fmt(struct soc_camera_device *icd, case V4L2_PIX_FMT_RGB32: can_scale = priv->chip != RCAR_E1; break; + case V4L2_PIX_FMT_ARGB32: case V4L2_PIX_FMT_UYVY: case V4L2_PIX_FMT_YUYV: case V4L2_PIX_FMT_RGB565: