From: Jacopo Mondi <jacopo+renesas@jmondi.org> To: laurent.pinchart@ideasonboard.com, magnus.damm@gmail.com, geert@glider.be, hverkuil@xs4all.nl, mchehab@kernel.org, festevam@gmail.com, sakari.ailus@iki.fi, robh+dt@kernel.org, mark.rutland@arm.com, pombredanne@nexb.com Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 11/11] media: i2c: ov7670: Fully set mbus frame fmt Date: Fri, 26 Jan 2018 13:55:30 +0000 [thread overview] Message-ID: <1516974930-11713-12-git-send-email-jacopo+renesas@jmondi.org> (raw) In-Reply-To: <1516974930-11713-1-git-send-email-jacopo+renesas@jmondi.org> The sensor driver sets mbus format colorspace information and sizes, but not ycbcr encoding, quantization and xfer function. When supplied with an badly initialized mbus frame format structure, those fields need to be set explicitly not to leave them uninitialized. This is tested by v4l2-compliance, which supplies a mbus format description structure and checks for all fields to be properly set. Without this commit, v4l2-compliance fails when testing formats with: fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> --- drivers/media/i2c/ov7670.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 25b26d4..61c472e 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -996,6 +996,10 @@ static int ov7670_try_fmt_internal(struct v4l2_subdev *sd, fmt->height = wsize->height; fmt->colorspace = ov7670_formats[index].colorspace; + fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + fmt->quantization = V4L2_QUANTIZATION_DEFAULT; + fmt->xfer_func = V4L2_XFER_FUNC_DEFAULT; + info->format = *fmt; return 0; -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Jacopo Mondi <jacopo+renesas@jmondi.org> To: laurent.pinchart@ideasonboard.com, magnus.damm@gmail.com, geert@glider.be, hverkuil@xs4all.nl, mchehab@kernel.org, festevam@gmail.com, sakari.ailus@iki.fi, robh+dt@kernel.org, mark.rutland@arm.com, pombredanne@nexb.com Cc: Jacopo Mondi <jacopo+renesas@jmondi.org>, linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org, linux-sh@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v7 11/11] media: i2c: ov7670: Fully set mbus frame fmt Date: Fri, 26 Jan 2018 14:55:30 +0100 [thread overview] Message-ID: <1516974930-11713-12-git-send-email-jacopo+renesas@jmondi.org> (raw) In-Reply-To: <1516974930-11713-1-git-send-email-jacopo+renesas@jmondi.org> The sensor driver sets mbus format colorspace information and sizes, but not ycbcr encoding, quantization and xfer function. When supplied with an badly initialized mbus frame format structure, those fields need to be set explicitly not to leave them uninitialized. This is tested by v4l2-compliance, which supplies a mbus format description structure and checks for all fields to be properly set. Without this commit, v4l2-compliance fails when testing formats with: fail: v4l2-test-formats.cpp(335): ycbcr_enc >= 0xff Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> --- drivers/media/i2c/ov7670.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index 25b26d4..61c472e 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -996,6 +996,10 @@ static int ov7670_try_fmt_internal(struct v4l2_subdev *sd, fmt->height = wsize->height; fmt->colorspace = ov7670_formats[index].colorspace; + fmt->ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; + fmt->quantization = V4L2_QUANTIZATION_DEFAULT; + fmt->xfer_func = V4L2_XFER_FUNC_DEFAULT; + info->format = *fmt; return 0; -- 2.7.4
next prev parent reply other threads:[~2018-01-26 13:55 UTC|newest] Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-01-26 13:48 [PATCH v7 00/11] Renesas Capture Engine Unit (CEU) V4L2 driver Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 01/11] dt-bindings: media: Add Renesas CEU bindings Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 02/11] include: media: Add Renesas CEU driver interface Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 03/11] media: platform: Add Renesas CEU driver Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 3/9] v4l: " Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 04/11] ARM: dts: r7s72100: Add Capture Engine Unit (CEU) Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 05/11] media: i2c: Copy ov772x soc_camera sensor driver Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 5/9] v4l: " Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 06/11] media: i2c: ov772x: Remove soc_camera dependencies Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 07/11] media: i2c: ov772x: Support frame interval handling Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 7/9] v4l: i2c: Copy tw9910 soc_camera sensor driver Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 08/11] media: " Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 8/9] media: i2c: tw9910: Remove soc_camera dependencies Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 9/9] arch: sh: migor: Use new renesas-ceu camera driver Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 09/11] media: i2c: tw9910: Remove soc_camera dependencies Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:48 ` [PATCH v7 10/11] arch: sh: migor: Use new renesas-ceu camera driver Jacopo Mondi 2018-01-26 13:48 ` Jacopo Mondi 2018-01-26 13:54 ` [PATCH v7 00/11] Renesas Capture Engine Unit (CEU) V4L2 driver jacopo mondi 2018-01-26 13:54 ` jacopo mondi 2018-01-26 13:56 ` Geert Uytterhoeven 2018-01-26 13:56 ` Geert Uytterhoeven 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 01/11] dt-bindings: media: Add Renesas CEU bindings Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 02/11] include: media: Add Renesas CEU driver interface Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 03/11] media: platform: Add Renesas CEU driver Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 04/11] ARM: dts: r7s72100: Add Capture Engine Unit (CEU) Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 05/11] media: i2c: Copy ov772x soc_camera sensor driver Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 06/11] media: i2c: ov772x: Remove soc_camera dependencies Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 07/11] media: i2c: ov772x: Support frame interval handling Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-29 11:01 ` Laurent Pinchart 2018-01-29 11:01 ` Laurent Pinchart 2018-01-30 9:47 ` jacopo mondi 2018-01-30 9:47 ` jacopo mondi 2018-01-30 9:47 ` jacopo mondi 2018-01-26 13:55 ` [PATCH v7 08/11] media: i2c: Copy tw9910 soc_camera sensor driver Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 09/11] media: i2c: tw9910: Remove soc_camera dependencies Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` [PATCH v7 10/11] arch: sh: migor: Use new renesas-ceu camera driver Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi 2018-01-26 13:55 ` Jacopo Mondi [this message] 2018-01-26 13:55 ` [PATCH v7 11/11] media: i2c: ov7670: Fully set mbus frame fmt Jacopo Mondi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1516974930-11713-12-git-send-email-jacopo+renesas@jmondi.org \ --to=jacopo+renesas@jmondi.org \ --cc=devicetree@vger.kernel.org \ --cc=festevam@gmail.com \ --cc=geert@glider.be \ --cc=hverkuil@xs4all.nl \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=linux-renesas-soc@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=magnus.damm@gmail.com \ --cc=mark.rutland@arm.com \ --cc=mchehab@kernel.org \ --cc=pombredanne@nexb.com \ --cc=robh+dt@kernel.org \ --cc=sakari.ailus@iki.fi \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.