From patchwork Wed Oct 29 04:11:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 5183831 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 A60E1C11AD for ; Wed, 29 Oct 2014 04:11:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C28F820172 for ; Wed, 29 Oct 2014 04:11:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1E9D2017D for ; Wed, 29 Oct 2014 04:11:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751002AbaJ2ELK (ORCPT ); Wed, 29 Oct 2014 00:11:10 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:36141 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbaJ2ELJ (ORCPT ); Wed, 29 Oct 2014 00:11:09 -0400 Received: from ayumi.isobedori.kobe.vergenet.net (p7231-ipbfp1204kobeminato.hyogo.ocn.ne.jp [118.11.151.231]) by kirsty.vergenet.net (Postfix) with ESMTP id D8B0325BE56; Wed, 29 Oct 2014 15:11:06 +1100 (EST) Received: by ayumi.isobedori.kobe.vergenet.net (Postfix, from userid 7100) id B7836EDE5ED; Wed, 29 Oct 2014 13:11:04 +0900 (JST) Date: Wed, 29 Oct 2014 13:11:04 +0900 From: Simon Horman To: Yoshihiro Kaneko Cc: Sergei Shtylyov , Linux Media Mailing List , Guennadi Liakhovetski , Magnus Damm , Linux-sh list Subject: Re: [PATCH v2] media: soc_camera: rcar_vin: Add BT.709 24-bit RGB888 input support Message-ID: <20141029041103.GB29787@verge.net.au> References: <1413868129-22121-1-git-send-email-ykaneko0929@gmail.com> <544633D3.5010805@cogentembedded.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organisation: Horms Solutions Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Hi Kaneko-san, Hi Sergei, On Tue, Oct 21, 2014 at 08:33:52PM +0900, Yoshihiro Kaneko wrote: > Hello Sergei, > > 2014-10-21 19:22 GMT+09:00 Sergei Shtylyov : > > Hello. > > > > On 10/21/2014 9:08 AM, Yoshihiro Kaneko wrote: > > > >> From: Koji Matsuoka > > > > > >> Signed-off-by: Koji Matsuoka > >> Signed-off-by: Yoshihiro Kaneko > >> --- > > > > > >> This patch is against master branch of linuxtv.org/media_tree.git. > > > > > >> v2 [Yoshihiro Kaneko] > >> * remove unused/useless definition as suggested by Sergei Shtylyov > > > > > > I didn't say it's useless, I just suspected that you missed the necessary > > test somewhere... > > Sorry for my inaccurate description. > > > > >> 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 20defcb..cb5e682 100644 > >> --- a/drivers/media/platform/soc_camera/rcar_vin.c > >> +++ b/drivers/media/platform/soc_camera/rcar_vin.c > >> @@ -74,6 +74,7 @@ > >> #define VNMC_INF_YUV10_BT656 (2 << 16) > >> #define VNMC_INF_YUV10_BT601 (3 << 16) > >> #define VNMC_INF_YUV16 (5 << 16) > >> +#define VNMC_INF_RGB888 (6 << 16) > >> #define VNMC_VUP (1 << 10) > >> #define VNMC_IM_ODD (0 << 3) > >> #define VNMC_IM_ODD_EVEN (1 << 3) > > > > [...] > >> > >> @@ -331,6 +336,9 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) > >> if (output_is_yuv) > >> vnmc |= VNMC_BPS; > >> > >> + if (vnmc & VNMC_INF_RGB888) > >> + vnmc ^= VNMC_BPS; > >> + > > > > > > Hm, this also changes the behavior for VNMC_INF_YUV16 and > > VNMC_INF_YUV10_BT{601|656}. Is this actually intended? > > Probably this code is incorrect. > Thank you for your review. Thanks, I have confirmed with Matsuoka-san that there is a problem here. He has provided the following fix. Could you see about squashing it into the above patch and reposting? From: Koji Matsuoka [PATCH] media: soc_camera: rcar_vin: Fix bit field check Signed-off-by: Koji Matsuoka --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 013d75c..da62d94 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -94,7 +94,7 @@ #define VNMC_INF_YUV8_BT601 (1 << 16) #define VNMC_INF_YUV16 (5 << 16) #define VNMC_INF_RGB888 (6 << 16) -#define VNMC_INF_RGB_MASK (6 << 16) +#define VNMC_INF_MASK (7 << 16) #define VNMC_VUP (1 << 10) #define VNMC_IM_ODD (0 << 3) #define VNMC_IM_ODD_EVEN (1 << 3) @@ -675,7 +675,7 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv) if (output_is_yuv) vnmc |= VNMC_BPS; - if (vnmc & VNMC_INF_RGB_MASK) + if ((vnmc & VNMC_INF_MASK) == VNMC_INF_RGB888) vnmc ^= VNMC_BPS; /* progressive or interlaced mode */