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: 26606 X-Patchwork-Delegate: g.liakhovetski@gmx.de Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1XjKbV-0002gH-E3; Wed, 29 Oct 2014 05:11:25 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-5) with esmtp id 1XjKbS-0003QA-9K; Wed, 29 Oct 2014 05:11:24 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751002AbaJ2ELK (ORCPT + 1 other); 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-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2014.10.29.40022 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS , __USER_AGENT 0' 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 */