LinuxTV Patchwork media: s5p-jpeg: Correct step and max values for V4L2_CID_JPEG_RESTART_INTERVAL

login
register
mail settings
Submitter Pawe? Chmiel
Date Jan. 9, 2019, 6 p.m.
Message ID <20190109180041.31052-1-pawel.mikolaj.chmiel@gmail.com>
Download mbox | patch
Permalink /patch/53805/
State Accepted
Delegated to: Hans Verkuil
Headers show

Comments

Pawe? Chmiel - Jan. 9, 2019, 6 p.m.
This commit corrects max and step values for v4l2 control for
V4L2_CID_JPEG_RESTART_INTERVAL. Max should be 0xffff and step should be 1.
It was found by using v4l2-compliance tool and checking result of
VIDIOC_QUERY_EXT_CTRL/QUERYMENU test.
Previously it was complaining that step was bigger than difference
between max and min.

Fixes: 15f4bc3b1f42 ("[media] s5p-jpeg: Add JPEG controls support")
Signed-off-by: Pawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>
---
 drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Jacek Anaszewski - Jan. 9, 2019, 8:50 p.m.
Hi Pawe?,

Thank you for the patch.

On 1/9/19 7:00 PM, Pawe? Chmiel wrote:
> This commit corrects max and step values for v4l2 control for
> V4L2_CID_JPEG_RESTART_INTERVAL. Max should be 0xffff and step should be 1.
> It was found by using v4l2-compliance tool and checking result of
> VIDIOC_QUERY_EXT_CTRL/QUERYMENU test.
> Previously it was complaining that step was bigger than difference
> between max and min.
> 
> Fixes: 15f4bc3b1f42 ("[media] s5p-jpeg: Add JPEG controls support")
> Signed-off-by: Pawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
>   drivers/media/platform/s5p-jpeg/jpeg-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> index 3f9000b70385..33e9927db9a0 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -2002,7 +2002,7 @@ static int s5p_jpeg_controls_create(struct s5p_jpeg_ctx *ctx)
>   
>   		v4l2_ctrl_new_std(&ctx->ctrl_handler, &s5p_jpeg_ctrl_ops,
>   				  V4L2_CID_JPEG_RESTART_INTERVAL,
> -				  0, 3, 0xffff, 0);
> +				  0, 0xffff, 1, 0);
>   		if (ctx->jpeg->variant->version == SJPEG_S5P)
>   			mask = ~0x06; /* 422, 420 */
>   	}
> 

Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Sylwester Nawrocki - Jan. 10, 2019, 9:58 a.m.
On 1/9/19 19:00, Pawe? Chmiel wrote:
> This commit corrects max and step values for v4l2 control for
> V4L2_CID_JPEG_RESTART_INTERVAL. Max should be 0xffff and step should be 1.
> It was found by using v4l2-compliance tool and checking result of
> VIDIOC_QUERY_EXT_CTRL/QUERYMENU test.
> Previously it was complaining that step was bigger than difference
> between max and min.
> 
> Fixes: 15f4bc3b1f42 ("[media] s5p-jpeg: Add JPEG controls support")
> Signed-off-by: Pawe? Chmiel <pawel.mikolaj.chmiel@gmail.com>

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

Patch

diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 3f9000b70385..33e9927db9a0 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -2002,7 +2002,7 @@  static int s5p_jpeg_controls_create(struct s5p_jpeg_ctx *ctx)
 
 		v4l2_ctrl_new_std(&ctx->ctrl_handler, &s5p_jpeg_ctrl_ops,
 				  V4L2_CID_JPEG_RESTART_INTERVAL,
-				  0, 3, 0xffff, 0);
+				  0, 0xffff, 1, 0);
 		if (ctx->jpeg->variant->version == SJPEG_S5P)
 			mask = ~0x06; /* 422, 420 */
 	}

Privacy Policy