All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] media: ov13858: Avoid possible null first frame
@ 2018-01-25  4:34 Chiranjeevi Rapolu
  2018-01-25 10:29 ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Chiranjeevi Rapolu @ 2018-01-25  4:34 UTC (permalink / raw)
  To: linux-media, sakari.ailus
  Cc: tfiga, jian.xu.zheng, tian.shu.qiu, andy.yeh, rajmohan.mani,
	hyungwoo.yang, 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 <chiranjeevi.rapolu@intel.com>
Signed-off-by: Tianshu Qiu <tian.shu.qiu@intel.com>
---
 drivers/media/i2c/ov13858.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c
index bf7d06f..2964d5c 100644
--- a/drivers/media/i2c/ov13858.c
+++ b/drivers/media/i2c/ov13858.c
@@ -194,6 +194,7 @@ struct ov13858_mode {
 	{0x3624, 0x1c},
 	{0x3640, 0x10},
 	{0x3641, 0x70},
+	{0x3660, 0x04},
 	{0x3661, 0x80},
 	{0x3662, 0x12},
 	{0x3664, 0x73},
@@ -384,6 +385,7 @@ struct ov13858_mode {
 	{0x3624, 0x1c},
 	{0x3640, 0x10},
 	{0x3641, 0x70},
+	{0x3660, 0x04},
 	{0x3661, 0x80},
 	{0x3662, 0x10},
 	{0x3664, 0x73},
@@ -574,6 +576,7 @@ struct ov13858_mode {
 	{0x3624, 0x1c},
 	{0x3640, 0x10},
 	{0x3641, 0x70},
+	{0x3660, 0x04},
 	{0x3661, 0x80},
 	{0x3662, 0x10},
 	{0x3664, 0x73},
@@ -764,6 +767,7 @@ struct ov13858_mode {
 	{0x3624, 0x1c},
 	{0x3640, 0x10},
 	{0x3641, 0x70},
+	{0x3660, 0x04},
 	{0x3661, 0x80},
 	{0x3662, 0x08},
 	{0x3664, 0x73},
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] media: ov13858: Avoid possible null first frame
  2018-01-25  4:34 [PATCH v1] media: ov13858: Avoid possible null first frame Chiranjeevi Rapolu
@ 2018-01-25 10:29 ` Sakari Ailus
  2018-01-25 17:36   ` Rapolu, Chiranjeevi
  0 siblings, 1 reply; 4+ messages in thread
From: Sakari Ailus @ 2018-01-25 10:29 UTC (permalink / raw)
  To: Chiranjeevi Rapolu
  Cc: linux-media, tfiga, jian.xu.zheng, tian.shu.qiu, andy.yeh,
	rajmohan.mani, hyungwoo.yang

Hi Chiranjeevi,

On Wed, Jan 24, 2018 at 08:34:39PM -0800, Chiranjeevi Rapolu wrote:
> 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 <chiranjeevi.rapolu@intel.com>
> Signed-off-by: Tianshu Qiu <tian.shu.qiu@intel.com>

Thanks for the patch.

I'll apply this now, however I see that most of the registers in the four
modes are the same. In the future it'd be good to separate the parts that
are common in all of them (to be written in sensor power-on) to make this
(slightly) more maintainable.

-- 
Kind regards,

Sakari Ailus
sakari.ailus@linux.intel.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH v1] media: ov13858: Avoid possible null first frame
  2018-01-25 10:29 ` Sakari Ailus
@ 2018-01-25 17:36   ` Rapolu, Chiranjeevi
  2018-01-30 12:45     ` Sakari Ailus
  0 siblings, 1 reply; 4+ messages in thread
From: Rapolu, Chiranjeevi @ 2018-01-25 17:36 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: linux-media, tfiga, Zheng, Jian Xu, Qiu, Tian Shu, Yeh, Andy,
	Mani, Rajmohan, Yang, Hyungwoo

Hi Sakari,

>I'll apply this now, however I see that most of the registers in the four modes are the same. In the future it'd be good to separate the parts that are common in all of them (to be written in sensor power-on) to make this (slightly) more maintainable.

Thanks for the review. Makes sense. Not sure how it impacts because the sequence of writes will be different, need thorough testing to confirm nothing is broken.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] media: ov13858: Avoid possible null first frame
  2018-01-25 17:36   ` Rapolu, Chiranjeevi
@ 2018-01-30 12:45     ` Sakari Ailus
  0 siblings, 0 replies; 4+ messages in thread
From: Sakari Ailus @ 2018-01-30 12:45 UTC (permalink / raw)
  To: Rapolu, Chiranjeevi
  Cc: linux-media, tfiga, Zheng, Jian Xu, Qiu, Tian Shu, Yeh, Andy,
	Mani, Rajmohan, Yang, Hyungwoo

On Thu, Jan 25, 2018 at 05:36:44PM +0000, Rapolu, Chiranjeevi wrote:
> Hi Sakari,
> 
> >I'll apply this now, however I see that most of the registers in the
> > four modes are the same. In the future it'd be good to separate the
> > parts that are common in all of them (to be written in sensor power-on)
> > to make this (slightly) more maintainable.
> 
> Thanks for the review. Makes sense. Not sure how it impacts because the
> sequence of writes will be different, need thorough testing to confirm
> nothing is broken.

Yeah, that's a fair consideration. Most registers still have no side
effects apart of streaming control or such.

-- 
Sakari Ailus
sakari.ailus@linux.intel.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-30 12:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-25  4:34 [PATCH v1] media: ov13858: Avoid possible null first frame Chiranjeevi Rapolu
2018-01-25 10:29 ` Sakari Ailus
2018-01-25 17:36   ` Rapolu, Chiranjeevi
2018-01-30 12:45     ` Sakari Ailus

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.