public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Patches for TVP7002
@ 2010-08-03  8:18 mats.randgaard
  2010-08-03  8:18 ` [PATCH 1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors occur mats.randgaard
  2011-09-18 18:05 ` [PATCH 0/2] Patches for TVP7002 Mauro Carvalho Chehab
  0 siblings, 2 replies; 5+ messages in thread
From: mats.randgaard @ 2010-08-03  8:18 UTC (permalink / raw)
  To: linux-media; +Cc: sudhakar.raj, Mats Randgaard

From: Mats Randgaard <mats.randgaard@tandberg.com>

The patch "TVP7002: Changed register values" depends on http://www.mail-archive.com/linux-media@vger.kernel.org/msg20769.html

Mats Randgaard (2):
  TVP7002: Return V4L2_DV_INVALID if any of the errors occur.
  TVP7002: Changed register values.

 drivers/media/video/tvp7002.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)


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

* [PATCH 1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors occur.
  2010-08-03  8:18 [PATCH 0/2] Patches for TVP7002 mats.randgaard
@ 2010-08-03  8:18 ` mats.randgaard
  2010-08-03  8:18   ` [PATCH 2/2] TVP7002: Changed register values mats.randgaard
  2011-09-18 18:05 ` [PATCH 0/2] Patches for TVP7002 Mauro Carvalho Chehab
  1 sibling, 1 reply; 5+ messages in thread
From: mats.randgaard @ 2010-08-03  8:18 UTC (permalink / raw)
  To: linux-media; +Cc: sudhakar.raj, Mats Randgaard

From: Mats Randgaard <mats.randgaard@tandberg.com>

Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
---
 drivers/media/video/tvp7002.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
index 48f5c76..8116cd4 100644
--- a/drivers/media/video/tvp7002.c
+++ b/drivers/media/video/tvp7002.c
@@ -796,6 +796,9 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
 	u8 cpl_msb;
 	int index;
 
+	/* Return invalid preset if no active input is detected */
+	qpreset->preset = V4L2_DV_INVALID;
+
 	device = to_tvp7002(sd);
 
 	/* Read standards from device registers */
@@ -829,8 +832,6 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
 	if (index == NUM_PRESETS) {
 		v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
 								lpfr, cpln);
-		/* Could not detect a signal, so return the 'invalid' preset */
-		qpreset->preset = V4L2_DV_INVALID;
 		return 0;
 	}
 
-- 
1.6.4.2


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

* [PATCH 2/2] TVP7002: Changed register values.
  2010-08-03  8:18 ` [PATCH 1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors occur mats.randgaard
@ 2010-08-03  8:18   ` mats.randgaard
  0 siblings, 0 replies; 5+ messages in thread
From: mats.randgaard @ 2010-08-03  8:18 UTC (permalink / raw)
  To: linux-media; +Cc: sudhakar.raj, Mats Randgaard

From: Mats Randgaard <mats.randgaard@tandberg.com>

Register values changed according to the data sheet and Texas Instruments DaVinci_PSP_03_02_00_37.
	- TVP7002_RGB_COARSE_CLAMP_CTL changed to the default value in data sheet.
 	- TVP7002_HPLL_PHASE_SEL deleted because the registers write to reserved bits. The default value works fine.

Signed-off-by: Mats Randgaard <mats.randgaard@tandberg.com>
---
 drivers/media/video/tvp7002.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/drivers/media/video/tvp7002.c b/drivers/media/video/tvp7002.c
index 8116cd4..0f2dc98 100644
--- a/drivers/media/video/tvp7002.c
+++ b/drivers/media/video/tvp7002.c
@@ -127,7 +127,7 @@ static const struct i2c_reg_value tvp7002_init_default[] = {
 	{ TVP7002_ADC_SETUP, 0x50, TVP7002_WRITE },
 	{ TVP7002_COARSE_CLAMP_CTL, 0x00, TVP7002_WRITE },
 	{ TVP7002_SOG_CLAMP, 0x80, TVP7002_WRITE },
-	{ TVP7002_RGB_COARSE_CLAMP_CTL, 0x00, TVP7002_WRITE },
+	{ TVP7002_RGB_COARSE_CLAMP_CTL, 0x8c, TVP7002_WRITE },
 	{ TVP7002_SOG_COARSE_CLAMP_CTL, 0x04, TVP7002_WRITE },
 	{ TVP7002_ALC_PLACEMENT, 0x5a, TVP7002_WRITE },
 	{ 0x32, 0x18, TVP7002_RESERVED },
@@ -181,7 +181,6 @@ static const struct i2c_reg_value tvp7002_parms_480P[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0x35, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0xa0, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0x02, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x14, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x91, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x00, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x0B, TVP7002_WRITE },
@@ -203,7 +202,6 @@ static const struct i2c_reg_value tvp7002_parms_576P[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0x36, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0x00, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0x18, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x14, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x9B, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x00, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x0F, TVP7002_WRITE },
@@ -225,7 +223,6 @@ static const struct i2c_reg_value tvp7002_parms_1080I60[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0x89, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0x80, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0x98, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x14, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x06, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x01, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x8a, TVP7002_WRITE },
@@ -247,7 +244,6 @@ static const struct i2c_reg_value tvp7002_parms_1080P60[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0x89, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0x80, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0xE0, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x14, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x06, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x01, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x8a, TVP7002_WRITE },
@@ -269,7 +265,6 @@ static const struct i2c_reg_value tvp7002_parms_1080I50[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0xa5, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0x00, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0x98, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x14, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x06, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x01, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x8a, TVP7002_WRITE },
@@ -291,7 +286,6 @@ static const struct i2c_reg_value tvp7002_parms_720P60[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0x67, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0x20, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0xa0, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x16, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x47, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x01, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x4B, TVP7002_WRITE },
@@ -313,7 +307,6 @@ static const struct i2c_reg_value tvp7002_parms_720P50[] = {
 	{ TVP7002_HPLL_FDBK_DIV_MSBS, 0x7b, TVP7002_WRITE },
 	{ TVP7002_HPLL_FDBK_DIV_LSBS, 0xc0, TVP7002_WRITE },
 	{ TVP7002_HPLL_CRTL, 0x98, TVP7002_WRITE },
-	{ TVP7002_HPLL_PHASE_SEL, 0x16, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_LSBS, 0x47, TVP7002_WRITE },
 	{ TVP7002_AVID_START_PIXEL_MSBS, 0x01, TVP7002_WRITE },
 	{ TVP7002_AVID_STOP_PIXEL_LSBS, 0x4B, TVP7002_WRITE },
-- 
1.6.4.2


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

* Re: [PATCH 0/2] Patches for TVP7002
  2010-08-03  8:18 [PATCH 0/2] Patches for TVP7002 mats.randgaard
  2010-08-03  8:18 ` [PATCH 1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors occur mats.randgaard
@ 2011-09-18 18:05 ` Mauro Carvalho Chehab
  2011-09-19  8:32   ` Hans Verkuil
  1 sibling, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2011-09-18 18:05 UTC (permalink / raw)
  To: mats.randgaard; +Cc: linux-media, sudhakar.raj, Hans Verkuil

Em 03-08-2010 05:18, mats.randgaard@tandberg.com escreveu:
> From: Mats Randgaard <mats.randgaard@tandberg.com>
> 
> The patch "TVP7002: Changed register values" depends on http://www.mail-archive.com/linux-media@vger.kernel.org/msg20769.html

Hmm... those patches still apply over the latest development tree.
I didn't saw any comments about it. Are they still applicable?

> 
> Mats Randgaard (2):
>   TVP7002: Return V4L2_DV_INVALID if any of the errors occur.
>   TVP7002: Changed register values.
> 
>  drivers/media/video/tvp7002.c |   14 ++++----------
>  1 files changed, 4 insertions(+), 10 deletions(-)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [PATCH 0/2] Patches for TVP7002
  2011-09-18 18:05 ` [PATCH 0/2] Patches for TVP7002 Mauro Carvalho Chehab
@ 2011-09-19  8:32   ` Hans Verkuil
  0 siblings, 0 replies; 5+ messages in thread
From: Hans Verkuil @ 2011-09-19  8:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: mats.randgaard, linux-media, sudhakar.raj, Hans Verkuil

On Sunday, September 18, 2011 20:05:42 Mauro Carvalho Chehab wrote:
> Em 03-08-2010 05:18, mats.randgaard@tandberg.com escreveu:
> > From: Mats Randgaard <mats.randgaard@tandberg.com>
> > 
> > The patch "TVP7002: Changed register values" depends on http://www.mail-
archive.com/linux-media@vger.kernel.org/msg20769.html
> 
> Hmm... those patches still apply over the latest development tree.
> I didn't saw any comments about it. Are they still applicable?

Yes, they are still applicable.

Weird, we all must have lost track of these two patches.

Regards,

	Hans

> 
> > 
> > Mats Randgaard (2):
> >   TVP7002: Return V4L2_DV_INVALID if any of the errors occur.
> >   TVP7002: Changed register values.
> > 
> >  drivers/media/video/tvp7002.c |   14 ++++----------
> >  1 files changed, 4 insertions(+), 10 deletions(-)
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-media" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 

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

end of thread, other threads:[~2011-09-19  8:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03  8:18 [PATCH 0/2] Patches for TVP7002 mats.randgaard
2010-08-03  8:18 ` [PATCH 1/2] TVP7002: Return V4L2_DV_INVALID if any of the errors occur mats.randgaard
2010-08-03  8:18   ` [PATCH 2/2] TVP7002: Changed register values mats.randgaard
2011-09-18 18:05 ` [PATCH 0/2] Patches for TVP7002 Mauro Carvalho Chehab
2011-09-19  8:32   ` Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox