Message ID | 20141029041103.GB29787@verge.net.au (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Guennadi Liakhovetski |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) 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 <rfc822;mkrufky@linuxtv.org> + 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 <rfc822;linux-media@vger.kernel.org>); 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 <horms@verge.net.au> To: Yoshihiro Kaneko <ykaneko0929@gmail.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>, Linux Media Mailing List <linux-media@vger.kernel.org>, Guennadi Liakhovetski <g.liakhovetski@gmx.de>, Magnus Damm <magnus.damm@gmail.com>, Linux-sh list <linux-sh@vger.kernel.org> 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> <CAH1o70Jk=dCf3VWqdAJmGzd6TSQFeN=x+FCKExDzaf0BZF0L1A@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <CAH1o70Jk=dCf3VWqdAJmGzd6TSQFeN=x+FCKExDzaf0BZF0L1A@mail.gmail.com> Organisation: Horms Solutions Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> 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' |
Commit Message
Simon Horman
Oct. 29, 2014, 4:11 a.m. UTC
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 <sergei.shtylyov@cogentembedded.com>: > > Hello. > > > > On 10/21/2014 9:08 AM, Yoshihiro Kaneko wrote: > > > >> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > > > > >> Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > >> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > >> --- > > > > > >> 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 <koji.matsuoka.xm@renesas.com> [PATCH] media: soc_camera: rcar_vin: Fix bit field check Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> -- 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
Comments
Hello. On 10/29/2014 7:11 AM, Simon Horman wrote: >>>> From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> >>>> Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> >>>> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> >>>> --- >>>> 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 <koji.matsuoka.xm@renesas.com> > [PATCH] media: soc_camera: rcar_vin: Fix bit field check > Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > 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 it above VNMC_INF_YUV8_BT656 please. > #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) Is he sure it shouldn't be (vnmc & VNMC_INF_RGB888) == VNMC_INF_RGB888 to also cover 16-bit RGB666 and 12-bit RGB88? WBR, Sergei -- 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
On Wed, Oct 29, 2014 at 02:31:41PM +0300, Sergei Shtylyov wrote: > Hello. > > On 10/29/2014 7:11 AM, Simon Horman wrote: > > >>>>From: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > >>>>Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > >>>>Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> > >>>>--- > > >>>>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 <koji.matsuoka.xm@renesas.com> > > >[PATCH] media: soc_camera: rcar_vin: Fix bit field check > > >Signed-off-by: Koji Matsuoka <koji.matsuoka.xm@renesas.com> > > >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 it above VNMC_INF_YUV8_BT656 please. > > > #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) > > Is he sure it shouldn't be (vnmc & VNMC_INF_RGB888) == VNMC_INF_RGB888 to > also cover 16-bit RGB666 and 12-bit RGB88? Nice, I think that is a good idea (although the latter formats aren't supported by the driver yet, right?). Its somewhat unobvious how that logic works so perhaps we should add a comment like this /* If input and output use the same colorspace, use bypass mode */ if (output_is_yuv) vnmc |= VNMC_BPS; /* The above assumes YUV input, toggle BPS for RGB input. * RGB inputs can be detected by checking that the most-significant * two bits of INF are set. This corresponds to the bits * set in VNMC_INF_RGB888. */ if ((vnmc & VNMC_INF_RGB888)) == VNMC_INF_RGB888) vnmc ^= VNMC_BPS; -- 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 */