[PATCH v1] media: ov13858: Check for possible null pointer

2018-10-26 Thread Chiranjeevi Rapolu
Check for possible null pointer to avoid crash. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index c8bbc1f..45bb872 100644 --- a/drivers/media

[PATCH v1] media: ov13858: Update to SPDX identifier

2018-02-21 Thread Chiranjeevi Rapolu
Replace GPL v2 license notice with SPDX license identifier. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index bf7d06f..c7183a4

[PATCH v1] media: ov5670: Update to SPDX identifier

2018-02-21 Thread Chiranjeevi Rapolu
Replace GPL v2 license notice with SPDX license identifier. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov5670.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 9f91965..b1b0409 100644

[PATCH v1] media: ov13858: Avoid possible null first frame

2018-01-24 Thread Chiranjeevi Rapolu
Previously, the sensor, with default settings, was outputting SOF without data. This results in frame sync error on the receiver side. Now, configure the sensor to output SOF with MIPI data for all frames. This avoids possible null first frame on the bus. Signed-off-by: Chiranjeevi Rapolu

[PATCH v2] media: ov13858: Fix 4224x3136 video flickering at some vblanks

2017-09-18 Thread Chiranjeevi Rapolu
~30fps. Signed-off-by: Chiranjeevi Rapolu --- Changes in v2: - Include Tomasz clarifications in the commit message. drivers/media/i2c/ov13858.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index a

[PATCH v3] media: ov13858: Calculate pixel-rate at runtime, use mode

2017-09-18 Thread Chiranjeevi Rapolu
Calculate pixel-rate at run time instead of compile time. Instead of using hardcoded pixels-per-line, extract it from current sensor mode. Signed-off-by: Chiranjeevi Rapolu --- Changes in v3: - Use LINK_FREQ_TO_PIXEL_RATE macro. - Fix incorrect indentation. drivers/media/i2c

[PATCH v1] media: ov13858: Fix 4224x3136 video flickering at some vblanks

2017-09-13 Thread Chiranjeevi Rapolu
Previously, the sensor was outputting blank every other frame at 4224x3136 video when vblank was in the range [79, 86]. This resulted in video flickering. Omni Vision recommends us to use their settings for crop start/end for 4224x3136. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c

[PATCH v2] media: ov13858: Calculate pixel-rate at runtime, use mode

2017-09-06 Thread Chiranjeevi Rapolu
Calculate pixel-rate at run time instead of compile time. Instead of using hardcoded pixels-per-line, extract it from current sensor mode. Signed-off-by: Chiranjeevi Rapolu --- Changes in v2: - Removed pixel-rate from struct definition. - Used pixel-rate formula wherever needed

[PATCH v1] media: ov5670: Fix not streaming issue after resume.

2017-09-01 Thread Chiranjeevi Rapolu
Previously, the sensor was not streaming after resume from suspend, i.e. on S0->S3->S0 transition. Due to this, camera app preview appeared as stuck. Now, handle streaming state correctly in case of suspend-resume. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov5670.c | 5 +-

[PATCH v1] media: ov5670: Use recommended black level and output bias

2017-08-24 Thread Chiranjeevi Rapolu
dynamically, add these to existing mode register settings. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov5670.c | 30 -- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 6f7a1d6

[PATCH v1] media: ov13858: Limit vblank to permissible range

2017-08-17 Thread Chiranjeevi Rapolu
ounds. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 35 +++ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index 45c0e96..af7af0d 100644 --- a/drivers/media/i2c/ov13

[PATCH v1] media: ov5670: Limit vblank to permissible range

2017-08-17 Thread Chiranjeevi Rapolu
ounds. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov5670.c | 40 ++-- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 8d8e16c..ddb7009 100644 --- a/drivers/media/i2c/ov5

[PATCH v2] media: ov5670: Fix incorrect frame timing reported to user

2017-08-09 Thread Chiranjeevi Rapolu
to pixels domain. Set HBLANK read-only because fixed PPL is used for all resolutions. And, use more accurate link-frequency 422.4MHz instead of rounding down to 420MHz. Signed-off-by: Chiranjeevi Rapolu --- Changes in v2: - Change subject to reflect frame timing info. - Cha

[PATCH v1] media: ov5670: Fix incorrect fps reported by user

2017-08-09 Thread Chiranjeevi Rapolu
ANK calculation. Now, change pixels-per-line domain from internal sensor clock to pixels domain. Set HBLANK read-only because fixed PPL is used for all resolutions. And, use more accurate link-frequency 422.4MHz instead of rounding down to 420MHz. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/

[PATCH v2] media: ov13858: Correct link-frequency and pixel-rate

2017-07-29 Thread Chiranjeevi Rapolu
Previously both link-frequency and pixel-rate reported by the sensor was incorrect, resulting in incorrect FPS. Report link-frequency in Hz rather than link data rate in bps. Calculate pixel-rate from link-frequency. Signed-off-by: Chiranjeevi Rapolu --- Changes in v2: - Fix typo, from

[PATCH v1] media: ov13858: Increase digital gain granularity, range

2017-07-28 Thread Chiranjeevi Rapolu
Previously, possible digital gains were just 1x, 2x and 4x. These coarse gains were not sufficient in fine-tuning the image capture. Now, digital gain range is [0, 16x] with each step 1/1024, default 1x. This is achieved through OV13858 MWB R/G/B gain controls. Signed-off-by: Chiranjeevi Rapolu

[PATCH v1] media: ov13858: Correct link-frequency and pixel-rate

2017-07-28 Thread Chiranjeevi Rapolu
Previously both link-frequency and pixel-rate reported by the sensor was incorrect, resulting in incorrect FPS. Report link-frequency in Hz rather than link data rate in bps. Calculate pixel-rate from link-frequency. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 28

[PATCH v1] media: ov13858: Fix initial expsoure max

2017-07-27 Thread Chiranjeevi Rapolu
Previously, initial exposure max was set incorrectly to (0x7fff - 8). Now, limit exposure max to current resolution (VTS - 8). Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov13858.c b

[PATCH v1] [media] ov13858 Set default fps as current fps

2017-07-27 Thread Chiranjeevi Rapolu
: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index 86550d8..8e6c8f0 100644 --- a/drivers/media/i2c/ov13858.c +++ b/drivers/media/i2c/ov13858.c @@ -1377,6 +1377,7

[PATCH v5 1/1] i2c: Add Omnivision OV5670 5M sensor support

2017-07-13 Thread Chiranjeevi Rapolu
Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/Kconfig | 12 + drivers/media/i2c/Makefile |1 + drivers/media/i2c/ov5670.c | 2587 3 files changed, 2600 insertions(+) create mode 100644 drivers/media/i2c/ov5670.c diff --git a/drivers

[PATCH v4 1/1] i2c: Add Omnivision OV5670 5M sensor support

2017-07-01 Thread chiranjeevi . rapolu
From: Chiranjeevi Rapolu Provides single source pad with up to 2592x1944 pixels at 10-bit raw bayer format over MIPI CSI2 two lanes at 840Mbps/lane. The driver supports following features: - up to 30fps at 5M pixels - manual exposure - digital/analog gain - V-blank/H-blank - test pattern

[PATCH v3 1/1] i2c: Add Omnivision OV5670 5M sensor support

2017-06-13 Thread chiranjeevi . rapolu
From: Chiranjeevi Rapolu Provides single source pad with up to 2592x1944 pixels at 10-bit raw bayer format over MIPI CSI2 two lanes at 640Mbps/lane. The driver supports following features: - up to 30fps at 5M pixels - manual exposure - digital/analog gain - V-blank/H-blank - test pattern

[PATCH v2 1/1] [media] i2c: Add Omnivision OV5670 5M sensor support

2017-05-25 Thread chiranjeevi . rapolu
From: Chiranjeevi Rapolu Provides single source pad with up to 2592x1944 pixels at 10-bit raw bayer format over MIPI CSI2 two lanes at 640Mbps/lane. The driver supports following features: - up to 30fps at 5M pixels - manual exposure/analog gain - media controller support - runtime pm support

[PATCH] ov5670: Add Omnivision OV5670 5M sensor support

2017-05-03 Thread Chiranjeevi Rapolu
Provides single source pad with up to 2576x1936 pixels at 10-bit raw bayer format over MIPI CSI2 two lanes at 640Mbps/lane. Supports up to 30fps at 5M pixels, up to 60fps at 1080p. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/Kconfig | 11 + drivers/media/i2c/Makefile |1