Hi Arun, On 08/02/2013 05:02 PM, 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@xxxxxxxxxxx> --- drivers/media/i2c/s5k6a3.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index ccbb4fc..d81638d 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -30,6 +30,9 @@ #define S5K6A3_SENSOR_MIN_WIDTH 32 #define S5K6A3_SENSOR_MIN_HEIGHT 32 +#define S5K6A3_WIDTH_PADDING 16 +#define S5K6A3_HEIGHT_PADDING 10
How about instead defining MAX and ACTIVE sizes, e.g. #define S5K6A3_SENSOR_MAX_WIDTH 1408 #define S5K6A3_SENSOR_MAX_HEIGHT 1402 #define S5K6A3_SENSOR_ACTIVE_WIDTH 1392 #define S5K6A3_SENSOR_ACTIVE_HEIGHT 1392
#define S5K6A3_DEF_PIX_WIDTH 1296 #define S5K6A3_DEF_PIX_HEIGHT 732
I'm going to remove "_PIX" from those macros in next iteration.
@@ -107,10 +110,13 @@ 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_WIDTH_PADDING, + S5K6A3_SENSOR_MAX_WIDTH + S5K6A3_WIDTH_PADDING, 0, + &mf->height, + S5K6A3_SENSOR_MIN_HEIGHT + S5K6A3_HEIGHT_PADDING, + S5K6A3_SENSOR_MAX_HEIGHT + S5K6A3_HEIGHT_PADDING, 0, + 0);
Then this would become: v4l_bound_align_image(&mf->width, S5K6A3_SENSOR_MIN_WIDTH + S5K6A3_WIDTH_PADDING, S5K6A3_SENSOR_MAX_WIDTH, 0, &mf->height, S5K6A3_SENSOR_MIN_HEIGHT + S5K6A3_HEIGHT_PADDING, S5K6A3_SENSOR_MAX_HEIGHT, 0, 0); I'm not sure about minimal width/height, perhaps we could just define it as: #define S5K6A3_SENSOR_MIN_WIDTH (32 + 10) #define S5K6A3_SENSOR_MIN_HEIGHT (32 + 8) ? I'll also double check with the documentation if the original 32x23 value is really correct. -- Regards, Sylwester -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html