diff mbox

[v4,12/13] V4L: s5k6a3: Change sensor min/max resolutions

Message ID 1375866242-18084-13-git-send-email-arun.kk@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arun Kumar K Aug. 7, 2013, 9:04 a.m. UTC
s5k6a3 sensor has actual pixel resolution of 1408x1402 against
the active resolution 1392x1392. The real resolution is needed
when raw sensor SRGB data is dumped to memory by fimc-lite.

Signed-off-by: Arun Kumar K <arun.kk@samsung.com>
---
 drivers/media/i2c/s5k6a3.c |   21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

Comments

Sylwester Nawrocki Aug. 9, 2013, 11:37 p.m. UTC | #1
On 08/07/2013 11:04 AM, Arun Kumar K wrote:
> s5k6a3 sensor has actual pixel resolution of 1408x1402 against
> the active resolution 1392x1392. The real resolution is needed
> when raw sensor SRGB data is dumped to memory by fimc-lite.
>
> Signed-off-by: Arun Kumar K<arun.kk@samsung.com>
> ---
>   drivers/media/i2c/s5k6a3.c |   21 +++++++++++++--------
>   1 file changed, 13 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c
> index ccbb4fc..6dec2ec 100644
> --- a/drivers/media/i2c/s5k6a3.c
> +++ b/drivers/media/i2c/s5k6a3.c
> @@ -25,10 +25,14 @@
>   #include<media/v4l2-async.h>
>   #include<media/v4l2-subdev.h>
>
> -#define S5K6A3_SENSOR_MAX_WIDTH		1392
> -#define S5K6A3_SENSOR_MAX_HEIGHT	1392
> -#define S5K6A3_SENSOR_MIN_WIDTH		32
> -#define S5K6A3_SENSOR_MIN_HEIGHT	32
> +#define S5K6A3_SENSOR_MAX_WIDTH		1408
> +#define S5K6A3_SENSOR_MAX_HEIGHT	1408

Don't you want this to be 1402 ?

> +

Empty line could be removed.

> +#define S5K6A3_SENSOR_ACTIVE_WIDTH	1392
> +#define S5K6A3_SENSOR_ACTIVE_HEIGHT	1392
> +

Ditto.

> +#define S5K6A3_SENSOR_MIN_WIDTH		(32 + 16)
> +#define S5K6A3_SENSOR_MIN_HEIGHT	(32 + 10)
>
>   #define S5K6A3_DEF_PIX_WIDTH		1296
>   #define S5K6A3_DEF_PIX_HEIGHT		732
> @@ -107,10 +111,11 @@ static void s5k6a3_try_format(struct v4l2_mbus_framefmt *mf)
>
>   	fmt = find_sensor_format(mf);
>   	mf->code = fmt->code;
> -	v4l_bound_align_image(&mf->width, S5K6A3_SENSOR_MIN_WIDTH,
> -			      S5K6A3_SENSOR_MAX_WIDTH, 0,
> -			&mf->height, S5K6A3_SENSOR_MIN_HEIGHT,
> -			      S5K6A3_SENSOR_MAX_HEIGHT, 0, 0);
> +	v4l_bound_align_image(&mf->width,
> +			S5K6A3_SENSOR_MIN_WIDTH, S5K6A3_SENSOR_MAX_WIDTH, 0,
> +			&mf->height,
> +			S5K6A3_SENSOR_MIN_HEIGHT, S5K6A3_SENSOR_MAX_HEIGHT, 0,
> +			0);
>   }
>
>   static struct v4l2_mbus_framefmt *__s5k6a3_get_format(


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

Patch

diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c
index ccbb4fc..6dec2ec 100644
--- a/drivers/media/i2c/s5k6a3.c
+++ b/drivers/media/i2c/s5k6a3.c
@@ -25,10 +25,14 @@ 
 #include <media/v4l2-async.h>
 #include <media/v4l2-subdev.h>
 
-#define S5K6A3_SENSOR_MAX_WIDTH		1392
-#define S5K6A3_SENSOR_MAX_HEIGHT	1392
-#define S5K6A3_SENSOR_MIN_WIDTH		32
-#define S5K6A3_SENSOR_MIN_HEIGHT	32
+#define S5K6A3_SENSOR_MAX_WIDTH		1408
+#define S5K6A3_SENSOR_MAX_HEIGHT	1408
+
+#define S5K6A3_SENSOR_ACTIVE_WIDTH	1392
+#define S5K6A3_SENSOR_ACTIVE_HEIGHT	1392
+
+#define S5K6A3_SENSOR_MIN_WIDTH		(32 + 16)
+#define S5K6A3_SENSOR_MIN_HEIGHT	(32 + 10)
 
 #define S5K6A3_DEF_PIX_WIDTH		1296
 #define S5K6A3_DEF_PIX_HEIGHT		732
@@ -107,10 +111,11 @@  static void s5k6a3_try_format(struct v4l2_mbus_framefmt *mf)
 
 	fmt = find_sensor_format(mf);
 	mf->code = fmt->code;
-	v4l_bound_align_image(&mf->width, S5K6A3_SENSOR_MIN_WIDTH,
-			      S5K6A3_SENSOR_MAX_WIDTH, 0,
-			      &mf->height, S5K6A3_SENSOR_MIN_HEIGHT,
-			      S5K6A3_SENSOR_MAX_HEIGHT, 0, 0);
+	v4l_bound_align_image(&mf->width,
+			S5K6A3_SENSOR_MIN_WIDTH, S5K6A3_SENSOR_MAX_WIDTH, 0,
+			&mf->height,
+			S5K6A3_SENSOR_MIN_HEIGHT, S5K6A3_SENSOR_MAX_HEIGHT, 0,
+			0);
 }
 
 static struct v4l2_mbus_framefmt *__s5k6a3_get_format(