All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/18] Remove DV_PRESET API
@ 2013-02-16  9:28 Hans Verkuil
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
  2013-03-01 11:01 ` [RFC PATCH 00/18] Remove DV_PRESET API Tomasz Stanislawski
  0 siblings, 2 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang

Hi all!

This patch series removes the last remnants of the deprecated DV_PRESET API
from the kernel:

- remove the dv_preset ops from the tvp7002 driver: all bridge drivers that
  use this i2c driver have already been converted to the DV_TIMINGS API, so
  these ops are no longer used. Prabhakar, can you test this for me?

- fix some remaining references to the preset API from the davinci drivers.
  It's trivial stuff, but I would appreciate it if you can look at it, 
  Prabhakar.

- rename some CUSTOM_TIMINGS defines to DV_TIMINGS since CUSTOM_TIMINGS
  is deprecated. It certainly shouldn't be used anymore in the kernel.
  Trivial patches, but please look at it as well, Prabhakar and Scott.

- convert the s5p-tv drivers from the DV_PRESET to the DV_TIMINGS API and
  remove the DV_PRESET API. Tomasz or Kyungmin Park, can you test this?
  I do not know whether removal of the DV_PRESET API is possible at this
  stage for the s5p-tv since I do not know if any code inside Samsung
  uses the DV_PRESET API. If the DV_PRESET API cannot be removed at this
  time, then let me know. I would have to make some changes to allow the
  preset and timings APIs to co-exist. I would really like to remove the
  preset API some time this year, though, if only to prevent new drivers 
  from attempting to use the preset API.

- finally remove the remaining core DV_PRESET support.

- remove the DV_PRESET API from the videodev2.h header. Note that I am not
  at all certain if we should do this. I know that the DV_PRESET API has
  only been used in embedded systems, so the impact should be very limited.
  But it is probably better to wait for a year or so before actually 
  removing it from the header. The main reason for adding this removal is
  to verify that I haven't forgotten any driver conversions.

Comments are welcome!

Regards,

	Hans


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

* [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables.
  2013-02-16  9:28 [RFC PATCH 00/18] Remove DV_PRESET API Hans Verkuil
@ 2013-02-16  9:28 ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets Hans Verkuil
                     ` (17 more replies)
  2013-03-01 11:01 ` [RFC PATCH 00/18] Remove DV_PRESET API Tomasz Stanislawski
  1 sibling, 18 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This is the first step towards removing the deprecated preset support of this
driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 drivers/media/i2c/tvp7002.c |   90 +++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 45 deletions(-)

diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index 537f6b4..7995eeb 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -326,8 +326,8 @@ static const struct i2c_reg_value tvp7002_parms_720P50[] = {
 	{ TVP7002_EOR, 0xff, TVP7002_RESERVED }
 };
 
-/* Preset definition for handling device operation */
-struct tvp7002_preset_definition {
+/* Timings definition for handling device operation */
+struct tvp7002_timings_definition {
 	u32 preset;
 	struct v4l2_dv_timings timings;
 	const struct i2c_reg_value *p_settings;
@@ -339,8 +339,8 @@ struct tvp7002_preset_definition {
 	u16 cpl_max;
 };
 
-/* Struct list for digital video presets */
-static const struct tvp7002_preset_definition tvp7002_presets[] = {
+/* Struct list for digital video timings */
+static const struct tvp7002_timings_definition tvp7002_timings[] = {
 	{
 		V4L2_DV_720P60,
 		V4L2_DV_BT_CEA_1280X720P60,
@@ -420,7 +420,7 @@ static const struct tvp7002_preset_definition tvp7002_presets[] = {
 	}
 };
 
-#define NUM_PRESETS	ARRAY_SIZE(tvp7002_presets)
+#define NUM_TIMINGS ARRAY_SIZE(tvp7002_timings)
 
 /* Device definition */
 struct tvp7002 {
@@ -431,7 +431,7 @@ struct tvp7002 {
 	int ver;
 	int streaming;
 
-	const struct tvp7002_preset_definition *current_preset;
+	const struct tvp7002_timings_definition *current_timings;
 };
 
 /*
@@ -603,11 +603,11 @@ static int tvp7002_s_dv_preset(struct v4l2_subdev *sd,
 	u32 preset;
 	int i;
 
-	for (i = 0; i < NUM_PRESETS; i++) {
-		preset = tvp7002_presets[i].preset;
+	for (i = 0; i < NUM_TIMINGS; i++) {
+		preset = tvp7002_timings[i].preset;
 		if (preset == dv_preset->preset) {
-			device->current_preset = &tvp7002_presets[i];
-			return tvp7002_write_inittab(sd, tvp7002_presets[i].p_settings);
+			device->current_timings = &tvp7002_timings[i];
+			return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
 		}
 	}
 
@@ -623,12 +623,12 @@ static int tvp7002_s_dv_timings(struct v4l2_subdev *sd,
 
 	if (dv_timings->type != V4L2_DV_BT_656_1120)
 		return -EINVAL;
-	for (i = 0; i < NUM_PRESETS; i++) {
-		const struct v4l2_bt_timings *t = &tvp7002_presets[i].timings.bt;
+	for (i = 0; i < NUM_TIMINGS; i++) {
+		const struct v4l2_bt_timings *t = &tvp7002_timings[i].timings.bt;
 
 		if (!memcmp(bt, t, &bt->standards - &bt->width)) {
-			device->current_preset = &tvp7002_presets[i];
-			return tvp7002_write_inittab(sd, tvp7002_presets[i].p_settings);
+			device->current_timings = &tvp7002_timings[i];
+			return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
 		}
 	}
 	return -EINVAL;
@@ -639,7 +639,7 @@ static int tvp7002_g_dv_timings(struct v4l2_subdev *sd,
 {
 	struct tvp7002 *device = to_tvp7002(sd);
 
-	*dv_timings = device->current_preset->timings;
+	*dv_timings = device->current_timings->timings;
 	return 0;
 }
 
@@ -681,15 +681,15 @@ static int tvp7002_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f
 	int error;
 
 	/* Calculate height and width based on current standard */
-	error = v4l_fill_dv_preset_info(device->current_preset->preset, &e_preset);
+	error = v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset);
 	if (error)
 		return error;
 
 	f->width = e_preset.width;
 	f->height = e_preset.height;
 	f->code = V4L2_MBUS_FMT_YUYV10_1X20;
-	f->field = device->current_preset->scanmode;
-	f->colorspace = device->current_preset->color_space;
+	f->field = device->current_timings->scanmode;
+	f->colorspace = device->current_timings->color_space;
 
 	v4l2_dbg(1, debug, sd, "MBUS_FMT: Width - %d, Height - %d",
 			f->width, f->height);
@@ -697,16 +697,16 @@ static int tvp7002_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f
 }
 
 /*
- * tvp7002_query_dv_preset() - query DV preset
+ * tvp7002_query_dv() - query DV timings
  * @sd: pointer to standard V4L2 sub-device structure
- * @qpreset: standard V4L2 v4l2_dv_preset structure
+ * @index: index into the tvp7002_timings array
  *
- * Returns the current DV preset by TVP7002. If no active input is
+ * Returns the current DV timings detected by TVP7002. If no active input is
  * detected, returns -EINVAL
  */
 static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
 {
-	const struct tvp7002_preset_definition *presets = tvp7002_presets;
+	const struct tvp7002_timings_definition *timings = tvp7002_timings;
 	u8 progressive;
 	u32 lpfr;
 	u32 cpln;
@@ -717,7 +717,7 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
 	u8 cpl_msb;
 
 	/* Return invalid index if no active input is detected */
-	*index = NUM_PRESETS;
+	*index = NUM_TIMINGS;
 
 	/* Read standards from device registers */
 	tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_LSBS, &lpf_lsb, &error);
@@ -738,23 +738,23 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
 	progressive = (lpf_msb & TVP7002_INPR_MASK) >> TVP7002_IP_SHIFT;
 
 	/* Do checking of video modes */
-	for (*index = 0; *index < NUM_PRESETS; (*index)++, presets++)
-		if (lpfr == presets->lines_per_frame &&
-			progressive == presets->progressive) {
-			if (presets->cpl_min == 0xffff)
+	for (*index = 0; *index < NUM_TIMINGS; (*index)++, timings++)
+		if (lpfr == timings->lines_per_frame &&
+			progressive == timings->progressive) {
+			if (timings->cpl_min == 0xffff)
 				break;
-			if (cpln >= presets->cpl_min && cpln <= presets->cpl_max)
+			if (cpln >= timings->cpl_min && cpln <= timings->cpl_max)
 				break;
 		}
 
-	if (*index == NUM_PRESETS) {
+	if (*index == NUM_TIMINGS) {
 		v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
 								lpfr, cpln);
 		return -ENOLINK;
 	}
 
 	/* Update lines per frame and clocks per line info */
-	v4l2_dbg(1, debug, sd, "detected preset: %d\n", *index);
+	v4l2_dbg(1, debug, sd, "detected timings: %d\n", *index);
 	return 0;
 }
 
@@ -764,13 +764,13 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
 	int index;
 	int err = tvp7002_query_dv(sd, &index);
 
-	if (err || index == NUM_PRESETS) {
+	if (err || index == NUM_TIMINGS) {
 		qpreset->preset = V4L2_DV_INVALID;
 		if (err == -ENOLINK)
 			err = 0;
 		return err;
 	}
-	qpreset->preset = tvp7002_presets[index].preset;
+	qpreset->preset = tvp7002_timings[index].preset;
 	return 0;
 }
 
@@ -782,7 +782,7 @@ static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
 
 	if (err)
 		return err;
-	*timings = tvp7002_presets[index].timings;
+	*timings = tvp7002_timings[index].timings;
 	return 0;
 }
 
@@ -896,7 +896,7 @@ static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable)
  */
 static int tvp7002_log_status(struct v4l2_subdev *sd)
 {
-	const struct tvp7002_preset_definition *presets = tvp7002_presets;
+	const struct tvp7002_timings_definition *timings = tvp7002_timings;
 	struct tvp7002 *device = to_tvp7002(sd);
 	struct v4l2_dv_enum_preset e_preset;
 	struct v4l2_dv_preset detected;
@@ -907,20 +907,20 @@ static int tvp7002_log_status(struct v4l2_subdev *sd)
 	tvp7002_query_dv_preset(sd, &detected);
 
 	/* Print standard related code values */
-	for (i = 0; i < NUM_PRESETS; i++, presets++)
-		if (presets->preset == detected.preset)
+	for (i = 0; i < NUM_TIMINGS; i++, timings++)
+		if (timings->preset == detected.preset)
 			break;
 
-	if (v4l_fill_dv_preset_info(device->current_preset->preset, &e_preset))
+	if (v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset))
 		return -EINVAL;
 
 	v4l2_info(sd, "Selected DV Preset: %s\n", e_preset.name);
 	v4l2_info(sd, "   Pixels per line: %u\n", e_preset.width);
 	v4l2_info(sd, "   Lines per frame: %u\n\n", e_preset.height);
-	if (i == NUM_PRESETS) {
+	if (i == NUM_TIMINGS) {
 		v4l2_info(sd, "Detected DV Preset: None\n");
 	} else {
-		if (v4l_fill_dv_preset_info(presets->preset, &e_preset))
+		if (v4l_fill_dv_preset_info(timings->preset, &e_preset))
 			return -EINVAL;
 		v4l2_info(sd, "Detected DV Preset: %s\n", e_preset.name);
 		v4l2_info(sd, "  Pixels per line: %u\n", e_preset.width);
@@ -946,20 +946,20 @@ static int tvp7002_enum_dv_presets(struct v4l2_subdev *sd,
 		struct v4l2_dv_enum_preset *preset)
 {
 	/* Check requested format index is within range */
-	if (preset->index >= NUM_PRESETS)
+	if (preset->index >= NUM_TIMINGS)
 		return -EINVAL;
 
-	return v4l_fill_dv_preset_info(tvp7002_presets[preset->index].preset, preset);
+	return v4l_fill_dv_preset_info(tvp7002_timings[preset->index].preset, preset);
 }
 
 static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
 		struct v4l2_enum_dv_timings *timings)
 {
 	/* Check requested format index is within range */
-	if (timings->index >= NUM_PRESETS)
+	if (timings->index >= NUM_TIMINGS)
 		return -EINVAL;
 
-	timings->timings = tvp7002_presets[timings->index].timings;
+	timings->timings = tvp7002_timings[timings->index].timings;
 	return 0;
 }
 
@@ -1043,7 +1043,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
 
 	sd = &device->sd;
 	device->pdata = c->dev.platform_data;
-	device->current_preset = tvp7002_presets;
+	device->current_timings = tvp7002_timings;
 
 	/* Tell v4l2 the device is ready */
 	v4l2_i2c_subdev_init(sd, c, &tvp7002_ops);
@@ -1080,7 +1080,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
 		return error;
 
 	/* Set registers according to default video mode */
-	preset.preset = device->current_preset->preset;
+	preset.preset = device->current_timings->preset;
 	error = tvp7002_s_dv_preset(sd, &preset);
 
 	v4l2_ctrl_handler_init(&device->hdl, 1);
-- 
1.7.10.4


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

* [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 13:12     ` Prabhakar Lad
  2013-02-16  9:28   ` [RFC PATCH 03/18] tvp7002: remove dv_preset support Hans Verkuil
                     ` (16 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

In the functions tvp7002_mbus_fmt(), tvp7002_log_status and tvp7002_probe()
we should use the dv_timings data structures instead of dv_preset data
structures and functions.

This is the second step towards removing the deprecated preset support of this
driver.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 drivers/media/i2c/tvp7002.c |   54 ++++++++++++++-----------------------------
 1 file changed, 17 insertions(+), 37 deletions(-)

diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index 7995eeb..d7a08bc 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -677,16 +677,10 @@ static int tvp7002_s_ctrl(struct v4l2_ctrl *ctrl)
 static int tvp7002_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f)
 {
 	struct tvp7002 *device = to_tvp7002(sd);
-	struct v4l2_dv_enum_preset e_preset;
-	int error;
-
-	/* Calculate height and width based on current standard */
-	error = v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset);
-	if (error)
-		return error;
+	const struct v4l2_bt_timings *bt = &device->current_timings->timings.bt;
 
-	f->width = e_preset.width;
-	f->height = e_preset.height;
+	f->width = bt->width;
+	f->height = bt->height;
 	f->code = V4L2_MBUS_FMT_YUYV10_1X20;
 	f->field = device->current_timings->scanmode;
 	f->colorspace = device->current_timings->color_space;
@@ -896,35 +890,21 @@ static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable)
  */
 static int tvp7002_log_status(struct v4l2_subdev *sd)
 {
-	const struct tvp7002_timings_definition *timings = tvp7002_timings;
 	struct tvp7002 *device = to_tvp7002(sd);
-	struct v4l2_dv_enum_preset e_preset;
-	struct v4l2_dv_preset detected;
-	int i;
+	const struct v4l2_bt_timings *bt;
+	int detected;
 
-	detected.preset = V4L2_DV_INVALID;
-	/* Find my current standard*/
-	tvp7002_query_dv_preset(sd, &detected);
+	/* Find my current timings */
+	tvp7002_query_dv(sd, &detected);
 
-	/* Print standard related code values */
-	for (i = 0; i < NUM_TIMINGS; i++, timings++)
-		if (timings->preset == detected.preset)
-			break;
-
-	if (v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset))
-		return -EINVAL;
-
-	v4l2_info(sd, "Selected DV Preset: %s\n", e_preset.name);
-	v4l2_info(sd, "   Pixels per line: %u\n", e_preset.width);
-	v4l2_info(sd, "   Lines per frame: %u\n\n", e_preset.height);
-	if (i == NUM_TIMINGS) {
-		v4l2_info(sd, "Detected DV Preset: None\n");
+	bt = &device->current_timings->timings.bt;
+	v4l2_info(sd, "Selected DV Timings: %ux%u\n", bt->width, bt->height);
+	if (detected == NUM_TIMINGS) {
+		v4l2_info(sd, "Detected DV Timings: None\n");
 	} else {
-		if (v4l_fill_dv_preset_info(timings->preset, &e_preset))
-			return -EINVAL;
-		v4l2_info(sd, "Detected DV Preset: %s\n", e_preset.name);
-		v4l2_info(sd, "  Pixels per line: %u\n", e_preset.width);
-		v4l2_info(sd, "  Lines per frame: %u\n\n", e_preset.height);
+		bt = &tvp7002_timings[detected].timings.bt;
+		v4l2_info(sd, "Detected DV Timings: %ux%u\n",
+				bt->width, bt->height);
 	}
 	v4l2_info(sd, "Streaming enabled: %s\n",
 					device->streaming ? "yes" : "no");
@@ -1019,7 +999,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
 {
 	struct v4l2_subdev *sd;
 	struct tvp7002 *device;
-	struct v4l2_dv_preset preset;
+	struct v4l2_dv_timings timings;
 	int polarity_a;
 	int polarity_b;
 	u8 revision;
@@ -1080,8 +1060,8 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
 		return error;
 
 	/* Set registers according to default video mode */
-	preset.preset = device->current_timings->preset;
-	error = tvp7002_s_dv_preset(sd, &preset);
+	timings = device->current_timings->timings;
+	error = tvp7002_s_dv_timings(sd, &timings);
 
 	v4l2_ctrl_handler_init(&device->hdl, 1);
 	v4l2_ctrl_new_std(&device->hdl, &tvp7002_ctrl_ops,
-- 
1.7.10.4


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

* [RFC PATCH 03/18] tvp7002: remove dv_preset support.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 13:13     ` Prabhakar Lad
  2013-02-16  9:28   ` [RFC PATCH 04/18] davinci_vpfe: fix copy-paste errors in several comments Hans Verkuil
                     ` (15 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

Finally remove the dv_preset support from this driver. Note that dv_preset
support was already removed from any bridge drivers that use this i2c
driver, so the dv_preset ops were no longer called and can be removed
safely.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 drivers/media/i2c/tvp7002.c |   70 -------------------------------------------
 1 file changed, 70 deletions(-)

diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
index d7a08bc..7406de9 100644
--- a/drivers/media/i2c/tvp7002.c
+++ b/drivers/media/i2c/tvp7002.c
@@ -328,7 +328,6 @@ static const struct i2c_reg_value tvp7002_parms_720P50[] = {
 
 /* Timings definition for handling device operation */
 struct tvp7002_timings_definition {
-	u32 preset;
 	struct v4l2_dv_timings timings;
 	const struct i2c_reg_value *p_settings;
 	enum v4l2_colorspace color_space;
@@ -342,7 +341,6 @@ struct tvp7002_timings_definition {
 /* Struct list for digital video timings */
 static const struct tvp7002_timings_definition tvp7002_timings[] = {
 	{
-		V4L2_DV_720P60,
 		V4L2_DV_BT_CEA_1280X720P60,
 		tvp7002_parms_720P60,
 		V4L2_COLORSPACE_REC709,
@@ -353,7 +351,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
 		153
 	},
 	{
-		V4L2_DV_1080I60,
 		V4L2_DV_BT_CEA_1920X1080I60,
 		tvp7002_parms_1080I60,
 		V4L2_COLORSPACE_REC709,
@@ -364,7 +361,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
 		205
 	},
 	{
-		V4L2_DV_1080I50,
 		V4L2_DV_BT_CEA_1920X1080I50,
 		tvp7002_parms_1080I50,
 		V4L2_COLORSPACE_REC709,
@@ -375,7 +371,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
 		245
 	},
 	{
-		V4L2_DV_720P50,
 		V4L2_DV_BT_CEA_1280X720P50,
 		tvp7002_parms_720P50,
 		V4L2_COLORSPACE_REC709,
@@ -386,7 +381,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
 		183
 	},
 	{
-		V4L2_DV_1080P60,
 		V4L2_DV_BT_CEA_1920X1080P60,
 		tvp7002_parms_1080P60,
 		V4L2_COLORSPACE_REC709,
@@ -397,7 +391,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
 		102
 	},
 	{
-		V4L2_DV_480P59_94,
 		V4L2_DV_BT_CEA_720X480P59_94,
 		tvp7002_parms_480P,
 		V4L2_COLORSPACE_SMPTE170M,
@@ -408,7 +401,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
 		0xffff
 	},
 	{
-		V4L2_DV_576P50,
 		V4L2_DV_BT_CEA_720X576P50,
 		tvp7002_parms_576P,
 		V4L2_COLORSPACE_SMPTE170M,
@@ -588,32 +580,6 @@ static int tvp7002_write_inittab(struct v4l2_subdev *sd,
 	return error;
 }
 
-/*
- * tvp7002_s_dv_preset() - Set digital video preset
- * @sd: ptr to v4l2_subdev struct
- * @dv_preset: ptr to v4l2_dv_preset struct
- *
- * Set the digital video preset for a TVP7002 decoder device.
- * Returns zero when successful or -EINVAL if register access fails.
- */
-static int tvp7002_s_dv_preset(struct v4l2_subdev *sd,
-					struct v4l2_dv_preset *dv_preset)
-{
-	struct tvp7002 *device = to_tvp7002(sd);
-	u32 preset;
-	int i;
-
-	for (i = 0; i < NUM_TIMINGS; i++) {
-		preset = tvp7002_timings[i].preset;
-		if (preset == dv_preset->preset) {
-			device->current_timings = &tvp7002_timings[i];
-			return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
-		}
-	}
-
-	return -EINVAL;
-}
-
 static int tvp7002_s_dv_timings(struct v4l2_subdev *sd,
 					struct v4l2_dv_timings *dv_timings)
 {
@@ -752,22 +718,6 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
 	return 0;
 }
 
-static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
-					struct v4l2_dv_preset *qpreset)
-{
-	int index;
-	int err = tvp7002_query_dv(sd, &index);
-
-	if (err || index == NUM_TIMINGS) {
-		qpreset->preset = V4L2_DV_INVALID;
-		if (err == -ENOLINK)
-			err = 0;
-		return err;
-	}
-	qpreset->preset = tvp7002_timings[index].preset;
-	return 0;
-}
-
 static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
 					struct v4l2_dv_timings *timings)
 {
@@ -915,23 +865,6 @@ static int tvp7002_log_status(struct v4l2_subdev *sd)
 	return 0;
 }
 
-/*
- * tvp7002_enum_dv_presets() - Enum supported digital video formats
- * @sd: pointer to standard V4L2 sub-device structure
- * @preset: pointer to format struct
- *
- * Enumerate supported digital video formats.
- */
-static int tvp7002_enum_dv_presets(struct v4l2_subdev *sd,
-		struct v4l2_dv_enum_preset *preset)
-{
-	/* Check requested format index is within range */
-	if (preset->index >= NUM_TIMINGS)
-		return -EINVAL;
-
-	return v4l_fill_dv_preset_info(tvp7002_timings[preset->index].preset, preset);
-}
-
 static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
 		struct v4l2_enum_dv_timings *timings)
 {
@@ -966,9 +899,6 @@ static const struct v4l2_subdev_core_ops tvp7002_core_ops = {
 
 /* Specific video subsystem operation handlers */
 static const struct v4l2_subdev_video_ops tvp7002_video_ops = {
-	.enum_dv_presets = tvp7002_enum_dv_presets,
-	.s_dv_preset = tvp7002_s_dv_preset,
-	.query_dv_preset = tvp7002_query_dv_preset,
 	.g_dv_timings = tvp7002_g_dv_timings,
 	.s_dv_timings = tvp7002_s_dv_timings,
 	.enum_dv_timings = tvp7002_enum_dv_timings,
-- 
1.7.10.4


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

* [RFC PATCH 04/18] davinci_vpfe: fix copy-paste errors in several comments.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 03/18] tvp7002: remove dv_preset support Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 12:40     ` Prabhakar Lad
  2013-02-16  9:28   ` [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS Hans Verkuil
                     ` (14 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This removes some incorrect dv_preset references left over from copy-and-paste
errors.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 drivers/staging/media/davinci_vpfe/vpfe_video.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c
index 99ccbeb..19dc5b0 100644
--- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
+++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
@@ -1016,12 +1016,12 @@ vpfe_query_dv_timings(struct file *file, void *fh,
 }
 
 /*
- * vpfe_s_dv_timings() - set dv_preset on external subdev
+ * vpfe_s_dv_timings() - set dv_timings on external subdev
  * @file: file pointer
  * @priv: void pointer
  * @timings: pointer to v4l2_dv_timings structure
  *
- * set dv_timings pointed by preset on external subdev through
+ * set dv_timings pointed by timings on external subdev through
  * v4l2_device_call_until_err, this configures amplifier also
  *
  * Return 0 on success, error code otherwise
@@ -1042,12 +1042,12 @@ vpfe_s_dv_timings(struct file *file, void *fh,
 }
 
 /*
- * vpfe_g_dv_timings() - get dv_preset which is set on external subdev
+ * vpfe_g_dv_timings() - get dv_timings which is set on external subdev
  * @file: file pointer
  * @priv: void pointer
  * @timings: pointer to v4l2_dv_timings structure
  *
- * get dv_preset which is set on external subdev through
+ * get dv_timings which is set on external subdev through
  * v4l2_subdev_call
  *
  * Return 0 on success, error code otherwise
@@ -1423,7 +1423,7 @@ static int vpfe_dqbuf(struct file *file, void *priv,
 }
 
 /*
- * vpfe_streamon() - get dv_preset which is set on external subdev
+ * vpfe_streamon() - start streaming
  * @file: file pointer
  * @priv: void pointer
  * @buf_type: enum v4l2_buf_type
@@ -1472,7 +1472,7 @@ static int vpfe_streamon(struct file *file, void *priv,
 }
 
 /*
- * vpfe_streamoff() - get dv_preset which is set on external subdev
+ * vpfe_streamoff() - stop streaming
  * @file: file pointer
  * @priv: void pointer
  * @buf_type: enum v4l2_buf_type
-- 
1.7.10.4


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

* [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (2 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 04/18] davinci_vpfe: fix copy-paste errors in several comments Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 12:50       ` Prabhakar Lad
  2013-02-16  9:28   ` [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS Hans Verkuil
                     ` (13 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

Remove VPBE_ENC_DV_PRESET (the DV_PRESET API is no longer supported) and
VPBE_ENC_CUSTOM_TIMINGS is renamed to VPBE_ENC_DV_TIMINGS since the old
"CUSTOM_TIMINGS" name is deprecated in favor of "DV_TIMINGS".

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 arch/arm/mach-davinci/board-dm644x-evm.c      |    4 ++--
 arch/arm/mach-davinci/dm644x.c                |    2 +-
 drivers/media/platform/davinci/vpbe.c         |    8 ++++----
 drivers/media/platform/davinci/vpbe_display.c |    2 +-
 drivers/media/platform/davinci/vpbe_venc.c    |    8 ++++----
 include/media/davinci/vpbe_types.h            |    3 +--
 6 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
index 8e1b4ff..e8dc70b 100644
--- a/arch/arm/mach-davinci/board-dm644x-evm.c
+++ b/arch/arm/mach-davinci/board-dm644x-evm.c
@@ -649,7 +649,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = {
 static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
 	{
 		.name		= "480p59_94",
-		.timings_type	= VPBE_ENC_CUSTOM_TIMINGS,
+		.timings_type	= VPBE_ENC_DV_TIMINGS,
 		.dv_timings	= V4L2_DV_BT_CEA_720X480P59_94,
 		.interlaced	= 0,
 		.xres		= 720,
@@ -661,7 +661,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
 	},
 	{
 		.name		= "576p50",
-		.timings_type	= VPBE_ENC_CUSTOM_TIMINGS,
+		.timings_type	= VPBE_ENC_DV_TIMINGS,
 		.dv_timings	= V4L2_DV_BT_CEA_720X576P50,
 		.interlaced	= 0,
 		.xres		= 720,
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index db1dd92..ee0e994 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -706,7 +706,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
 		v |= DM644X_VPSS_DACCLKEN;
 		writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
 		break;
-	case VPBE_ENC_CUSTOM_TIMINGS:
+	case VPBE_ENC_DV_TIMINGS:
 		if (pclock <= 27000000) {
 			v |= DM644X_VPSS_DACCLKEN;
 			writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 4ca0f9a..2a49f00 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -344,7 +344,7 @@ static int vpbe_s_dv_timings(struct vpbe_device *vpbe_dev,
 		return -EINVAL;
 
 	for (i = 0; i < output->num_modes; i++) {
-		if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS &&
+		if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS &&
 		    !memcmp(&output->modes[i].dv_timings,
 				dv_timings, sizeof(*dv_timings)))
 			break;
@@ -385,7 +385,7 @@ static int vpbe_g_dv_timings(struct vpbe_device *vpbe_dev,
 		     struct v4l2_dv_timings *dv_timings)
 {
 	if (vpbe_dev->current_timings.timings_type &
-	  VPBE_ENC_CUSTOM_TIMINGS) {
+	  VPBE_ENC_DV_TIMINGS) {
 		*dv_timings = vpbe_dev->current_timings.dv_timings;
 		return 0;
 	}
@@ -412,7 +412,7 @@ static int vpbe_enum_dv_timings(struct vpbe_device *vpbe_dev,
 		return -EINVAL;
 
 	for (i = 0; i < output->num_modes; i++) {
-		if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS) {
+		if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS) {
 			if (j == timings->index)
 				break;
 			j++;
@@ -515,7 +515,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev,
 				return vpbe_s_std(vpbe_dev,
 						 &preset_mode->std_id);
 			if (preset_mode->timings_type &
-						VPBE_ENC_CUSTOM_TIMINGS) {
+						VPBE_ENC_DV_TIMINGS) {
 				dv_timings =
 					preset_mode->dv_timings;
 				return vpbe_s_dv_timings(vpbe_dev, &dv_timings);
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index 5e6b0ca..1f59955 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -1202,7 +1202,7 @@ vpbe_display_g_dv_timings(struct file *file, void *priv,
 	/* Get the given standard in the encoder */
 
 	if (vpbe_dev->current_timings.timings_type &
-				VPBE_ENC_CUSTOM_TIMINGS) {
+				VPBE_ENC_DV_TIMINGS) {
 		*dv_timings = vpbe_dev->current_timings.dv_timings;
 	} else {
 		return -EINVAL;
diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c
index bdbebd5..9546d26 100644
--- a/drivers/media/platform/davinci/vpbe_venc.c
+++ b/drivers/media/platform/davinci/vpbe_venc.c
@@ -313,7 +313,7 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd)
 		return -EINVAL;
 
 	/* Setup clock at VPSS & VENC for SD */
-	if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
+	if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
 		return -EINVAL;
 
 	venc_enabledigitaloutput(sd, 0);
@@ -360,7 +360,7 @@ static int venc_set_576p50(struct v4l2_subdev *sd)
 	    venc->venc_type != VPBE_VERSION_2)
 		return -EINVAL;
 	/* Setup clock at VPSS & VENC for SD */
-	if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
+	if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
 		return -EINVAL;
 
 	venc_enabledigitaloutput(sd, 0);
@@ -400,7 +400,7 @@ static int venc_set_720p60_internal(struct v4l2_subdev *sd)
 	struct venc_state *venc = to_state(sd);
 	struct venc_platform_data *pdata = venc->pdata;
 
-	if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0)
+	if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
 		return -EINVAL;
 
 	venc_enabledigitaloutput(sd, 0);
@@ -428,7 +428,7 @@ static int venc_set_1080i30_internal(struct v4l2_subdev *sd)
 	struct venc_state *venc = to_state(sd);
 	struct venc_platform_data *pdata = venc->pdata;
 
-	if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0)
+	if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
 		return -EINVAL;
 
 	venc_enabledigitaloutput(sd, 0);
diff --git a/include/media/davinci/vpbe_types.h b/include/media/davinci/vpbe_types.h
index 9b85396..05dbe0b 100644
--- a/include/media/davinci/vpbe_types.h
+++ b/include/media/davinci/vpbe_types.h
@@ -26,8 +26,7 @@ enum vpbe_version {
 /* vpbe_timing_type - Timing types used in vpbe device */
 enum vpbe_enc_timings_type {
 	VPBE_ENC_STD = 0x1,
-	VPBE_ENC_DV_PRESET = 0x2,
-	VPBE_ENC_CUSTOM_TIMINGS = 0x4,
+	VPBE_ENC_DV_TIMINGS = 0x4,
 	/* Used when set timings through FB device interface */
 	VPBE_ENC_TIMINGS_INVALID = 0x8,
 };
-- 
1.7.10.4


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

* [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (3 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 12:58       ` Prabhakar Lad
  2013-02-16  9:28   ` [RFC PATCH 07/18] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS Hans Verkuil
                     ` (12 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The use of V4L2_OUT_CAP_CUSTOM_TIMINGS is deprecated, use DV_TIMINGS instead.
Note that V4L2_OUT_CAP_CUSTOM_TIMINGS is just a #define for
V4L2_OUT_CAP_DV_TIMINGS.

At some point in the future these CUSTOM_TIMINGS defines might be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>
---
 arch/arm/mach-davinci/board-dm646x-evm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
index 6e2f163..43f35d6 100644
--- a/arch/arm/mach-davinci/board-dm646x-evm.c
+++ b/arch/arm/mach-davinci/board-dm646x-evm.c
@@ -514,7 +514,7 @@ static const struct vpif_output dm6467_ch0_outputs[] = {
 			.index = 1,
 			.name = "Component",
 			.type = V4L2_OUTPUT_TYPE_ANALOG,
-			.capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS,
+			.capabilities = V4L2_OUT_CAP_DV_TIMINGS,
 		},
 		.subdev_name = "adv7343",
 		.output_route = ADV7343_COMPONENT_ID,
-- 
1.7.10.4


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

* [RFC PATCH 07/18] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (4 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 13:39     ` Scott Jiang
  2013-02-16  9:28   ` [RFC PATCH 08/18] s5p-tv: add dv_timings support for mixer_video Hans Verkuil
                     ` (11 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The use of V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is obsolete, use DV_TIMINGS instead.
Note that V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is just a #define for
V4L2_IN/OUT_CAP_DV_TIMINGS.

At some point in the future these CUSTOM_TIMINGS defines might be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Scott Jiang <scott.jiang.linux@gmail.com>
---
 arch/blackfin/mach-bf609/boards/ezkit.c        |    8 ++++----
 drivers/media/platform/blackfin/bfin_capture.c |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
index 61c1f47..97d7016 100644
--- a/arch/blackfin/mach-bf609/boards/ezkit.c
+++ b/arch/blackfin/mach-bf609/boards/ezkit.c
@@ -936,19 +936,19 @@ static struct v4l2_input adv7842_inputs[] = {
 		.index = 2,
 		.name = "Component",
 		.type = V4L2_INPUT_TYPE_CAMERA,
-		.capabilities = V4L2_IN_CAP_CUSTOM_TIMINGS,
+		.capabilities = V4L2_IN_CAP_DV_TIMINGS,
 	},
 	{
 		.index = 3,
 		.name = "VGA",
 		.type = V4L2_INPUT_TYPE_CAMERA,
-		.capabilities = V4L2_IN_CAP_CUSTOM_TIMINGS,
+		.capabilities = V4L2_IN_CAP_DV_TIMINGS,
 	},
 	{
 		.index = 4,
 		.name = "HDMI",
 		.type = V4L2_INPUT_TYPE_CAMERA,
-		.capabilities = V4L2_IN_CAP_CUSTOM_TIMINGS,
+		.capabilities = V4L2_IN_CAP_DV_TIMINGS,
 	},
 };
 
@@ -1074,7 +1074,7 @@ static struct v4l2_output adv7511_outputs[] = {
 		.index = 0,
 		.name = "HDMI",
 		.type = V4L2_INPUT_TYPE_CAMERA,
-		.capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS,
+		.capabilities = V4L2_OUT_CAP_DV_TIMINGS,
 	},
 };
 
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
index 5f209d5..6691355 100644
--- a/drivers/media/platform/blackfin/bfin_capture.c
+++ b/drivers/media/platform/blackfin/bfin_capture.c
@@ -384,7 +384,7 @@ static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count)
 	params.ppi_control = bcap_dev->cfg->ppi_control;
 	params.int_mask = bcap_dev->cfg->int_mask;
 	if (bcap_dev->cfg->inputs[bcap_dev->cur_input].capabilities
-			& V4L2_IN_CAP_CUSTOM_TIMINGS) {
+			& V4L2_IN_CAP_DV_TIMINGS) {
 		struct v4l2_bt_timings *bt = &bcap_dev->dv_timings.bt;
 
 		params.hdelay = bt->hsync + bt->hbackporch;
@@ -1110,7 +1110,7 @@ static int bcap_probe(struct platform_device *pdev)
 		}
 		bcap_dev->std = std;
 	}
-	if (config->inputs[0].capabilities & V4L2_IN_CAP_CUSTOM_TIMINGS) {
+	if (config->inputs[0].capabilities & V4L2_IN_CAP_DV_TIMINGS) {
 		struct v4l2_dv_timings dv_timings;
 		ret = v4l2_subdev_call(bcap_dev->sd, video,
 				g_dv_timings, &dv_timings);
-- 
1.7.10.4


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

* [RFC PATCH 08/18] s5p-tv: add dv_timings support for mixer_video.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (5 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 07/18] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 09/18] s5p-tv: add dv_timings support for hdmi Hans Verkuil
                     ` (10 subsequent siblings)
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This just adds dv_timings support without modifying existing dv_preset
support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-tv/mixer_video.c |   78 +++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
index 82142a2..cdfadba 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -559,6 +559,79 @@ static int mxr_g_dv_preset(struct file *file, void *fh,
 	return ret ? -EINVAL : 0;
 }
 
+static int mxr_enum_dv_timings(struct file *file, void *fh,
+	struct v4l2_enum_dv_timings *timings)
+{
+	struct mxr_layer *layer = video_drvdata(file);
+	struct mxr_device *mdev = layer->mdev;
+	int ret;
+
+	/* lock protects from changing sd_out */
+	mutex_lock(&mdev->mutex);
+	ret = v4l2_subdev_call(to_outsd(mdev), video, enum_dv_timings, timings);
+	mutex_unlock(&mdev->mutex);
+
+	return ret ? -EINVAL : 0;
+}
+
+static int mxr_s_dv_timings(struct file *file, void *fh,
+	struct v4l2_dv_timings *timings)
+{
+	struct mxr_layer *layer = video_drvdata(file);
+	struct mxr_device *mdev = layer->mdev;
+	int ret;
+
+	/* lock protects from changing sd_out */
+	mutex_lock(&mdev->mutex);
+
+	/* preset change cannot be done while there is an entity
+	 * dependant on output configuration
+	 */
+	if (mdev->n_output > 0) {
+		mutex_unlock(&mdev->mutex);
+		return -EBUSY;
+	}
+
+	ret = v4l2_subdev_call(to_outsd(mdev), video, s_dv_timings, timings);
+
+	mutex_unlock(&mdev->mutex);
+
+	mxr_layer_update_output(layer);
+
+	/* any failure should return EINVAL according to V4L2 doc */
+	return ret ? -EINVAL : 0;
+}
+
+static int mxr_g_dv_timings(struct file *file, void *fh,
+	struct v4l2_dv_timings *timings)
+{
+	struct mxr_layer *layer = video_drvdata(file);
+	struct mxr_device *mdev = layer->mdev;
+	int ret;
+
+	/* lock protects from changing sd_out */
+	mutex_lock(&mdev->mutex);
+	ret = v4l2_subdev_call(to_outsd(mdev), video, g_dv_timings, timings);
+	mutex_unlock(&mdev->mutex);
+
+	return ret ? -EINVAL : 0;
+}
+
+static int mxr_dv_timings_cap(struct file *file, void *fh,
+	struct v4l2_dv_timings_cap *cap)
+{
+	struct mxr_layer *layer = video_drvdata(file);
+	struct mxr_device *mdev = layer->mdev;
+	int ret;
+
+	/* lock protects from changing sd_out */
+	mutex_lock(&mdev->mutex);
+	ret = v4l2_subdev_call(to_outsd(mdev), video, dv_timings_cap, cap);
+	mutex_unlock(&mdev->mutex);
+
+	return ret ? -EINVAL : 0;
+}
+
 static int mxr_s_std(struct file *file, void *fh, v4l2_std_id *norm)
 {
 	struct mxr_layer *layer = video_drvdata(file);
@@ -742,6 +815,11 @@ static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
 	.vidioc_enum_dv_presets = mxr_enum_dv_presets,
 	.vidioc_s_dv_preset = mxr_s_dv_preset,
 	.vidioc_g_dv_preset = mxr_g_dv_preset,
+	/* DV Timings functions */
+	.vidioc_enum_dv_timings = mxr_enum_dv_timings,
+	.vidioc_s_dv_timings = mxr_s_dv_timings,
+	.vidioc_g_dv_timings = mxr_g_dv_timings,
+	.vidioc_dv_timings_cap = mxr_dv_timings_cap,
 	/* analog TV standard functions */
 	.vidioc_s_std = mxr_s_std,
 	.vidioc_g_std = mxr_g_std,
-- 
1.7.10.4


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

* [RFC PATCH 09/18] s5p-tv: add dv_timings support for hdmi.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (6 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 08/18] s5p-tv: add dv_timings support for mixer_video Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-03-01 11:01     ` Tomasz Stanislawski
  2013-02-16  9:28   ` [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy Hans Verkuil
                     ` (9 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This just adds dv_timings support without modifying existing dv_preset
support.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-tv/hdmi_drv.c |   92 +++++++++++++++++++++++++-----
 1 file changed, 79 insertions(+), 13 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c
index 8de1b3d..716d0e4 100644
--- a/drivers/media/platform/s5p-tv/hdmi_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmi_drv.c
@@ -31,6 +31,7 @@
 #include <linux/pm_runtime.h>
 #include <linux/clk.h>
 #include <linux/regulator/consumer.h>
+#include <linux/v4l2-dv-timings.h>
 
 #include <media/s5p_hdmi.h>
 #include <media/v4l2-common.h>
@@ -93,6 +94,8 @@ struct hdmi_device {
 	int cur_conf_dirty;
 	/** current preset */
 	u32 cur_preset;
+	/** current timings */
+	struct v4l2_dv_timings cur_timings;
 	/** other resources */
 	struct hdmi_resources res;
 };
@@ -477,19 +480,21 @@ static const struct hdmi_timings hdmi_timings_1080p50 = {
 
 static const struct {
 	u32 preset;
-	const struct hdmi_timings *timings;
+	bool reduced_fps;
+	const struct v4l2_dv_timings dv_timings;
+	const struct hdmi_timings *hdmi_timings;
 } hdmi_timings[] = {
-	{ V4L2_DV_480P59_94, &hdmi_timings_480p },
-	{ V4L2_DV_576P50, &hdmi_timings_576p50 },
-	{ V4L2_DV_720P50, &hdmi_timings_720p50 },
-	{ V4L2_DV_720P59_94, &hdmi_timings_720p60 },
-	{ V4L2_DV_720P60, &hdmi_timings_720p60 },
-	{ V4L2_DV_1080P24, &hdmi_timings_1080p24 },
-	{ V4L2_DV_1080P30, &hdmi_timings_1080p60 },
-	{ V4L2_DV_1080P50, &hdmi_timings_1080p50 },
-	{ V4L2_DV_1080I50, &hdmi_timings_1080i50 },
-	{ V4L2_DV_1080I60, &hdmi_timings_1080i60 },
-	{ V4L2_DV_1080P60, &hdmi_timings_1080p60 },
+	{ V4L2_DV_480P59_94, false, V4L2_DV_BT_CEA_720X480P59_94, &hdmi_timings_480p },
+	{ V4L2_DV_576P50, false, V4L2_DV_BT_CEA_720X576P50, &hdmi_timings_576p50 },
+	{ V4L2_DV_720P50, false, V4L2_DV_BT_CEA_1280X720P50, &hdmi_timings_720p50 },
+	{ V4L2_DV_720P59_94, true, V4L2_DV_BT_CEA_1280X720P60, &hdmi_timings_720p60 },
+	{ V4L2_DV_720P60, false, V4L2_DV_BT_CEA_1280X720P60, &hdmi_timings_720p60 },
+	{ V4L2_DV_1080P24, false, V4L2_DV_BT_CEA_1920X1080P24, &hdmi_timings_1080p24 },
+	{ V4L2_DV_1080P30, false, V4L2_DV_BT_CEA_1920X1080P30, &hdmi_timings_1080p60 },
+	{ V4L2_DV_1080P50, false, V4L2_DV_BT_CEA_1920X1080P50, &hdmi_timings_1080p50 },
+	{ V4L2_DV_1080I50, false, V4L2_DV_BT_CEA_1920X1080I50, &hdmi_timings_1080i50 },
+	{ V4L2_DV_1080I60, false, V4L2_DV_BT_CEA_1920X1080I60, &hdmi_timings_1080i60 },
+	{ V4L2_DV_1080P60, false, V4L2_DV_BT_CEA_1920X1080P60, &hdmi_timings_1080p60 },
 };
 
 static const struct hdmi_timings *hdmi_preset2timings(u32 preset)
@@ -498,7 +503,7 @@ static const struct hdmi_timings *hdmi_preset2timings(u32 preset)
 
 	for (i = 0; i < ARRAY_SIZE(hdmi_timings); ++i)
 		if (hdmi_timings[i].preset == preset)
-			return  hdmi_timings[i].timings;
+			return  hdmi_timings[i].hdmi_timings;
 	return NULL;
 }
 
@@ -647,6 +652,36 @@ static int hdmi_g_dv_preset(struct v4l2_subdev *sd,
 	return 0;
 }
 
+static int hdmi_s_dv_timings(struct v4l2_subdev *sd,
+	struct v4l2_dv_timings *timings)
+{
+	struct hdmi_device *hdev = sd_to_hdmi_dev(sd);
+	struct device *dev = hdev->dev;
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(hdmi_timings); i++)
+		if (v4l_match_dv_timings(&hdmi_timings[i].dv_timings,
+					timings, 0))
+			break;
+	if (i == ARRAY_SIZE(hdmi_timings)) {
+		dev_err(dev, "timings not supported\n");
+		return -EINVAL;
+	}
+	hdev->cur_conf = hdmi_timings[i].hdmi_timings;
+	hdev->cur_conf_dirty = 1;
+	hdev->cur_timings = *timings;
+	if (!hdmi_timings[i].reduced_fps)
+		hdev->cur_timings.bt.flags &= ~V4L2_DV_FL_CAN_REDUCE_FPS;
+	return 0;
+}
+
+static int hdmi_g_dv_timings(struct v4l2_subdev *sd,
+	struct v4l2_dv_timings *timings)
+{
+	*timings = sd_to_hdmi_dev(sd)->cur_timings;
+	return 0;
+}
+
 static int hdmi_g_mbus_fmt(struct v4l2_subdev *sd,
 	  struct v4l2_mbus_framefmt *fmt)
 {
@@ -679,6 +714,33 @@ static int hdmi_enum_dv_presets(struct v4l2_subdev *sd,
 		preset);
 }
 
+static int hdmi_enum_dv_timings(struct v4l2_subdev *sd,
+	struct v4l2_enum_dv_timings *timings)
+{
+	if (timings->index >= ARRAY_SIZE(hdmi_timings))
+		return -EINVAL;
+	timings->timings = hdmi_timings[timings->index].dv_timings;
+	if (!hdmi_timings[timings->index].reduced_fps)
+		timings->timings.bt.flags &= ~V4L2_DV_FL_CAN_REDUCE_FPS;
+	return 0;
+}
+
+static int hdmi_dv_timings_cap(struct v4l2_subdev *sd,
+	struct v4l2_dv_timings_cap *cap)
+{
+	cap->type = V4L2_DV_BT_656_1120;
+	cap->bt.min_width = 640;
+	cap->bt.max_width = 1920;
+	cap->bt.min_height = 480;
+	cap->bt.max_height = 1080;
+	cap->bt.min_pixelclock = 27000000;
+	cap->bt.max_pixelclock = 148500000;
+	cap->bt.standards = V4L2_DV_BT_STD_CEA861;
+	cap->bt.capabilities = V4L2_DV_BT_CAP_INTERLACED |
+			       V4L2_DV_BT_CAP_PROGRESSIVE;
+	return 0;
+}
+
 static const struct v4l2_subdev_core_ops hdmi_sd_core_ops = {
 	.s_power = hdmi_s_power,
 };
@@ -687,6 +749,10 @@ static const struct v4l2_subdev_video_ops hdmi_sd_video_ops = {
 	.s_dv_preset = hdmi_s_dv_preset,
 	.g_dv_preset = hdmi_g_dv_preset,
 	.enum_dv_presets = hdmi_enum_dv_presets,
+	.s_dv_timings = hdmi_s_dv_timings,
+	.g_dv_timings = hdmi_g_dv_timings,
+	.enum_dv_timings = hdmi_enum_dv_timings,
+	.dv_timings_cap = hdmi_dv_timings_cap,
 	.g_mbus_fmt = hdmi_g_mbus_fmt,
 	.s_stream = hdmi_s_stream,
 };
-- 
1.7.10.4


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

* [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (7 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 09/18] s5p-tv: add dv_timings support for hdmi Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-03-01 11:02     ` Tomasz Stanislawski
  2013-02-16  9:28   ` [RFC PATCH 11/18] s5p-tv: remove dv_preset support from mixer_video Hans Verkuil
                     ` (8 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This just adds dv_timings support without modifying existing dv_preset
support, although I had to refactor a little bit in order to share
hdmiphy_find_conf() between the preset and timings code.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-tv/hdmiphy_drv.c |   48 ++++++++++++++++++++++-----
 1 file changed, 39 insertions(+), 9 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
index 80717ce..85b4211 100644
--- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
@@ -197,14 +197,9 @@ static unsigned long hdmiphy_preset_to_pixclk(u32 preset)
 		return 0;
 }
 
-static const u8 *hdmiphy_find_conf(u32 preset, const struct hdmiphy_conf *conf)
+static const u8 *hdmiphy_find_conf(unsigned long pixclk,
+		const struct hdmiphy_conf *conf)
 {
-	unsigned long pixclk;
-
-	pixclk = hdmiphy_preset_to_pixclk(preset);
-	if (!pixclk)
-		return NULL;
-
 	for (; conf->pixclk; ++conf)
 		if (conf->pixclk == pixclk)
 			return conf->data;
@@ -220,15 +215,49 @@ static int hdmiphy_s_power(struct v4l2_subdev *sd, int on)
 static int hdmiphy_s_dv_preset(struct v4l2_subdev *sd,
 	struct v4l2_dv_preset *preset)
 {
-	const u8 *data;
+	const u8 *data = NULL;
 	u8 buffer[32];
 	int ret;
 	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
 	struct i2c_client *client = v4l2_get_subdevdata(sd);
+	unsigned long pixclk;
 	struct device *dev = &client->dev;
 
 	dev_info(dev, "s_dv_preset(preset = %d)\n", preset->preset);
-	data = hdmiphy_find_conf(preset->preset, ctx->conf_tab);
+
+	pixclk = hdmiphy_preset_to_pixclk(preset->preset);
+	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
+	if (!data) {
+		dev_err(dev, "format not supported\n");
+		return -EINVAL;
+	}
+
+	/* storing configuration to the device */
+	memcpy(buffer, data, 32);
+	ret = i2c_master_send(client, buffer, 32);
+	if (ret != 32) {
+		dev_err(dev, "failed to configure HDMIPHY via I2C\n");
+		return -EIO;
+	}
+
+	return 0;
+}
+
+static int hdmiphy_s_dv_timings(struct v4l2_subdev *sd,
+	struct v4l2_dv_timings *timings)
+{
+	const u8 *data;
+	u8 buffer[32];
+	int ret;
+	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
+	struct i2c_client *client = v4l2_get_subdevdata(sd);
+	struct device *dev = &client->dev;
+	unsigned long pixclk = timings->bt.pixelclock;
+
+	dev_info(dev, "s_dv_timings\n");
+	if ((timings->bt.flags & V4L2_DV_FL_REDUCED_FPS) && pixclk == 74250000)
+		pixclk = 74176000;
+	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
 	if (!data) {
 		dev_err(dev, "format not supported\n");
 		return -EINVAL;
@@ -271,6 +300,7 @@ static const struct v4l2_subdev_core_ops hdmiphy_core_ops = {
 
 static const struct v4l2_subdev_video_ops hdmiphy_video_ops = {
 	.s_dv_preset = hdmiphy_s_dv_preset,
+	.s_dv_timings = hdmiphy_s_dv_timings,
 	.s_stream =  hdmiphy_s_stream,
 };
 
-- 
1.7.10.4


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

* [RFC PATCH 11/18] s5p-tv: remove dv_preset support from mixer_video.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (8 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-03-01 11:02     ` Tomasz Stanislawski
  2013-02-16  9:28   ` [RFC PATCH 12/18] s5p-tv: remove the dv_preset API from hdmi Hans Verkuil
                     ` (7 subsequent siblings)
  17 siblings, 1 reply; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-tv/mixer_video.c |   68 ++-------------------------
 1 file changed, 3 insertions(+), 65 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
index cdfadba..9961e13 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -501,64 +501,6 @@ fail:
 	return -ERANGE;
 }
 
-static int mxr_enum_dv_presets(struct file *file, void *fh,
-	struct v4l2_dv_enum_preset *preset)
-{
-	struct mxr_layer *layer = video_drvdata(file);
-	struct mxr_device *mdev = layer->mdev;
-	int ret;
-
-	/* lock protects from changing sd_out */
-	mutex_lock(&mdev->mutex);
-	ret = v4l2_subdev_call(to_outsd(mdev), video, enum_dv_presets, preset);
-	mutex_unlock(&mdev->mutex);
-
-	return ret ? -EINVAL : 0;
-}
-
-static int mxr_s_dv_preset(struct file *file, void *fh,
-	struct v4l2_dv_preset *preset)
-{
-	struct mxr_layer *layer = video_drvdata(file);
-	struct mxr_device *mdev = layer->mdev;
-	int ret;
-
-	/* lock protects from changing sd_out */
-	mutex_lock(&mdev->mutex);
-
-	/* preset change cannot be done while there is an entity
-	 * dependant on output configuration
-	 */
-	if (mdev->n_output > 0) {
-		mutex_unlock(&mdev->mutex);
-		return -EBUSY;
-	}
-
-	ret = v4l2_subdev_call(to_outsd(mdev), video, s_dv_preset, preset);
-
-	mutex_unlock(&mdev->mutex);
-
-	mxr_layer_update_output(layer);
-
-	/* any failure should return EINVAL according to V4L2 doc */
-	return ret ? -EINVAL : 0;
-}
-
-static int mxr_g_dv_preset(struct file *file, void *fh,
-	struct v4l2_dv_preset *preset)
-{
-	struct mxr_layer *layer = video_drvdata(file);
-	struct mxr_device *mdev = layer->mdev;
-	int ret;
-
-	/* lock protects from changing sd_out */
-	mutex_lock(&mdev->mutex);
-	ret = v4l2_subdev_call(to_outsd(mdev), video, g_dv_preset, preset);
-	mutex_unlock(&mdev->mutex);
-
-	return ret ? -EINVAL : 0;
-}
-
 static int mxr_enum_dv_timings(struct file *file, void *fh,
 	struct v4l2_enum_dv_timings *timings)
 {
@@ -584,7 +526,7 @@ static int mxr_s_dv_timings(struct file *file, void *fh,
 	/* lock protects from changing sd_out */
 	mutex_lock(&mdev->mutex);
 
-	/* preset change cannot be done while there is an entity
+	/* timings change cannot be done while there is an entity
 	 * dependant on output configuration
 	 */
 	if (mdev->n_output > 0) {
@@ -689,8 +631,8 @@ static int mxr_enum_output(struct file *file, void *fh, struct v4l2_output *a)
 	/* try to obtain supported tv norms */
 	v4l2_subdev_call(sd, video, g_tvnorms_output, &a->std);
 	a->capabilities = 0;
-	if (sd->ops->video && sd->ops->video->s_dv_preset)
-		a->capabilities |= V4L2_OUT_CAP_PRESETS;
+	if (sd->ops->video && sd->ops->video->s_dv_timings)
+		a->capabilities |= V4L2_OUT_CAP_DV_TIMINGS;
 	if (sd->ops->video && sd->ops->video->s_std_output)
 		a->capabilities |= V4L2_OUT_CAP_STD;
 	a->type = V4L2_OUTPUT_TYPE_ANALOG;
@@ -811,10 +753,6 @@ static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
 	/* Streaming control */
 	.vidioc_streamon = mxr_streamon,
 	.vidioc_streamoff = mxr_streamoff,
-	/* Preset functions */
-	.vidioc_enum_dv_presets = mxr_enum_dv_presets,
-	.vidioc_s_dv_preset = mxr_s_dv_preset,
-	.vidioc_g_dv_preset = mxr_g_dv_preset,
 	/* DV Timings functions */
 	.vidioc_enum_dv_timings = mxr_enum_dv_timings,
 	.vidioc_s_dv_timings = mxr_s_dv_timings,
-- 
1.7.10.4


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

* [RFC PATCH 12/18] s5p-tv: remove the dv_preset API from hdmi.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (9 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 11/18] s5p-tv: remove dv_preset support from mixer_video Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 13/18] s5p-tv: remove the dv_preset API from hdmiphy Hans Verkuil
                     ` (6 subsequent siblings)
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-tv/hdmi_drv.c |   95 +++++++-----------------------
 1 file changed, 22 insertions(+), 73 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c b/drivers/media/platform/s5p-tv/hdmi_drv.c
index 716d0e4..38638b1 100644
--- a/drivers/media/platform/s5p-tv/hdmi_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmi_drv.c
@@ -44,9 +44,6 @@ MODULE_AUTHOR("Tomasz Stanislawski, <t.stanislaws@samsung.com>");
 MODULE_DESCRIPTION("Samsung HDMI");
 MODULE_LICENSE("GPL");
 
-/* default preset configured on probe */
-#define HDMI_DEFAULT_PRESET V4L2_DV_480P59_94
-
 struct hdmi_pulse {
 	u32 beg;
 	u32 end;
@@ -92,8 +89,6 @@ struct hdmi_device {
 	const struct hdmi_timings *cur_conf;
 	/** flag indicating that timings are dirty */
 	int cur_conf_dirty;
-	/** current preset */
-	u32 cur_preset;
 	/** current timings */
 	struct v4l2_dv_timings cur_timings;
 	/** other resources */
@@ -255,7 +250,6 @@ static int hdmi_conf_apply(struct hdmi_device *hdmi_dev)
 {
 	struct device *dev = hdmi_dev->dev;
 	const struct hdmi_timings *conf = hdmi_dev->cur_conf;
-	struct v4l2_dv_preset preset;
 	int ret;
 
 	dev_dbg(dev, "%s\n", __func__);
@@ -270,11 +264,11 @@ static int hdmi_conf_apply(struct hdmi_device *hdmi_dev)
 	hdmi_write_mask(hdmi_dev, HDMI_PHY_RSTOUT,  0, HDMI_PHY_SW_RSTOUT);
 	mdelay(10);
 
-	/* configure presets */
-	preset.preset = hdmi_dev->cur_preset;
-	ret = v4l2_subdev_call(hdmi_dev->phy_sd, video, s_dv_preset, &preset);
+	/* configure timings */
+	ret = v4l2_subdev_call(hdmi_dev->phy_sd, video, s_dv_timings,
+				&hdmi_dev->cur_timings);
 	if (ret) {
-		dev_err(dev, "failed to set preset (%u)\n", preset.preset);
+		dev_err(dev, "failed to set timings\n");
 		return ret;
 	}
 
@@ -478,35 +472,26 @@ static const struct hdmi_timings hdmi_timings_1080p50 = {
 	.vsyn[0] = { .beg = 0 + 4, .end = 5 + 4},
 };
 
+/* default hdmi_timings index of the timings configured on probe */
+#define HDMI_DEFAULT_TIMINGS_IDX (0)
+
 static const struct {
-	u32 preset;
 	bool reduced_fps;
 	const struct v4l2_dv_timings dv_timings;
 	const struct hdmi_timings *hdmi_timings;
 } hdmi_timings[] = {
-	{ V4L2_DV_480P59_94, false, V4L2_DV_BT_CEA_720X480P59_94, &hdmi_timings_480p },
-	{ V4L2_DV_576P50, false, V4L2_DV_BT_CEA_720X576P50, &hdmi_timings_576p50 },
-	{ V4L2_DV_720P50, false, V4L2_DV_BT_CEA_1280X720P50, &hdmi_timings_720p50 },
-	{ V4L2_DV_720P59_94, true, V4L2_DV_BT_CEA_1280X720P60, &hdmi_timings_720p60 },
-	{ V4L2_DV_720P60, false, V4L2_DV_BT_CEA_1280X720P60, &hdmi_timings_720p60 },
-	{ V4L2_DV_1080P24, false, V4L2_DV_BT_CEA_1920X1080P24, &hdmi_timings_1080p24 },
-	{ V4L2_DV_1080P30, false, V4L2_DV_BT_CEA_1920X1080P30, &hdmi_timings_1080p60 },
-	{ V4L2_DV_1080P50, false, V4L2_DV_BT_CEA_1920X1080P50, &hdmi_timings_1080p50 },
-	{ V4L2_DV_1080I50, false, V4L2_DV_BT_CEA_1920X1080I50, &hdmi_timings_1080i50 },
-	{ V4L2_DV_1080I60, false, V4L2_DV_BT_CEA_1920X1080I60, &hdmi_timings_1080i60 },
-	{ V4L2_DV_1080P60, false, V4L2_DV_BT_CEA_1920X1080P60, &hdmi_timings_1080p60 },
+	{ false, V4L2_DV_BT_CEA_720X480P59_94, &hdmi_timings_480p    },
+	{ false, V4L2_DV_BT_CEA_720X576P50,    &hdmi_timings_576p50  },
+	{ false, V4L2_DV_BT_CEA_1280X720P50,   &hdmi_timings_720p50  },
+	{ true,  V4L2_DV_BT_CEA_1280X720P60,   &hdmi_timings_720p60  },
+	{ false, V4L2_DV_BT_CEA_1920X1080P24,  &hdmi_timings_1080p24 },
+	{ false, V4L2_DV_BT_CEA_1920X1080P30,  &hdmi_timings_1080p60 },
+	{ false, V4L2_DV_BT_CEA_1920X1080P50,  &hdmi_timings_1080p50 },
+	{ false, V4L2_DV_BT_CEA_1920X1080I50,  &hdmi_timings_1080i50 },
+	{ false, V4L2_DV_BT_CEA_1920X1080I60,  &hdmi_timings_1080i60 },
+	{ false, V4L2_DV_BT_CEA_1920X1080P60,  &hdmi_timings_1080p60 },
 };
 
-static const struct hdmi_timings *hdmi_preset2timings(u32 preset)
-{
-	int i;
-
-	for (i = 0; i < ARRAY_SIZE(hdmi_timings); ++i)
-		if (hdmi_timings[i].preset == preset)
-			return  hdmi_timings[i].hdmi_timings;
-	return NULL;
-}
-
 static int hdmi_streamon(struct hdmi_device *hdev)
 {
 	struct device *dev = hdev->dev;
@@ -626,32 +611,6 @@ static int hdmi_s_power(struct v4l2_subdev *sd, int on)
 	return IS_ERR_VALUE(ret) ? ret : 0;
 }
 
-static int hdmi_s_dv_preset(struct v4l2_subdev *sd,
-	struct v4l2_dv_preset *preset)
-{
-	struct hdmi_device *hdev = sd_to_hdmi_dev(sd);
-	struct device *dev = hdev->dev;
-	const struct hdmi_timings *conf;
-
-	conf = hdmi_preset2timings(preset->preset);
-	if (conf == NULL) {
-		dev_err(dev, "preset (%u) not supported\n", preset->preset);
-		return -EINVAL;
-	}
-	hdev->cur_conf = conf;
-	hdev->cur_conf_dirty = 1;
-	hdev->cur_preset = preset->preset;
-	return 0;
-}
-
-static int hdmi_g_dv_preset(struct v4l2_subdev *sd,
-	struct v4l2_dv_preset *preset)
-{
-	memset(preset, 0, sizeof(*preset));
-	preset->preset = sd_to_hdmi_dev(sd)->cur_preset;
-	return 0;
-}
-
 static int hdmi_s_dv_timings(struct v4l2_subdev *sd,
 	struct v4l2_dv_timings *timings)
 {
@@ -705,15 +664,6 @@ static int hdmi_g_mbus_fmt(struct v4l2_subdev *sd,
 	return 0;
 }
 
-static int hdmi_enum_dv_presets(struct v4l2_subdev *sd,
-	struct v4l2_dv_enum_preset *preset)
-{
-	if (preset->index >= ARRAY_SIZE(hdmi_timings))
-		return -EINVAL;
-	return v4l_fill_dv_preset_info(hdmi_timings[preset->index].preset,
-		preset);
-}
-
 static int hdmi_enum_dv_timings(struct v4l2_subdev *sd,
 	struct v4l2_enum_dv_timings *timings)
 {
@@ -746,9 +696,6 @@ static const struct v4l2_subdev_core_ops hdmi_sd_core_ops = {
 };
 
 static const struct v4l2_subdev_video_ops hdmi_sd_video_ops = {
-	.s_dv_preset = hdmi_s_dv_preset,
-	.g_dv_preset = hdmi_g_dv_preset,
-	.enum_dv_presets = hdmi_enum_dv_presets,
 	.s_dv_timings = hdmi_s_dv_timings,
 	.g_dv_timings = hdmi_g_dv_timings,
 	.enum_dv_timings = hdmi_enum_dv_timings,
@@ -1022,9 +969,11 @@ static int hdmi_probe(struct platform_device *pdev)
 	sd->owner = THIS_MODULE;
 
 	strlcpy(sd->name, "s5p-hdmi", sizeof(sd->name));
-	hdmi_dev->cur_preset = HDMI_DEFAULT_PRESET;
-	/* FIXME: missing fail preset is not supported */
-	hdmi_dev->cur_conf = hdmi_preset2timings(hdmi_dev->cur_preset);
+	hdmi_dev->cur_timings =
+		hdmi_timings[HDMI_DEFAULT_TIMINGS_IDX].dv_timings;
+	/* FIXME: missing fail timings is not supported */
+	hdmi_dev->cur_conf =
+		hdmi_timings[HDMI_DEFAULT_TIMINGS_IDX].hdmi_timings;
 	hdmi_dev->cur_conf_dirty = 1;
 
 	/* storing subdev for call that have only access to struct device */
-- 
1.7.10.4


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

* [RFC PATCH 13/18] s5p-tv: remove the dv_preset API from hdmiphy.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (10 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 12/18] s5p-tv: remove the dv_preset API from hdmi Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 14/18] v4l2-common: remove obsolete v4l_fill_dv_preset_info Hans Verkuil
                     ` (5 subsequent siblings)
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

The dv_preset API is deprecated and is replaced by the much improved dv_timings
API. Remove the dv_preset support from this driver as this will allow us to
remove the dv_preset API altogether (s5p-tv being the last user of this code).

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
---
 drivers/media/platform/s5p-tv/hdmiphy_drv.c |   53 ---------------------------
 1 file changed, 53 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
index 85b4211..da97124 100644
--- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
@@ -176,27 +176,6 @@ static inline struct hdmiphy_ctx *sd_to_ctx(struct v4l2_subdev *sd)
 	return container_of(sd, struct hdmiphy_ctx, sd);
 }
 
-static unsigned long hdmiphy_preset_to_pixclk(u32 preset)
-{
-	static const unsigned long pixclk[] = {
-		[V4L2_DV_480P59_94] =  27000000,
-		[V4L2_DV_576P50]    =  27000000,
-		[V4L2_DV_720P59_94] =  74176000,
-		[V4L2_DV_720P50]    =  74250000,
-		[V4L2_DV_720P60]    =  74250000,
-		[V4L2_DV_1080P24]   =  74250000,
-		[V4L2_DV_1080P30]   =  74250000,
-		[V4L2_DV_1080I50]   =  74250000,
-		[V4L2_DV_1080I60]   =  74250000,
-		[V4L2_DV_1080P50]   = 148500000,
-		[V4L2_DV_1080P60]   = 148500000,
-	};
-	if (preset < ARRAY_SIZE(pixclk))
-		return pixclk[preset];
-	else
-		return 0;
-}
-
 static const u8 *hdmiphy_find_conf(unsigned long pixclk,
 		const struct hdmiphy_conf *conf)
 {
@@ -212,37 +191,6 @@ static int hdmiphy_s_power(struct v4l2_subdev *sd, int on)
 	return 0;
 }
 
-static int hdmiphy_s_dv_preset(struct v4l2_subdev *sd,
-	struct v4l2_dv_preset *preset)
-{
-	const u8 *data = NULL;
-	u8 buffer[32];
-	int ret;
-	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
-	struct i2c_client *client = v4l2_get_subdevdata(sd);
-	unsigned long pixclk;
-	struct device *dev = &client->dev;
-
-	dev_info(dev, "s_dv_preset(preset = %d)\n", preset->preset);
-
-	pixclk = hdmiphy_preset_to_pixclk(preset->preset);
-	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
-	if (!data) {
-		dev_err(dev, "format not supported\n");
-		return -EINVAL;
-	}
-
-	/* storing configuration to the device */
-	memcpy(buffer, data, 32);
-	ret = i2c_master_send(client, buffer, 32);
-	if (ret != 32) {
-		dev_err(dev, "failed to configure HDMIPHY via I2C\n");
-		return -EIO;
-	}
-
-	return 0;
-}
-
 static int hdmiphy_s_dv_timings(struct v4l2_subdev *sd,
 	struct v4l2_dv_timings *timings)
 {
@@ -299,7 +247,6 @@ static const struct v4l2_subdev_core_ops hdmiphy_core_ops = {
 };
 
 static const struct v4l2_subdev_video_ops hdmiphy_video_ops = {
-	.s_dv_preset = hdmiphy_s_dv_preset,
 	.s_dv_timings = hdmiphy_s_dv_timings,
 	.s_stream =  hdmiphy_s_stream,
 };
-- 
1.7.10.4


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

* [RFC PATCH 14/18] v4l2-common: remove obsolete v4l_fill_dv_preset_info
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (11 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 13/18] s5p-tv: remove the dv_preset API from hdmiphy Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 15/18] v4l2-subdev: remove obsolete dv_preset ops Hans Verkuil
                     ` (4 subsequent siblings)
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

It's no longer used, so it can now be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/v4l2-core/v4l2-common.c |   47 ---------------------------------
 include/media/v4l2-common.h           |    1 -
 2 files changed, 48 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
index aa044f4..b81f274 100644
--- a/drivers/media/v4l2-core/v4l2-common.c
+++ b/drivers/media/v4l2-core/v4l2-common.c
@@ -551,53 +551,6 @@ void v4l_bound_align_image(u32 *w, unsigned int wmin, unsigned int wmax,
 EXPORT_SYMBOL_GPL(v4l_bound_align_image);
 
 /**
- * v4l_fill_dv_preset_info - fill description of a digital video preset
- * @preset - preset value
- * @info - pointer to struct v4l2_dv_enum_preset
- *
- * drivers can use this helper function to fill description of dv preset
- * in info.
- */
-int v4l_fill_dv_preset_info(u32 preset, struct v4l2_dv_enum_preset *info)
-{
-	static const struct v4l2_dv_preset_info {
-		u16 width;
-		u16 height;
-		const char *name;
-	} dv_presets[] = {
-		{ 0, 0, "Invalid" },		/* V4L2_DV_INVALID */
-		{ 720,  480, "480p@59.94" },	/* V4L2_DV_480P59_94 */
-		{ 720,  576, "576p@50" },	/* V4L2_DV_576P50 */
-		{ 1280, 720, "720p@24" },	/* V4L2_DV_720P24 */
-		{ 1280, 720, "720p@25" },	/* V4L2_DV_720P25 */
-		{ 1280, 720, "720p@30" },	/* V4L2_DV_720P30 */
-		{ 1280, 720, "720p@50" },	/* V4L2_DV_720P50 */
-		{ 1280, 720, "720p@59.94" },	/* V4L2_DV_720P59_94 */
-		{ 1280, 720, "720p@60" },	/* V4L2_DV_720P60 */
-		{ 1920, 1080, "1080i@29.97" },	/* V4L2_DV_1080I29_97 */
-		{ 1920, 1080, "1080i@30" },	/* V4L2_DV_1080I30 */
-		{ 1920, 1080, "1080i@25" },	/* V4L2_DV_1080I25 */
-		{ 1920, 1080, "1080i@50" },	/* V4L2_DV_1080I50 */
-		{ 1920, 1080, "1080i@60" },	/* V4L2_DV_1080I60 */
-		{ 1920, 1080, "1080p@24" },	/* V4L2_DV_1080P24 */
-		{ 1920, 1080, "1080p@25" },	/* V4L2_DV_1080P25 */
-		{ 1920, 1080, "1080p@30" },	/* V4L2_DV_1080P30 */
-		{ 1920, 1080, "1080p@50" },	/* V4L2_DV_1080P50 */
-		{ 1920, 1080, "1080p@60" },	/* V4L2_DV_1080P60 */
-	};
-
-	if (info == NULL || preset >= ARRAY_SIZE(dv_presets))
-		return -EINVAL;
-
-	info->preset = preset;
-	info->width = dv_presets[preset].width;
-	info->height = dv_presets[preset].height;
-	strlcpy(info->name, dv_presets[preset].name, sizeof(info->name));
-	return 0;
-}
-EXPORT_SYMBOL_GPL(v4l_fill_dv_preset_info);
-
-/**
  * v4l_match_dv_timings - check if two timings match
  * @t1 - compare this v4l2_dv_timings struct...
  * @t2 - with this struct.
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
index ec7c9c0..1d93c48 100644
--- a/include/media/v4l2-common.h
+++ b/include/media/v4l2-common.h
@@ -201,7 +201,6 @@ void v4l_bound_align_image(unsigned int *w, unsigned int wmin,
 			   unsigned int *h, unsigned int hmin,
 			   unsigned int hmax, unsigned int halign,
 			   unsigned int salign);
-int v4l_fill_dv_preset_info(u32 preset, struct v4l2_dv_enum_preset *info);
 
 struct v4l2_discrete_probe {
 	const struct v4l2_frmsize_discrete	*sizes;
-- 
1.7.10.4


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

* [RFC PATCH 15/18] v4l2-subdev: remove obsolete dv_preset ops.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (12 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 14/18] v4l2-common: remove obsolete v4l_fill_dv_preset_info Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 16/18] v4l2 core: remove the obsolete dv_preset support Hans Verkuil
                     ` (3 subsequent siblings)
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

These ops are no longer used, so it's time to remove them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 include/media/v4l2-subdev.h |   16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index b137a5e..34ce1a2 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -279,14 +279,6 @@ struct v4l2_mbus_frame_desc {
    s_routing: see s_routing in audio_ops, except this version is for video
 	devices.
 
-   s_dv_preset: set dv (Digital Video) preset in the sub device. Similar to
-	s_std()
-
-   g_dv_preset: get current dv (Digital Video) preset in the sub device.
-
-   query_dv_preset: query dv preset in the sub device. This is similar to
-	querystd()
-
    s_dv_timings(): Set custom dv timings in the sub device. This is used
 	when sub device is capable of setting detailed timing information
 	in the hardware to generate/detect the video signal.
@@ -331,14 +323,6 @@ struct v4l2_subdev_video_ops {
 				struct v4l2_subdev_frame_interval *interval);
 	int (*enum_framesizes)(struct v4l2_subdev *sd, struct v4l2_frmsizeenum *fsize);
 	int (*enum_frameintervals)(struct v4l2_subdev *sd, struct v4l2_frmivalenum *fival);
-	int (*enum_dv_presets) (struct v4l2_subdev *sd,
-			struct v4l2_dv_enum_preset *preset);
-	int (*s_dv_preset)(struct v4l2_subdev *sd,
-			struct v4l2_dv_preset *preset);
-	int (*g_dv_preset)(struct v4l2_subdev *sd,
-			struct v4l2_dv_preset *preset);
-	int (*query_dv_preset)(struct v4l2_subdev *sd,
-			struct v4l2_dv_preset *preset);
 	int (*s_dv_timings)(struct v4l2_subdev *sd,
 			struct v4l2_dv_timings *timings);
 	int (*g_dv_timings)(struct v4l2_subdev *sd,
-- 
1.7.10.4


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

* [RFC PATCH 16/18] v4l2 core: remove the obsolete dv_preset support.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (13 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 15/18] v4l2-subdev: remove obsolete dv_preset ops Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 17/18] DocBook/media/v4l: remove the documentation of the obsolete dv_preset API Hans Verkuil
                     ` (2 subsequent siblings)
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

These ioctls are no longer used by any drivers, so remove them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c |    4 ----
 drivers/media/v4l2-core/v4l2-dev.c            |    4 ----
 drivers/media/v4l2-core/v4l2-ioctl.c          |   27 ++-----------------------
 include/media/v4l2-ioctl.h                    |    9 ---------
 4 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
index 7157af3..f129551 100644
--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -1076,10 +1076,6 @@ long v4l2_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg)
 	case VIDIOC_DBG_G_REGISTER:
 	case VIDIOC_DBG_G_CHIP_IDENT:
 	case VIDIOC_S_HW_FREQ_SEEK:
-	case VIDIOC_ENUM_DV_PRESETS:
-	case VIDIOC_S_DV_PRESET:
-	case VIDIOC_G_DV_PRESET:
-	case VIDIOC_QUERY_DV_PRESET:
 	case VIDIOC_S_DV_TIMINGS:
 	case VIDIOC_G_DV_TIMINGS:
 	case VIDIOC_DQEVENT:
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
index 51b3a77..a4201ff 100644
--- a/drivers/media/v4l2-core/v4l2-dev.c
+++ b/drivers/media/v4l2-core/v4l2-dev.c
@@ -685,7 +685,6 @@ static void determine_valid_ioctls(struct video_device *vdev)
 			SET_VALID_IOCTL(ops, VIDIOC_ENUMAUDIO, vidioc_enumaudio);
 			SET_VALID_IOCTL(ops, VIDIOC_G_AUDIO, vidioc_g_audio);
 			SET_VALID_IOCTL(ops, VIDIOC_S_AUDIO, vidioc_s_audio);
-			SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset);
 			SET_VALID_IOCTL(ops, VIDIOC_QUERY_DV_TIMINGS, vidioc_query_dv_timings);
 		}
 		if (is_tx) {
@@ -708,9 +707,6 @@ static void determine_valid_ioctls(struct video_device *vdev)
 					(ops->vidioc_g_std || vdev->current_norm)))
 			set_bit(_IOC_NR(VIDIOC_G_PARM), valid_ioctls);
 		SET_VALID_IOCTL(ops, VIDIOC_S_PARM, vidioc_s_parm);
-		SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_PRESETS, vidioc_enum_dv_presets);
-		SET_VALID_IOCTL(ops, VIDIOC_S_DV_PRESET, vidioc_s_dv_preset);
-		SET_VALID_IOCTL(ops, VIDIOC_G_DV_PRESET, vidioc_g_dv_preset);
 		SET_VALID_IOCTL(ops, VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings);
 		SET_VALID_IOCTL(ops, VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings);
 		SET_VALID_IOCTL(ops, VIDIOC_ENUM_DV_TIMINGS, vidioc_enum_dv_timings);
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index aa6e7c7..3f24902 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -643,21 +643,6 @@ static void v4l_print_dbg_register(const void *arg, bool write_only)
 			p->reg, p->val);
 }
 
-static void v4l_print_dv_enum_presets(const void *arg, bool write_only)
-{
-	const struct v4l2_dv_enum_preset *p = arg;
-
-	pr_cont("index=%u, preset=%u, name=%s, width=%u, height=%u\n",
-			p->index, p->preset, p->name, p->width, p->height);
-}
-
-static void v4l_print_dv_preset(const void *arg, bool write_only)
-{
-	const struct v4l2_dv_preset *p = arg;
-
-	pr_cont("preset=%u\n", p->preset);
-}
-
 static void v4l_print_dv_timings(const void *arg, bool write_only)
 {
 	const struct v4l2_dv_timings *p = arg;
@@ -1000,15 +985,13 @@ static int v4l_enuminput(const struct v4l2_ioctl_ops *ops,
 	struct v4l2_input *p = arg;
 
 	/*
-	 * We set the flags for CAP_PRESETS, CAP_DV_TIMINGS &
+	 * We set the flags for CAP_DV_TIMINGS &
 	 * CAP_STD here based on ioctl handler provided by the
 	 * driver. If the driver doesn't support these
 	 * for a specific input, it must override these flags.
 	 */
 	if (ops->vidioc_s_std)
 		p->capabilities |= V4L2_IN_CAP_STD;
-	if (ops->vidioc_s_dv_preset)
-		p->capabilities |= V4L2_IN_CAP_PRESETS;
 	if (ops->vidioc_s_dv_timings)
 		p->capabilities |= V4L2_IN_CAP_DV_TIMINGS;
 
@@ -1021,15 +1004,13 @@ static int v4l_enumoutput(const struct v4l2_ioctl_ops *ops,
 	struct v4l2_output *p = arg;
 
 	/*
-	 * We set the flags for CAP_PRESETS, CAP_DV_TIMINGS &
+	 * We set the flags for CAP_DV_TIMINGS &
 	 * CAP_STD here based on ioctl handler provided by the
 	 * driver. If the driver doesn't support these
 	 * for a specific output, it must override these flags.
 	 */
 	if (ops->vidioc_s_std)
 		p->capabilities |= V4L2_OUT_CAP_STD;
-	if (ops->vidioc_s_dv_preset)
-		p->capabilities |= V4L2_OUT_CAP_PRESETS;
 	if (ops->vidioc_s_dv_timings)
 		p->capabilities |= V4L2_OUT_CAP_DV_TIMINGS;
 
@@ -2028,10 +2009,6 @@ static struct v4l2_ioctl_info v4l2_ioctls[] = {
 	IOCTL_INFO_FNC(VIDIOC_DBG_G_REGISTER, v4l_dbg_g_register, v4l_print_dbg_register, 0),
 	IOCTL_INFO_FNC(VIDIOC_DBG_G_CHIP_IDENT, v4l_dbg_g_chip_ident, v4l_print_dbg_chip_ident, 0),
 	IOCTL_INFO_FNC(VIDIOC_S_HW_FREQ_SEEK, v4l_s_hw_freq_seek, v4l_print_hw_freq_seek, INFO_FL_PRIO),
-	IOCTL_INFO_STD(VIDIOC_ENUM_DV_PRESETS, vidioc_enum_dv_presets, v4l_print_dv_enum_presets, 0),
-	IOCTL_INFO_STD(VIDIOC_S_DV_PRESET, vidioc_s_dv_preset, v4l_print_dv_preset, INFO_FL_PRIO),
-	IOCTL_INFO_STD(VIDIOC_G_DV_PRESET, vidioc_g_dv_preset, v4l_print_dv_preset, 0),
-	IOCTL_INFO_STD(VIDIOC_QUERY_DV_PRESET, vidioc_query_dv_preset, v4l_print_dv_preset, 0),
 	IOCTL_INFO_STD(VIDIOC_S_DV_TIMINGS, vidioc_s_dv_timings, v4l_print_dv_timings, INFO_FL_PRIO),
 	IOCTL_INFO_STD(VIDIOC_G_DV_TIMINGS, vidioc_g_dv_timings, v4l_print_dv_timings, 0),
 	IOCTL_INFO_FNC(VIDIOC_DQEVENT, v4l_dqevent, v4l_print_event, 0),
diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h
index 4118ad1..daa0065 100644
--- a/include/media/v4l2-ioctl.h
+++ b/include/media/v4l2-ioctl.h
@@ -254,15 +254,6 @@ struct v4l2_ioctl_ops {
 					   struct v4l2_frmivalenum *fival);
 
 	/* DV Timings IOCTLs */
-	int (*vidioc_enum_dv_presets) (struct file *file, void *fh,
-				       struct v4l2_dv_enum_preset *preset);
-
-	int (*vidioc_s_dv_preset) (struct file *file, void *fh,
-				   struct v4l2_dv_preset *preset);
-	int (*vidioc_g_dv_preset) (struct file *file, void *fh,
-				   struct v4l2_dv_preset *preset);
-	int (*vidioc_query_dv_preset) (struct file *file, void *fh,
-					struct v4l2_dv_preset *qpreset);
 	int (*vidioc_s_dv_timings) (struct file *file, void *fh,
 				    struct v4l2_dv_timings *timings);
 	int (*vidioc_g_dv_timings) (struct file *file, void *fh,
-- 
1.7.10.4


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

* [RFC PATCH 17/18] DocBook/media/v4l: remove the documentation of the obsolete dv_preset API.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (14 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 16/18] v4l2 core: remove the obsolete dv_preset support Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16  9:28   ` [RFC PATCH 18/18] videodev2.h: remove obsolete DV_PRESET API Hans Verkuil
  2013-02-16 13:12   ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Prabhakar Lad
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This API is no longer used by any driver and so can be removed from the
documentation.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 Documentation/DocBook/media/v4l/common.xml         |   14 --
 Documentation/DocBook/media/v4l/v4l2.xml           |    3 -
 .../DocBook/media/v4l/vidioc-enum-dv-presets.xml   |  240 --------------------
 .../DocBook/media/v4l/vidioc-enuminput.xml         |    5 -
 .../DocBook/media/v4l/vidioc-enumoutput.xml        |    5 -
 .../DocBook/media/v4l/vidioc-g-dv-preset.xml       |  113 ---------
 .../DocBook/media/v4l/vidioc-query-dv-preset.xml   |   78 -------
 7 files changed, 458 deletions(-)
 delete mode 100644 Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml
 delete mode 100644 Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
 delete mode 100644 Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml

diff --git a/Documentation/DocBook/media/v4l/common.xml b/Documentation/DocBook/media/v4l/common.xml
index ae06afb..1ddf354 100644
--- a/Documentation/DocBook/media/v4l/common.xml
+++ b/Documentation/DocBook/media/v4l/common.xml
@@ -750,15 +750,6 @@ header can be used to get the timings of the formats in the <xref linkend="cea86
 <xref linkend="vesadmt" /> standards.
 	</para>
 	</listitem>
-	<listitem>
-	<para>DV Presets: Digital Video (DV) presets (<emphasis role="bold">deprecated</emphasis>).
-	These are IDs representing a
-video timing at the input/output. Presets are pre-defined timings implemented
-by the hardware according to video standards. A __u32 data type is used to represent
-a preset unlike the bit mask that is used in &v4l2-std-id; allowing future extensions
-to support as many different presets as needed. This API is deprecated in favor of the DV Timings
-API.</para>
-	</listitem>
 	</itemizedlist>
 	<para>To enumerate and query the attributes of the DV timings supported by a device,
 	applications use the &VIDIOC-ENUM-DV-TIMINGS; and &VIDIOC-DV-TIMINGS-CAP; ioctls.
@@ -766,11 +757,6 @@ API.</para>
 &VIDIOC-S-DV-TIMINGS; ioctl and to get current DV timings they use the
 &VIDIOC-G-DV-TIMINGS; ioctl. To detect the DV timings as seen by the video receiver applications
 use the &VIDIOC-QUERY-DV-TIMINGS; ioctl.</para>
-	<para>To enumerate and query the attributes of DV presets supported by a device,
-applications use the &VIDIOC-ENUM-DV-PRESETS; ioctl. To get the current DV preset,
-applications use the &VIDIOC-G-DV-PRESET; ioctl and to set a preset they use the
-&VIDIOC-S-DV-PRESET; ioctl. To detect the preset as seen by the video receiver applications
-use the &VIDIOC-QUERY-DV-PRESET; ioctl.</para>
 	<para>Applications can make use of the <xref linkend="input-capabilities" /> and
 <xref linkend="output-capabilities"/> flags to decide what ioctls are available to set the
 video timings for the device.</para>
diff --git a/Documentation/DocBook/media/v4l/v4l2.xml b/Documentation/DocBook/media/v4l/v4l2.xml
index a3cce18..32a10ee 100644
--- a/Documentation/DocBook/media/v4l/v4l2.xml
+++ b/Documentation/DocBook/media/v4l/v4l2.xml
@@ -544,7 +544,6 @@ and discussions on the V4L mailing list.</revremark>
     &sub-encoder-cmd;
     &sub-enumaudio;
     &sub-enumaudioout;
-    &sub-enum-dv-presets;
     &sub-enum-dv-timings;
     &sub-enum-fmt;
     &sub-enum-framesizes;
@@ -558,7 +557,6 @@ and discussions on the V4L mailing list.</revremark>
     &sub-g-audioout;
     &sub-g-crop;
     &sub-g-ctrl;
-    &sub-g-dv-preset;
     &sub-g-dv-timings;
     &sub-g-enc-index;
     &sub-g-ext-ctrls;
@@ -582,7 +580,6 @@ and discussions on the V4L mailing list.</revremark>
     &sub-querybuf;
     &sub-querycap;
     &sub-queryctrl;
-    &sub-query-dv-preset;
     &sub-query-dv-timings;
     &sub-querystd;
     &sub-reqbufs;
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml b/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml
deleted file mode 100644
index fced5fb..0000000
--- a/Documentation/DocBook/media/v4l/vidioc-enum-dv-presets.xml
+++ /dev/null
@@ -1,240 +0,0 @@
-<refentry id="vidioc-enum-dv-presets">
-  <refmeta>
-    <refentrytitle>ioctl VIDIOC_ENUM_DV_PRESETS</refentrytitle>
-    &manvol;
-  </refmeta>
-
-  <refnamediv>
-    <refname>VIDIOC_ENUM_DV_PRESETS</refname>
-    <refpurpose>Enumerate supported Digital Video presets</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <funcsynopsis>
-      <funcprototype>
-	<funcdef>int <function>ioctl</function></funcdef>
-	<paramdef>int <parameter>fd</parameter></paramdef>
-	<paramdef>int <parameter>request</parameter></paramdef>
-	<paramdef>struct v4l2_dv_enum_preset *<parameter>argp</parameter></paramdef>
-      </funcprototype>
-    </funcsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1>
-    <title>Arguments</title>
-
-    <variablelist>
-      <varlistentry>
-	<term><parameter>fd</parameter></term>
-	<listitem>
-	  <para>&fd;</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><parameter>request</parameter></term>
-	<listitem>
-	  <para>VIDIOC_ENUM_DV_PRESETS</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><parameter>argp</parameter></term>
-	<listitem>
-	  <para></para>
-	</listitem>
-      </varlistentry>
-    </variablelist>
-  </refsect1>
-
-  <refsect1>
-    <title>Description</title>
-
-    <para>This ioctl is <emphasis role="bold">deprecated</emphasis>.
-    New drivers and applications should use &VIDIOC-ENUM-DV-TIMINGS; instead.
-    </para>
-
-    <para>To query the attributes of a DV preset, applications initialize the
-<structfield>index</structfield> field and zero the reserved array of &v4l2-dv-enum-preset;
-and call the <constant>VIDIOC_ENUM_DV_PRESETS</constant> ioctl with a pointer to this
-structure. Drivers fill the rest of the structure or return an
-&EINVAL; when the index is out of bounds. To enumerate all DV Presets supported,
-applications shall begin at index zero, incrementing by one until the
-driver returns <errorcode>EINVAL</errorcode>. Drivers may enumerate a
-different set of DV presets after switching the video input or
-output.</para>
-
-    <table pgwide="1" frame="none" id="v4l2-dv-enum-preset">
-      <title>struct <structname>v4l2_dv_enum_presets</structname></title>
-      <tgroup cols="3">
-	&cs-str;
-	<tbody valign="top">
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>index</structfield></entry>
-	    <entry>Number of the DV preset, set by the
-application.</entry>
-	  </row>
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>preset</structfield></entry>
-	    <entry>This field identifies one of the DV preset values listed in <xref linkend="v4l2-dv-presets-vals"/>.</entry>
-	  </row>
-	  <row>
-	    <entry>__u8</entry>
-	    <entry><structfield>name</structfield>[24]</entry>
-	    <entry>Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is
-intended for the user.</entry>
-	  </row>
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>width</structfield></entry>
-	    <entry>Width of the active video in pixels for the DV preset.</entry>
-	  </row>
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>height</structfield></entry>
-	    <entry>Height of the active video in lines for the DV preset.</entry>
-	  </row>
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>reserved</structfield>[4]</entry>
-	    <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
-	  </row>
-	</tbody>
-      </tgroup>
-    </table>
-
-    <table pgwide="1" frame="none" id="v4l2-dv-presets-vals">
-      <title>struct <structname>DV Presets</structname></title>
-      <tgroup cols="3">
-	&cs-str;
-	<tbody valign="top">
-	  <row>
-	    <entry>Preset</entry>
-	    <entry>Preset value</entry>
-	    <entry>Description</entry>
-	  </row>
-	  <row>
-	    <entry></entry>
-	    <entry></entry>
-	    <entry></entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_INVALID</entry>
-	    <entry>0</entry>
-	    <entry>Invalid preset value.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_480P59_94</entry>
-	    <entry>1</entry>
-	    <entry>720x480 progressive video at 59.94 fps as per BT.1362.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_576P50</entry>
-	    <entry>2</entry>
-	    <entry>720x576 progressive video at 50 fps as per BT.1362.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_720P24</entry>
-	    <entry>3</entry>
-	    <entry>1280x720 progressive video at 24 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_720P25</entry>
-	    <entry>4</entry>
-	    <entry>1280x720 progressive video at 25 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_720P30</entry>
-	    <entry>5</entry>
-	    <entry>1280x720 progressive video at 30 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_720P50</entry>
-	    <entry>6</entry>
-	    <entry>1280x720 progressive video at 50 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_720P59_94</entry>
-	    <entry>7</entry>
-	    <entry>1280x720 progressive video at 59.94 fps as per SMPTE 274M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_720P60</entry>
-	    <entry>8</entry>
-	    <entry>1280x720 progressive video at 60 fps as per SMPTE 274M/296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080I29_97</entry>
-	    <entry>9</entry>
-	    <entry>1920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080I30</entry>
-	    <entry>10</entry>
-	    <entry>1920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080I25</entry>
-	    <entry>11</entry>
-	    <entry>1920x1080 interlaced video at 25 fps as per BT.1120.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080I50</entry>
-	    <entry>12</entry>
-	    <entry>1920x1080 interlaced video at 50 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080I60</entry>
-	    <entry>13</entry>
-	    <entry>1920x1080 interlaced video at 60 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080P24</entry>
-	    <entry>14</entry>
-	    <entry>1920x1080 progressive video at 24 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080P25</entry>
-	    <entry>15</entry>
-	    <entry>1920x1080 progressive video at 25 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080P30</entry>
-	    <entry>16</entry>
-	    <entry>1920x1080 progressive video at 30 fps as per SMPTE 296M.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080P50</entry>
-	    <entry>17</entry>
-	    <entry>1920x1080 progressive video at 50 fps as per BT.1120.</entry>
-	  </row>
-	  <row>
-	    <entry>V4L2_DV_1080P60</entry>
-	    <entry>18</entry>
-	    <entry>1920x1080 progressive video at 60 fps as per BT.1120.</entry>
-	  </row>
-	</tbody>
-      </tgroup>
-    </table>
-  </refsect1>
-
-  <refsect1>
-    &return-value;
-
-    <variablelist>
-      <varlistentry>
-	<term><errorcode>EINVAL</errorcode></term>
-	<listitem>
-	  <para>The &v4l2-dv-enum-preset; <structfield>index</structfield>
-is out of bounds.</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><errorcode>ENODATA</errorcode></term>
-	<listitem>
-	  <para>Digital video presets are not supported for this input or output.</para>
-	</listitem>
-      </varlistentry>
-    </variablelist>
-  </refsect1>
-</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
index 3c9a813..493a39a 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enuminput.xml
@@ -278,11 +278,6 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
 	&cs-def;
 	<tbody valign="top">
 	  <row>
-	    <entry><constant>V4L2_IN_CAP_PRESETS</constant></entry>
-	    <entry>0x00000001</entry>
-	    <entry>This input supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
-	  </row>
-	  <row>
 	    <entry><constant>V4L2_IN_CAP_DV_TIMINGS</constant></entry>
 	    <entry>0x00000002</entry>
 	    <entry>This input supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
index f4ab079..2654e09 100644
--- a/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
+++ b/Documentation/DocBook/media/v4l/vidioc-enumoutput.xml
@@ -163,11 +163,6 @@ input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
 	&cs-def;
 	<tbody valign="top">
 	  <row>
-	    <entry><constant>V4L2_OUT_CAP_PRESETS</constant></entry>
-	    <entry>0x00000001</entry>
-	    <entry>This output supports setting DV presets by using VIDIOC_S_DV_PRESET.</entry>
-	  </row>
-	  <row>
 	    <entry><constant>V4L2_OUT_CAP_DV_TIMINGS</constant></entry>
 	    <entry>0x00000002</entry>
 	    <entry>This output supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml b/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
deleted file mode 100644
index b9ea376..0000000
--- a/Documentation/DocBook/media/v4l/vidioc-g-dv-preset.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-<refentry id="vidioc-g-dv-preset">
-  <refmeta>
-    <refentrytitle>ioctl VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</refentrytitle>
-    &manvol;
-  </refmeta>
-
-  <refnamediv>
-    <refname>VIDIOC_G_DV_PRESET</refname>
-    <refname>VIDIOC_S_DV_PRESET</refname>
-    <refpurpose>Query or select the DV preset of the current input or output</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <funcsynopsis>
-      <funcprototype>
-	<funcdef>int <function>ioctl</function></funcdef>
-	<paramdef>int <parameter>fd</parameter></paramdef>
-	<paramdef>int <parameter>request</parameter></paramdef>
-	<paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef>
-      </funcprototype>
-    </funcsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1>
-    <title>Arguments</title>
-
-    <variablelist>
-      <varlistentry>
-	<term><parameter>fd</parameter></term>
-	<listitem>
-	  <para>&fd;</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><parameter>request</parameter></term>
-	<listitem>
-	  <para>VIDIOC_G_DV_PRESET, VIDIOC_S_DV_PRESET</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><parameter>argp</parameter></term>
-	<listitem>
-	  <para></para>
-	</listitem>
-      </varlistentry>
-    </variablelist>
-  </refsect1>
-
-  <refsect1>
-    <title>Description</title>
-
-    <para>These ioctls are <emphasis role="bold">deprecated</emphasis>.
-    New drivers and applications should use &VIDIOC-G-DV-TIMINGS; and &VIDIOC-S-DV-TIMINGS;
-    instead.
-    </para>
-
-    <para>To query and select the current DV preset, applications
-use the <constant>VIDIOC_G_DV_PRESET</constant> and <constant>VIDIOC_S_DV_PRESET</constant>
-ioctls which take a pointer to a &v4l2-dv-preset; type as argument.
-Applications must zero the reserved array in &v4l2-dv-preset;.
-<constant>VIDIOC_G_DV_PRESET</constant> returns a dv preset in the field
-<structfield>preset</structfield> of &v4l2-dv-preset;.</para>
-
-    <para><constant>VIDIOC_S_DV_PRESET</constant> accepts a pointer to a &v4l2-dv-preset;
-that has the preset value to be set. Applications must zero the reserved array in &v4l2-dv-preset;.
-If the preset is not supported, it returns an &EINVAL; </para>
-  </refsect1>
-
-  <refsect1>
-    &return-value;
-
-    <variablelist>
-      <varlistentry>
-	<term><errorcode>EINVAL</errorcode></term>
-	<listitem>
-	  <para>This ioctl is not supported, or the
-<constant>VIDIOC_S_DV_PRESET</constant>,<constant>VIDIOC_S_DV_PRESET</constant> parameter was unsuitable.</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><errorcode>ENODATA</errorcode></term>
-	<listitem>
-	  <para>Digital video presets are not supported for this input or output.</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><errorcode>EBUSY</errorcode></term>
-	<listitem>
-	  <para>The device is busy and therefore can not change the preset.</para>
-	</listitem>
-      </varlistentry>
-    </variablelist>
-
-    <table pgwide="1" frame="none" id="v4l2-dv-preset">
-      <title>struct <structname>v4l2_dv_preset</structname></title>
-      <tgroup cols="3">
-	&cs-str;
-	<tbody valign="top">
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>preset</structfield></entry>
-	    <entry>Preset value to represent the digital video timings</entry>
-	  </row>
-	  <row>
-	    <entry>__u32</entry>
-	    <entry><structfield>reserved[4]</structfield></entry>
-	    <entry>Reserved fields for future use</entry>
-	  </row>
-	</tbody>
-      </tgroup>
-    </table>
-  </refsect1>
-</refentry>
diff --git a/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml b/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml
deleted file mode 100644
index 68b49d0..0000000
--- a/Documentation/DocBook/media/v4l/vidioc-query-dv-preset.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<refentry id="vidioc-query-dv-preset">
-  <refmeta>
-    <refentrytitle>ioctl VIDIOC_QUERY_DV_PRESET</refentrytitle>
-    &manvol;
-  </refmeta>
-
-  <refnamediv>
-    <refname>VIDIOC_QUERY_DV_PRESET</refname>
-    <refpurpose>Sense the DV preset received by the current
-input</refpurpose>
-  </refnamediv>
-
-  <refsynopsisdiv>
-    <funcsynopsis>
-      <funcprototype>
-	<funcdef>int <function>ioctl</function></funcdef>
-	<paramdef>int <parameter>fd</parameter></paramdef>
-	<paramdef>int <parameter>request</parameter></paramdef>
-	<paramdef>struct v4l2_dv_preset *<parameter>argp</parameter></paramdef>
-      </funcprototype>
-    </funcsynopsis>
-  </refsynopsisdiv>
-
-  <refsect1>
-    <title>Arguments</title>
-
-    <variablelist>
-	<varlistentry>
-	<term><parameter>fd</parameter></term>
-	<listitem>
-	  <para>&fd;</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><parameter>request</parameter></term>
-	<listitem>
-	  <para>VIDIOC_QUERY_DV_PRESET</para>
-	</listitem>
-      </varlistentry>
-      <varlistentry>
-	<term><parameter>argp</parameter></term>
-	<listitem>
-	  <para></para>
-	</listitem>
-      </varlistentry>
-    </variablelist>
-  </refsect1>
-
-  <refsect1>
-    <title>Description</title>
-
-    <para>This ioctl is <emphasis role="bold">deprecated</emphasis>.
-    New drivers and applications should use &VIDIOC-QUERY-DV-TIMINGS; instead.
-    </para>
-
-    <para>The hardware may be able to detect the current DV preset
-automatically, similar to sensing the video standard. To do so, applications
-call <constant> VIDIOC_QUERY_DV_PRESET</constant> with a pointer to a
-&v4l2-dv-preset; type. Once the hardware detects a preset, that preset is
-returned in the preset field of &v4l2-dv-preset;. If the preset could not be
-detected because there was no signal, or the signal was unreliable, or the
-signal did not map to a supported preset, then the value V4L2_DV_INVALID is
-returned.</para>
-  </refsect1>
-
-  <refsect1>
-    &return-value;
-
-    <variablelist>
-      <varlistentry>
-	<term><errorcode>ENODATA</errorcode></term>
-	<listitem>
-	  <para>Digital video presets are not supported for this input or output.</para>
-	</listitem>
-      </varlistentry>
-    </variablelist>
-  </refsect1>
-</refentry>
-- 
1.7.10.4


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

* [RFC PATCH 18/18] videodev2.h: remove obsolete DV_PRESET API.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (15 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 17/18] DocBook/media/v4l: remove the documentation of the obsolete dv_preset API Hans Verkuil
@ 2013-02-16  9:28   ` Hans Verkuil
  2013-02-16 13:12   ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Prabhakar Lad
  17 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16  9:28 UTC (permalink / raw)
  To: linux-media
  Cc: Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

From: Hans Verkuil <hans.verkuil@cisco.com>

This API is now obsolete and can be removed.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 include/uapi/linux/videodev2.h |   54 ----------------------------------------
 1 file changed, 54 deletions(-)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 234d1d8..d1513c3 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -980,52 +980,6 @@ struct v4l2_standard {
 	__u32		     reserved[4];
 };
 
-/* The DV Preset API is deprecated in favor of the DV Timings API.
-   New drivers shouldn't use this anymore! */
-
-/*
- *	V I D E O	T I M I N G S	D V	P R E S E T
- */
-struct v4l2_dv_preset {
-	__u32	preset;
-	__u32	reserved[4];
-};
-
-/*
- *	D V	P R E S E T S	E N U M E R A T I O N
- */
-struct v4l2_dv_enum_preset {
-	__u32	index;
-	__u32	preset;
-	__u8	name[32]; /* Name of the preset timing */
-	__u32	width;
-	__u32	height;
-	__u32	reserved[4];
-};
-
-/*
- * 	D V	P R E S E T	V A L U E S
- */
-#define		V4L2_DV_INVALID		0
-#define		V4L2_DV_480P59_94	1 /* BT.1362 */
-#define		V4L2_DV_576P50		2 /* BT.1362 */
-#define		V4L2_DV_720P24		3 /* SMPTE 296M */
-#define		V4L2_DV_720P25		4 /* SMPTE 296M */
-#define		V4L2_DV_720P30		5 /* SMPTE 296M */
-#define		V4L2_DV_720P50		6 /* SMPTE 296M */
-#define		V4L2_DV_720P59_94	7 /* SMPTE 274M */
-#define		V4L2_DV_720P60		8 /* SMPTE 274M/296M */
-#define		V4L2_DV_1080I29_97	9 /* BT.1120/ SMPTE 274M */
-#define		V4L2_DV_1080I30		10 /* BT.1120/ SMPTE 274M */
-#define		V4L2_DV_1080I25		11 /* BT.1120 */
-#define		V4L2_DV_1080I50		12 /* SMPTE 296M */
-#define		V4L2_DV_1080I60		13 /* SMPTE 296M */
-#define		V4L2_DV_1080P24		14 /* SMPTE 296M */
-#define		V4L2_DV_1080P25		15 /* SMPTE 296M */
-#define		V4L2_DV_1080P30		16 /* SMPTE 296M */
-#define		V4L2_DV_1080P50		17 /* BT.1120 */
-#define		V4L2_DV_1080P60		18 /* BT.1120 */
-
 /*
  *	D V 	B T	T I M I N G S
  */
@@ -1239,7 +1193,6 @@ struct v4l2_input {
 #define V4L2_IN_ST_VTR         0x04000000  /* VTR time constant */
 
 /* capabilities flags */
-#define V4L2_IN_CAP_PRESETS		0x00000001 /* Supports S_DV_PRESET */
 #define V4L2_IN_CAP_DV_TIMINGS		0x00000002 /* Supports S_DV_TIMINGS */
 #define V4L2_IN_CAP_CUSTOM_TIMINGS	V4L2_IN_CAP_DV_TIMINGS /* For compatibility */
 #define V4L2_IN_CAP_STD			0x00000004 /* Supports S_STD */
@@ -1263,7 +1216,6 @@ struct v4l2_output {
 #define V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY	3
 
 /* capabilities flags */
-#define V4L2_OUT_CAP_PRESETS		0x00000001 /* Supports S_DV_PRESET */
 #define V4L2_OUT_CAP_DV_TIMINGS		0x00000002 /* Supports S_DV_TIMINGS */
 #define V4L2_OUT_CAP_CUSTOM_TIMINGS	V4L2_OUT_CAP_DV_TIMINGS /* For compatibility */
 #define V4L2_OUT_CAP_STD		0x00000004 /* Supports S_STD */
@@ -1980,12 +1932,6 @@ struct v4l2_create_buffers {
 
 #define VIDIOC_S_HW_FREQ_SEEK	 _IOW('V', 82, struct v4l2_hw_freq_seek)
 
-/* These four DV Preset ioctls are deprecated in favor of the DV Timings
-   ioctls. */
-#define	VIDIOC_ENUM_DV_PRESETS	_IOWR('V', 83, struct v4l2_dv_enum_preset)
-#define	VIDIOC_S_DV_PRESET	_IOWR('V', 84, struct v4l2_dv_preset)
-#define	VIDIOC_G_DV_PRESET	_IOWR('V', 85, struct v4l2_dv_preset)
-#define	VIDIOC_QUERY_DV_PRESET	_IOR('V',  86, struct v4l2_dv_preset)
 #define	VIDIOC_S_DV_TIMINGS	_IOWR('V', 87, struct v4l2_dv_timings)
 #define	VIDIOC_G_DV_TIMINGS	_IOWR('V', 88, struct v4l2_dv_timings)
 #define	VIDIOC_DQEVENT		 _IOR('V', 89, struct v4l2_event)
-- 
1.7.10.4


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

* Re: [RFC PATCH 04/18] davinci_vpfe: fix copy-paste errors in several comments.
  2013-02-16  9:28   ` [RFC PATCH 04/18] davinci_vpfe: fix copy-paste errors in several comments Hans Verkuil
@ 2013-02-16 12:40     ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 12:40 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

Hi Hans,

Thanks for the patch.

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> This removes some incorrect dv_preset references left over from copy-and-paste
> errors.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  drivers/staging/media/davinci_vpfe/vpfe_video.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/media/davinci_vpfe/vpfe_video.c b/drivers/staging/media/davinci_vpfe/vpfe_video.c
> index 99ccbeb..19dc5b0 100644
> --- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
> +++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
> @@ -1016,12 +1016,12 @@ vpfe_query_dv_timings(struct file *file, void *fh,
>  }
>
>  /*
> - * vpfe_s_dv_timings() - set dv_preset on external subdev
> + * vpfe_s_dv_timings() - set dv_timings on external subdev
>   * @file: file pointer
>   * @priv: void pointer
>   * @timings: pointer to v4l2_dv_timings structure
>   *
> - * set dv_timings pointed by preset on external subdev through
> + * set dv_timings pointed by timings on external subdev through
>   * v4l2_device_call_until_err, this configures amplifier also
>   *
>   * Return 0 on success, error code otherwise
> @@ -1042,12 +1042,12 @@ vpfe_s_dv_timings(struct file *file, void *fh,
>  }
>
>  /*
> - * vpfe_g_dv_timings() - get dv_preset which is set on external subdev
> + * vpfe_g_dv_timings() - get dv_timings which is set on external subdev
>   * @file: file pointer
>   * @priv: void pointer
>   * @timings: pointer to v4l2_dv_timings structure
>   *
> - * get dv_preset which is set on external subdev through
> + * get dv_timings which is set on external subdev through
>   * v4l2_subdev_call
>   *
>   * Return 0 on success, error code otherwise
> @@ -1423,7 +1423,7 @@ static int vpfe_dqbuf(struct file *file, void *priv,
>  }
>
>  /*
> - * vpfe_streamon() - get dv_preset which is set on external subdev
> + * vpfe_streamon() - start streaming
>   * @file: file pointer
>   * @priv: void pointer
>   * @buf_type: enum v4l2_buf_type
> @@ -1472,7 +1472,7 @@ static int vpfe_streamon(struct file *file, void *priv,
>  }
>
>  /*
> - * vpfe_streamoff() - get dv_preset which is set on external subdev
> + * vpfe_streamoff() - stop streaming
>   * @file: file pointer
>   * @priv: void pointer
>   * @buf_type: enum v4l2_buf_type
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
  2013-02-16  9:28   ` [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS Hans Verkuil
@ 2013-02-16 12:50       ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 12:50 UTC (permalink / raw)
  To: Hans Verkuil, Sekhar Nori
  Cc: linux-media, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil, dlos, LAK

Cc'ed  Sekhar, DLOS, LAK.

Sekhar Can you Ack this patch for platform changes ?

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> Remove VPBE_ENC_DV_PRESET (the DV_PRESET API is no longer supported) and
> VPBE_ENC_CUSTOM_TIMINGS is renamed to VPBE_ENC_DV_TIMINGS since the old
> "CUSTOM_TIMINGS" name is deprecated in favor of "DV_TIMINGS".
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  arch/arm/mach-davinci/board-dm644x-evm.c      |    4 ++--
>  arch/arm/mach-davinci/dm644x.c                |    2 +-
>  drivers/media/platform/davinci/vpbe.c         |    8 ++++----
>  drivers/media/platform/davinci/vpbe_display.c |    2 +-
>  drivers/media/platform/davinci/vpbe_venc.c    |    8 ++++----
>  include/media/davinci/vpbe_types.h            |    3 +--
>  6 files changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
> index 8e1b4ff..e8dc70b 100644
> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> @@ -649,7 +649,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = {
>  static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
>         {
>                 .name           = "480p59_94",
> -               .timings_type   = VPBE_ENC_CUSTOM_TIMINGS,
> +               .timings_type   = VPBE_ENC_DV_TIMINGS,
>                 .dv_timings     = V4L2_DV_BT_CEA_720X480P59_94,
>                 .interlaced     = 0,
>                 .xres           = 720,
> @@ -661,7 +661,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
>         },
>         {
>                 .name           = "576p50",
> -               .timings_type   = VPBE_ENC_CUSTOM_TIMINGS,
> +               .timings_type   = VPBE_ENC_DV_TIMINGS,
>                 .dv_timings     = V4L2_DV_BT_CEA_720X576P50,
>                 .interlaced     = 0,
>                 .xres           = 720,
> diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
> index db1dd92..ee0e994 100644
> --- a/arch/arm/mach-davinci/dm644x.c
> +++ b/arch/arm/mach-davinci/dm644x.c
> @@ -706,7 +706,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
>                 v |= DM644X_VPSS_DACCLKEN;
>                 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
>                 break;
> -       case VPBE_ENC_CUSTOM_TIMINGS:
> +       case VPBE_ENC_DV_TIMINGS:
>                 if (pclock <= 27000000) {
>                         v |= DM644X_VPSS_DACCLKEN;
>                         writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
> index 4ca0f9a..2a49f00 100644
> --- a/drivers/media/platform/davinci/vpbe.c
> +++ b/drivers/media/platform/davinci/vpbe.c
> @@ -344,7 +344,7 @@ static int vpbe_s_dv_timings(struct vpbe_device *vpbe_dev,
>                 return -EINVAL;
>
>         for (i = 0; i < output->num_modes; i++) {
> -               if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS &&
> +               if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS &&
>                     !memcmp(&output->modes[i].dv_timings,
>                                 dv_timings, sizeof(*dv_timings)))
>                         break;
> @@ -385,7 +385,7 @@ static int vpbe_g_dv_timings(struct vpbe_device *vpbe_dev,
>                      struct v4l2_dv_timings *dv_timings)
>  {
>         if (vpbe_dev->current_timings.timings_type &
> -         VPBE_ENC_CUSTOM_TIMINGS) {
> +         VPBE_ENC_DV_TIMINGS) {
>                 *dv_timings = vpbe_dev->current_timings.dv_timings;
>                 return 0;
>         }
> @@ -412,7 +412,7 @@ static int vpbe_enum_dv_timings(struct vpbe_device *vpbe_dev,
>                 return -EINVAL;
>
>         for (i = 0; i < output->num_modes; i++) {
> -               if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS) {
> +               if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS) {
>                         if (j == timings->index)
>                                 break;
>                         j++;
> @@ -515,7 +515,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev,
>                                 return vpbe_s_std(vpbe_dev,
>                                                  &preset_mode->std_id);
>                         if (preset_mode->timings_type &
> -                                               VPBE_ENC_CUSTOM_TIMINGS) {
> +                                               VPBE_ENC_DV_TIMINGS) {
>                                 dv_timings =
>                                         preset_mode->dv_timings;
>                                 return vpbe_s_dv_timings(vpbe_dev, &dv_timings);
> diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
> index 5e6b0ca..1f59955 100644
> --- a/drivers/media/platform/davinci/vpbe_display.c
> +++ b/drivers/media/platform/davinci/vpbe_display.c
> @@ -1202,7 +1202,7 @@ vpbe_display_g_dv_timings(struct file *file, void *priv,
>         /* Get the given standard in the encoder */
>
>         if (vpbe_dev->current_timings.timings_type &
> -                               VPBE_ENC_CUSTOM_TIMINGS) {
> +                               VPBE_ENC_DV_TIMINGS) {
>                 *dv_timings = vpbe_dev->current_timings.dv_timings;
>         } else {
>                 return -EINVAL;
> diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c
> index bdbebd5..9546d26 100644
> --- a/drivers/media/platform/davinci/vpbe_venc.c
> +++ b/drivers/media/platform/davinci/vpbe_venc.c
> @@ -313,7 +313,7 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd)
>                 return -EINVAL;
>
>         /* Setup clock at VPSS & VENC for SD */
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> @@ -360,7 +360,7 @@ static int venc_set_576p50(struct v4l2_subdev *sd)
>             venc->venc_type != VPBE_VERSION_2)
>                 return -EINVAL;
>         /* Setup clock at VPSS & VENC for SD */
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> @@ -400,7 +400,7 @@ static int venc_set_720p60_internal(struct v4l2_subdev *sd)
>         struct venc_state *venc = to_state(sd);
>         struct venc_platform_data *pdata = venc->pdata;
>
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> @@ -428,7 +428,7 @@ static int venc_set_1080i30_internal(struct v4l2_subdev *sd)
>         struct venc_state *venc = to_state(sd);
>         struct venc_platform_data *pdata = venc->pdata;
>
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> diff --git a/include/media/davinci/vpbe_types.h b/include/media/davinci/vpbe_types.h
> index 9b85396..05dbe0b 100644
> --- a/include/media/davinci/vpbe_types.h
> +++ b/include/media/davinci/vpbe_types.h
> @@ -26,8 +26,7 @@ enum vpbe_version {
>  /* vpbe_timing_type - Timing types used in vpbe device */
>  enum vpbe_enc_timings_type {
>         VPBE_ENC_STD = 0x1,
> -       VPBE_ENC_DV_PRESET = 0x2,
> -       VPBE_ENC_CUSTOM_TIMINGS = 0x4,
> +       VPBE_ENC_DV_TIMINGS = 0x4,
>         /* Used when set timings through FB device interface */
>         VPBE_ENC_TIMINGS_INVALID = 0x8,
>  };
> --
> 1.7.10.4
>

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

* [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
@ 2013-02-16 12:50       ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 12:50 UTC (permalink / raw)
  To: linux-arm-kernel

Cc'ed  Sekhar, DLOS, LAK.

Sekhar Can you Ack this patch for platform changes ?

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> Remove VPBE_ENC_DV_PRESET (the DV_PRESET API is no longer supported) and
> VPBE_ENC_CUSTOM_TIMINGS is renamed to VPBE_ENC_DV_TIMINGS since the old
> "CUSTOM_TIMINGS" name is deprecated in favor of "DV_TIMINGS".
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  arch/arm/mach-davinci/board-dm644x-evm.c      |    4 ++--
>  arch/arm/mach-davinci/dm644x.c                |    2 +-
>  drivers/media/platform/davinci/vpbe.c         |    8 ++++----
>  drivers/media/platform/davinci/vpbe_display.c |    2 +-
>  drivers/media/platform/davinci/vpbe_venc.c    |    8 ++++----
>  include/media/davinci/vpbe_types.h            |    3 +--
>  6 files changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c
> index 8e1b4ff..e8dc70b 100644
> --- a/arch/arm/mach-davinci/board-dm644x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm644x-evm.c
> @@ -649,7 +649,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_std_timing[] = {
>  static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
>         {
>                 .name           = "480p59_94",
> -               .timings_type   = VPBE_ENC_CUSTOM_TIMINGS,
> +               .timings_type   = VPBE_ENC_DV_TIMINGS,
>                 .dv_timings     = V4L2_DV_BT_CEA_720X480P59_94,
>                 .interlaced     = 0,
>                 .xres           = 720,
> @@ -661,7 +661,7 @@ static struct vpbe_enc_mode_info dm644xevm_enc_preset_timing[] = {
>         },
>         {
>                 .name           = "576p50",
> -               .timings_type   = VPBE_ENC_CUSTOM_TIMINGS,
> +               .timings_type   = VPBE_ENC_DV_TIMINGS,
>                 .dv_timings     = V4L2_DV_BT_CEA_720X576P50,
>                 .interlaced     = 0,
>                 .xres           = 720,
> diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
> index db1dd92..ee0e994 100644
> --- a/arch/arm/mach-davinci/dm644x.c
> +++ b/arch/arm/mach-davinci/dm644x.c
> @@ -706,7 +706,7 @@ static int dm644x_venc_setup_clock(enum vpbe_enc_timings_type type,
>                 v |= DM644X_VPSS_DACCLKEN;
>                 writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
>                 break;
> -       case VPBE_ENC_CUSTOM_TIMINGS:
> +       case VPBE_ENC_DV_TIMINGS:
>                 if (pclock <= 27000000) {
>                         v |= DM644X_VPSS_DACCLKEN;
>                         writel(v, DAVINCI_SYSMOD_VIRT(SYSMOD_VPSS_CLKCTL));
> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
> index 4ca0f9a..2a49f00 100644
> --- a/drivers/media/platform/davinci/vpbe.c
> +++ b/drivers/media/platform/davinci/vpbe.c
> @@ -344,7 +344,7 @@ static int vpbe_s_dv_timings(struct vpbe_device *vpbe_dev,
>                 return -EINVAL;
>
>         for (i = 0; i < output->num_modes; i++) {
> -               if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS &&
> +               if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS &&
>                     !memcmp(&output->modes[i].dv_timings,
>                                 dv_timings, sizeof(*dv_timings)))
>                         break;
> @@ -385,7 +385,7 @@ static int vpbe_g_dv_timings(struct vpbe_device *vpbe_dev,
>                      struct v4l2_dv_timings *dv_timings)
>  {
>         if (vpbe_dev->current_timings.timings_type &
> -         VPBE_ENC_CUSTOM_TIMINGS) {
> +         VPBE_ENC_DV_TIMINGS) {
>                 *dv_timings = vpbe_dev->current_timings.dv_timings;
>                 return 0;
>         }
> @@ -412,7 +412,7 @@ static int vpbe_enum_dv_timings(struct vpbe_device *vpbe_dev,
>                 return -EINVAL;
>
>         for (i = 0; i < output->num_modes; i++) {
> -               if (output->modes[i].timings_type == VPBE_ENC_CUSTOM_TIMINGS) {
> +               if (output->modes[i].timings_type == VPBE_ENC_DV_TIMINGS) {
>                         if (j == timings->index)
>                                 break;
>                         j++;
> @@ -515,7 +515,7 @@ static int vpbe_set_mode(struct vpbe_device *vpbe_dev,
>                                 return vpbe_s_std(vpbe_dev,
>                                                  &preset_mode->std_id);
>                         if (preset_mode->timings_type &
> -                                               VPBE_ENC_CUSTOM_TIMINGS) {
> +                                               VPBE_ENC_DV_TIMINGS) {
>                                 dv_timings =
>                                         preset_mode->dv_timings;
>                                 return vpbe_s_dv_timings(vpbe_dev, &dv_timings);
> diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
> index 5e6b0ca..1f59955 100644
> --- a/drivers/media/platform/davinci/vpbe_display.c
> +++ b/drivers/media/platform/davinci/vpbe_display.c
> @@ -1202,7 +1202,7 @@ vpbe_display_g_dv_timings(struct file *file, void *priv,
>         /* Get the given standard in the encoder */
>
>         if (vpbe_dev->current_timings.timings_type &
> -                               VPBE_ENC_CUSTOM_TIMINGS) {
> +                               VPBE_ENC_DV_TIMINGS) {
>                 *dv_timings = vpbe_dev->current_timings.dv_timings;
>         } else {
>                 return -EINVAL;
> diff --git a/drivers/media/platform/davinci/vpbe_venc.c b/drivers/media/platform/davinci/vpbe_venc.c
> index bdbebd5..9546d26 100644
> --- a/drivers/media/platform/davinci/vpbe_venc.c
> +++ b/drivers/media/platform/davinci/vpbe_venc.c
> @@ -313,7 +313,7 @@ static int venc_set_480p59_94(struct v4l2_subdev *sd)
>                 return -EINVAL;
>
>         /* Setup clock at VPSS & VENC for SD */
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> @@ -360,7 +360,7 @@ static int venc_set_576p50(struct v4l2_subdev *sd)
>             venc->venc_type != VPBE_VERSION_2)
>                 return -EINVAL;
>         /* Setup clock at VPSS & VENC for SD */
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 27000000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 27000000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> @@ -400,7 +400,7 @@ static int venc_set_720p60_internal(struct v4l2_subdev *sd)
>         struct venc_state *venc = to_state(sd);
>         struct venc_platform_data *pdata = venc->pdata;
>
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> @@ -428,7 +428,7 @@ static int venc_set_1080i30_internal(struct v4l2_subdev *sd)
>         struct venc_state *venc = to_state(sd);
>         struct venc_platform_data *pdata = venc->pdata;
>
> -       if (pdata->setup_clock(VPBE_ENC_CUSTOM_TIMINGS, 74250000) < 0)
> +       if (pdata->setup_clock(VPBE_ENC_DV_TIMINGS, 74250000) < 0)
>                 return -EINVAL;
>
>         venc_enabledigitaloutput(sd, 0);
> diff --git a/include/media/davinci/vpbe_types.h b/include/media/davinci/vpbe_types.h
> index 9b85396..05dbe0b 100644
> --- a/include/media/davinci/vpbe_types.h
> +++ b/include/media/davinci/vpbe_types.h
> @@ -26,8 +26,7 @@ enum vpbe_version {
>  /* vpbe_timing_type - Timing types used in vpbe device */
>  enum vpbe_enc_timings_type {
>         VPBE_ENC_STD = 0x1,
> -       VPBE_ENC_DV_PRESET = 0x2,
> -       VPBE_ENC_CUSTOM_TIMINGS = 0x4,
> +       VPBE_ENC_DV_TIMINGS = 0x4,
>         /* Used when set timings through FB device interface */
>         VPBE_ENC_TIMINGS_INVALID = 0x8,
>  };
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
  2013-02-16  9:28   ` [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS Hans Verkuil
@ 2013-02-16 12:58       ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 12:58 UTC (permalink / raw)
  To: Hans Verkuil, Sekhar Nori
  Cc: linux-media, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil, dlos, LAK

Cc'ed Sekhar, DLOS, LAK.

Sekhar Can you Ack this patch ? Or maybe you can take this patch through
your tree ?

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> The use of V4L2_OUT_CAP_CUSTOM_TIMINGS is deprecated, use DV_TIMINGS instead.
> Note that V4L2_OUT_CAP_CUSTOM_TIMINGS is just a #define for
> V4L2_OUT_CAP_DV_TIMINGS.
>
> At some point in the future these CUSTOM_TIMINGS defines might be removed.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  arch/arm/mach-davinci/board-dm646x-evm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
> index 6e2f163..43f35d6 100644
> --- a/arch/arm/mach-davinci/board-dm646x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm646x-evm.c
> @@ -514,7 +514,7 @@ static const struct vpif_output dm6467_ch0_outputs[] = {
>                         .index = 1,
>                         .name = "Component",
>                         .type = V4L2_OUTPUT_TYPE_ANALOG,
> -                       .capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS,
> +                       .capabilities = V4L2_OUT_CAP_DV_TIMINGS,
>                 },
>                 .subdev_name = "adv7343",
>                 .output_route = ADV7343_COMPONENT_ID,
> --
> 1.7.10.4
>

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

* [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
@ 2013-02-16 12:58       ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 12:58 UTC (permalink / raw)
  To: linux-arm-kernel

Cc'ed Sekhar, DLOS, LAK.

Sekhar Can you Ack this patch ? Or maybe you can take this patch through
your tree ?

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> The use of V4L2_OUT_CAP_CUSTOM_TIMINGS is deprecated, use DV_TIMINGS instead.
> Note that V4L2_OUT_CAP_CUSTOM_TIMINGS is just a #define for
> V4L2_OUT_CAP_DV_TIMINGS.
>
> At some point in the future these CUSTOM_TIMINGS defines might be removed.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  arch/arm/mach-davinci/board-dm646x-evm.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-davinci/board-dm646x-evm.c b/arch/arm/mach-davinci/board-dm646x-evm.c
> index 6e2f163..43f35d6 100644
> --- a/arch/arm/mach-davinci/board-dm646x-evm.c
> +++ b/arch/arm/mach-davinci/board-dm646x-evm.c
> @@ -514,7 +514,7 @@ static const struct vpif_output dm6467_ch0_outputs[] = {
>                         .index = 1,
>                         .name = "Component",
>                         .type = V4L2_OUTPUT_TYPE_ANALOG,
> -                       .capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS,
> +                       .capabilities = V4L2_OUT_CAP_DV_TIMINGS,
>                 },
>                 .subdev_name = "adv7343",
>                 .output_route = ADV7343_COMPONENT_ID,
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables.
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
                     ` (16 preceding siblings ...)
  2013-02-16  9:28   ` [RFC PATCH 18/18] videodev2.h: remove obsolete DV_PRESET API Hans Verkuil
@ 2013-02-16 13:12   ` Prabhakar Lad
  17 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 13:12 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

Hi Hans,

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> This is the first step towards removing the deprecated preset support of this
> driver.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  drivers/media/i2c/tvp7002.c |   90 +++++++++++++++++++++----------------------
>  1 file changed, 45 insertions(+), 45 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
> index 537f6b4..7995eeb 100644
> --- a/drivers/media/i2c/tvp7002.c
> +++ b/drivers/media/i2c/tvp7002.c
> @@ -326,8 +326,8 @@ static const struct i2c_reg_value tvp7002_parms_720P50[] = {
>         { TVP7002_EOR, 0xff, TVP7002_RESERVED }
>  };
>
> -/* Preset definition for handling device operation */
> -struct tvp7002_preset_definition {
> +/* Timings definition for handling device operation */
> +struct tvp7002_timings_definition {
>         u32 preset;
>         struct v4l2_dv_timings timings;
>         const struct i2c_reg_value *p_settings;
> @@ -339,8 +339,8 @@ struct tvp7002_preset_definition {
>         u16 cpl_max;
>  };
>
> -/* Struct list for digital video presets */
> -static const struct tvp7002_preset_definition tvp7002_presets[] = {
> +/* Struct list for digital video timings */
> +static const struct tvp7002_timings_definition tvp7002_timings[] = {
>         {
>                 V4L2_DV_720P60,
>                 V4L2_DV_BT_CEA_1280X720P60,
> @@ -420,7 +420,7 @@ static const struct tvp7002_preset_definition tvp7002_presets[] = {
>         }
>  };
>
> -#define NUM_PRESETS    ARRAY_SIZE(tvp7002_presets)
> +#define NUM_TIMINGS ARRAY_SIZE(tvp7002_timings)
>
>  /* Device definition */
>  struct tvp7002 {
> @@ -431,7 +431,7 @@ struct tvp7002 {
>         int ver;
>         int streaming;
>
> -       const struct tvp7002_preset_definition *current_preset;
> +       const struct tvp7002_timings_definition *current_timings;
>  };
>
>  /*
> @@ -603,11 +603,11 @@ static int tvp7002_s_dv_preset(struct v4l2_subdev *sd,
>         u32 preset;
>         int i;
>
> -       for (i = 0; i < NUM_PRESETS; i++) {
> -               preset = tvp7002_presets[i].preset;
> +       for (i = 0; i < NUM_TIMINGS; i++) {
> +               preset = tvp7002_timings[i].preset;
>                 if (preset == dv_preset->preset) {
> -                       device->current_preset = &tvp7002_presets[i];
> -                       return tvp7002_write_inittab(sd, tvp7002_presets[i].p_settings);
> +                       device->current_timings = &tvp7002_timings[i];
> +                       return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
>                 }
>         }
>
> @@ -623,12 +623,12 @@ static int tvp7002_s_dv_timings(struct v4l2_subdev *sd,
>
>         if (dv_timings->type != V4L2_DV_BT_656_1120)
>                 return -EINVAL;
> -       for (i = 0; i < NUM_PRESETS; i++) {
> -               const struct v4l2_bt_timings *t = &tvp7002_presets[i].timings.bt;
> +       for (i = 0; i < NUM_TIMINGS; i++) {
> +               const struct v4l2_bt_timings *t = &tvp7002_timings[i].timings.bt;
>
>                 if (!memcmp(bt, t, &bt->standards - &bt->width)) {
> -                       device->current_preset = &tvp7002_presets[i];
> -                       return tvp7002_write_inittab(sd, tvp7002_presets[i].p_settings);
> +                       device->current_timings = &tvp7002_timings[i];
> +                       return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
>                 }
>         }
>         return -EINVAL;
> @@ -639,7 +639,7 @@ static int tvp7002_g_dv_timings(struct v4l2_subdev *sd,
>  {
>         struct tvp7002 *device = to_tvp7002(sd);
>
> -       *dv_timings = device->current_preset->timings;
> +       *dv_timings = device->current_timings->timings;
>         return 0;
>  }
>
> @@ -681,15 +681,15 @@ static int tvp7002_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f
>         int error;
>
>         /* Calculate height and width based on current standard */
> -       error = v4l_fill_dv_preset_info(device->current_preset->preset, &e_preset);
> +       error = v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset);
>         if (error)
>                 return error;
>
>         f->width = e_preset.width;
>         f->height = e_preset.height;
>         f->code = V4L2_MBUS_FMT_YUYV10_1X20;
> -       f->field = device->current_preset->scanmode;
> -       f->colorspace = device->current_preset->color_space;
> +       f->field = device->current_timings->scanmode;
> +       f->colorspace = device->current_timings->color_space;
>
>         v4l2_dbg(1, debug, sd, "MBUS_FMT: Width - %d, Height - %d",
>                         f->width, f->height);
> @@ -697,16 +697,16 @@ static int tvp7002_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f
>  }
>
>  /*
> - * tvp7002_query_dv_preset() - query DV preset
> + * tvp7002_query_dv() - query DV timings
>   * @sd: pointer to standard V4L2 sub-device structure
> - * @qpreset: standard V4L2 v4l2_dv_preset structure
> + * @index: index into the tvp7002_timings array
>   *
> - * Returns the current DV preset by TVP7002. If no active input is
> + * Returns the current DV timings detected by TVP7002. If no active input is
>   * detected, returns -EINVAL
>   */
>  static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
>  {
> -       const struct tvp7002_preset_definition *presets = tvp7002_presets;
> +       const struct tvp7002_timings_definition *timings = tvp7002_timings;
>         u8 progressive;
>         u32 lpfr;
>         u32 cpln;
> @@ -717,7 +717,7 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
>         u8 cpl_msb;
>
>         /* Return invalid index if no active input is detected */
> -       *index = NUM_PRESETS;
> +       *index = NUM_TIMINGS;
>
>         /* Read standards from device registers */
>         tvp7002_read_err(sd, TVP7002_L_FRAME_STAT_LSBS, &lpf_lsb, &error);
> @@ -738,23 +738,23 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
>         progressive = (lpf_msb & TVP7002_INPR_MASK) >> TVP7002_IP_SHIFT;
>
>         /* Do checking of video modes */
> -       for (*index = 0; *index < NUM_PRESETS; (*index)++, presets++)
> -               if (lpfr == presets->lines_per_frame &&
> -                       progressive == presets->progressive) {
> -                       if (presets->cpl_min == 0xffff)
> +       for (*index = 0; *index < NUM_TIMINGS; (*index)++, timings++)
> +               if (lpfr == timings->lines_per_frame &&
> +                       progressive == timings->progressive) {
> +                       if (timings->cpl_min == 0xffff)
>                                 break;
> -                       if (cpln >= presets->cpl_min && cpln <= presets->cpl_max)
> +                       if (cpln >= timings->cpl_min && cpln <= timings->cpl_max)
>                                 break;
>                 }
>
> -       if (*index == NUM_PRESETS) {
> +       if (*index == NUM_TIMINGS) {
>                 v4l2_dbg(1, debug, sd, "detection failed: lpf = %x, cpl = %x\n",
>                                                                 lpfr, cpln);
>                 return -ENOLINK;
>         }
>
>         /* Update lines per frame and clocks per line info */
> -       v4l2_dbg(1, debug, sd, "detected preset: %d\n", *index);
> +       v4l2_dbg(1, debug, sd, "detected timings: %d\n", *index);
>         return 0;
>  }
>
> @@ -764,13 +764,13 @@ static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
>         int index;
>         int err = tvp7002_query_dv(sd, &index);
>
> -       if (err || index == NUM_PRESETS) {
> +       if (err || index == NUM_TIMINGS) {
>                 qpreset->preset = V4L2_DV_INVALID;
>                 if (err == -ENOLINK)
>                         err = 0;
>                 return err;
>         }
> -       qpreset->preset = tvp7002_presets[index].preset;
> +       qpreset->preset = tvp7002_timings[index].preset;
>         return 0;
>  }
>
> @@ -782,7 +782,7 @@ static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
>
>         if (err)
>                 return err;
> -       *timings = tvp7002_presets[index].timings;
> +       *timings = tvp7002_timings[index].timings;
>         return 0;
>  }
>
> @@ -896,7 +896,7 @@ static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable)
>   */
>  static int tvp7002_log_status(struct v4l2_subdev *sd)
>  {
> -       const struct tvp7002_preset_definition *presets = tvp7002_presets;
> +       const struct tvp7002_timings_definition *timings = tvp7002_timings;
>         struct tvp7002 *device = to_tvp7002(sd);
>         struct v4l2_dv_enum_preset e_preset;
>         struct v4l2_dv_preset detected;
> @@ -907,20 +907,20 @@ static int tvp7002_log_status(struct v4l2_subdev *sd)
>         tvp7002_query_dv_preset(sd, &detected);
>
>         /* Print standard related code values */
> -       for (i = 0; i < NUM_PRESETS; i++, presets++)
> -               if (presets->preset == detected.preset)
> +       for (i = 0; i < NUM_TIMINGS; i++, timings++)
> +               if (timings->preset == detected.preset)
>                         break;
>
> -       if (v4l_fill_dv_preset_info(device->current_preset->preset, &e_preset))
> +       if (v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset))
>                 return -EINVAL;
>
>         v4l2_info(sd, "Selected DV Preset: %s\n", e_preset.name);
>         v4l2_info(sd, "   Pixels per line: %u\n", e_preset.width);
>         v4l2_info(sd, "   Lines per frame: %u\n\n", e_preset.height);
> -       if (i == NUM_PRESETS) {
> +       if (i == NUM_TIMINGS) {
>                 v4l2_info(sd, "Detected DV Preset: None\n");
>         } else {
> -               if (v4l_fill_dv_preset_info(presets->preset, &e_preset))
> +               if (v4l_fill_dv_preset_info(timings->preset, &e_preset))
>                         return -EINVAL;
>                 v4l2_info(sd, "Detected DV Preset: %s\n", e_preset.name);
>                 v4l2_info(sd, "  Pixels per line: %u\n", e_preset.width);
> @@ -946,20 +946,20 @@ static int tvp7002_enum_dv_presets(struct v4l2_subdev *sd,
>                 struct v4l2_dv_enum_preset *preset)
>  {
>         /* Check requested format index is within range */
> -       if (preset->index >= NUM_PRESETS)
> +       if (preset->index >= NUM_TIMINGS)
>                 return -EINVAL;
>
> -       return v4l_fill_dv_preset_info(tvp7002_presets[preset->index].preset, preset);
> +       return v4l_fill_dv_preset_info(tvp7002_timings[preset->index].preset, preset);
>  }
>
>  static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
>                 struct v4l2_enum_dv_timings *timings)
>  {
>         /* Check requested format index is within range */
> -       if (timings->index >= NUM_PRESETS)
> +       if (timings->index >= NUM_TIMINGS)
>                 return -EINVAL;
>
> -       timings->timings = tvp7002_presets[timings->index].timings;
> +       timings->timings = tvp7002_timings[timings->index].timings;
>         return 0;
>  }
>
> @@ -1043,7 +1043,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
>
>         sd = &device->sd;
>         device->pdata = c->dev.platform_data;
> -       device->current_preset = tvp7002_presets;
> +       device->current_timings = tvp7002_timings;
>
>         /* Tell v4l2 the device is ready */
>         v4l2_i2c_subdev_init(sd, c, &tvp7002_ops);
> @@ -1080,7 +1080,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
>                 return error;
>
>         /* Set registers according to default video mode */
> -       preset.preset = device->current_preset->preset;
> +       preset.preset = device->current_timings->preset;
>         error = tvp7002_s_dv_preset(sd, &preset);
>
>         v4l2_ctrl_handler_init(&device->hdl, 1);
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets.
  2013-02-16  9:28   ` [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets Hans Verkuil
@ 2013-02-16 13:12     ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 13:12 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

Hi Hans,

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> In the functions tvp7002_mbus_fmt(), tvp7002_log_status and tvp7002_probe()
> we should use the dv_timings data structures instead of dv_preset data
> structures and functions.
>
> This is the second step towards removing the deprecated preset support of this
> driver.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  drivers/media/i2c/tvp7002.c |   54 ++++++++++++++-----------------------------
>  1 file changed, 17 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
> index 7995eeb..d7a08bc 100644
> --- a/drivers/media/i2c/tvp7002.c
> +++ b/drivers/media/i2c/tvp7002.c
> @@ -677,16 +677,10 @@ static int tvp7002_s_ctrl(struct v4l2_ctrl *ctrl)
>  static int tvp7002_mbus_fmt(struct v4l2_subdev *sd, struct v4l2_mbus_framefmt *f)
>  {
>         struct tvp7002 *device = to_tvp7002(sd);
> -       struct v4l2_dv_enum_preset e_preset;
> -       int error;
> -
> -       /* Calculate height and width based on current standard */
> -       error = v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset);
> -       if (error)
> -               return error;
> +       const struct v4l2_bt_timings *bt = &device->current_timings->timings.bt;
>
> -       f->width = e_preset.width;
> -       f->height = e_preset.height;
> +       f->width = bt->width;
> +       f->height = bt->height;
>         f->code = V4L2_MBUS_FMT_YUYV10_1X20;
>         f->field = device->current_timings->scanmode;
>         f->colorspace = device->current_timings->color_space;
> @@ -896,35 +890,21 @@ static int tvp7002_s_stream(struct v4l2_subdev *sd, int enable)
>   */
>  static int tvp7002_log_status(struct v4l2_subdev *sd)
>  {
> -       const struct tvp7002_timings_definition *timings = tvp7002_timings;
>         struct tvp7002 *device = to_tvp7002(sd);
> -       struct v4l2_dv_enum_preset e_preset;
> -       struct v4l2_dv_preset detected;
> -       int i;
> +       const struct v4l2_bt_timings *bt;
> +       int detected;
>
> -       detected.preset = V4L2_DV_INVALID;
> -       /* Find my current standard*/
> -       tvp7002_query_dv_preset(sd, &detected);
> +       /* Find my current timings */
> +       tvp7002_query_dv(sd, &detected);
>
> -       /* Print standard related code values */
> -       for (i = 0; i < NUM_TIMINGS; i++, timings++)
> -               if (timings->preset == detected.preset)
> -                       break;
> -
> -       if (v4l_fill_dv_preset_info(device->current_timings->preset, &e_preset))
> -               return -EINVAL;
> -
> -       v4l2_info(sd, "Selected DV Preset: %s\n", e_preset.name);
> -       v4l2_info(sd, "   Pixels per line: %u\n", e_preset.width);
> -       v4l2_info(sd, "   Lines per frame: %u\n\n", e_preset.height);
> -       if (i == NUM_TIMINGS) {
> -               v4l2_info(sd, "Detected DV Preset: None\n");
> +       bt = &device->current_timings->timings.bt;
> +       v4l2_info(sd, "Selected DV Timings: %ux%u\n", bt->width, bt->height);
> +       if (detected == NUM_TIMINGS) {
> +               v4l2_info(sd, "Detected DV Timings: None\n");
>         } else {
> -               if (v4l_fill_dv_preset_info(timings->preset, &e_preset))
> -                       return -EINVAL;
> -               v4l2_info(sd, "Detected DV Preset: %s\n", e_preset.name);
> -               v4l2_info(sd, "  Pixels per line: %u\n", e_preset.width);
> -               v4l2_info(sd, "  Lines per frame: %u\n\n", e_preset.height);
> +               bt = &tvp7002_timings[detected].timings.bt;
> +               v4l2_info(sd, "Detected DV Timings: %ux%u\n",
> +                               bt->width, bt->height);
>         }
>         v4l2_info(sd, "Streaming enabled: %s\n",
>                                         device->streaming ? "yes" : "no");
> @@ -1019,7 +999,7 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
>  {
>         struct v4l2_subdev *sd;
>         struct tvp7002 *device;
> -       struct v4l2_dv_preset preset;
> +       struct v4l2_dv_timings timings;
>         int polarity_a;
>         int polarity_b;
>         u8 revision;
> @@ -1080,8 +1060,8 @@ static int tvp7002_probe(struct i2c_client *c, const struct i2c_device_id *id)
>                 return error;
>
>         /* Set registers according to default video mode */
> -       preset.preset = device->current_timings->preset;
> -       error = tvp7002_s_dv_preset(sd, &preset);
> +       timings = device->current_timings->timings;
> +       error = tvp7002_s_dv_timings(sd, &timings);
>
>         v4l2_ctrl_handler_init(&device->hdl, 1);
>         v4l2_ctrl_new_std(&device->hdl, &tvp7002_ctrl_ops,
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 03/18] tvp7002: remove dv_preset support.
  2013-02-16  9:28   ` [RFC PATCH 03/18] tvp7002: remove dv_preset support Hans Verkuil
@ 2013-02-16 13:13     ` Prabhakar Lad
  0 siblings, 0 replies; 42+ messages in thread
From: Prabhakar Lad @ 2013-02-16 13:13 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Tomasz Stanislawski, Kyungmin Park, Scott Jiang,
	Hans Verkuil

Hi Hans,

On Sat, Feb 16, 2013 at 2:58 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> Finally remove the dv_preset support from this driver. Note that dv_preset
> support was already removed from any bridge drivers that use this i2c
> driver, so the dv_preset ops were no longer called and can be removed
> safely.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Prabhakar Lad <prabhakar.csengg@gmail.com>

Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com>

Regards,
--Prabhakar

> ---
>  drivers/media/i2c/tvp7002.c |   70 -------------------------------------------
>  1 file changed, 70 deletions(-)
>
> diff --git a/drivers/media/i2c/tvp7002.c b/drivers/media/i2c/tvp7002.c
> index d7a08bc..7406de9 100644
> --- a/drivers/media/i2c/tvp7002.c
> +++ b/drivers/media/i2c/tvp7002.c
> @@ -328,7 +328,6 @@ static const struct i2c_reg_value tvp7002_parms_720P50[] = {
>
>  /* Timings definition for handling device operation */
>  struct tvp7002_timings_definition {
> -       u32 preset;
>         struct v4l2_dv_timings timings;
>         const struct i2c_reg_value *p_settings;
>         enum v4l2_colorspace color_space;
> @@ -342,7 +341,6 @@ struct tvp7002_timings_definition {
>  /* Struct list for digital video timings */
>  static const struct tvp7002_timings_definition tvp7002_timings[] = {
>         {
> -               V4L2_DV_720P60,
>                 V4L2_DV_BT_CEA_1280X720P60,
>                 tvp7002_parms_720P60,
>                 V4L2_COLORSPACE_REC709,
> @@ -353,7 +351,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
>                 153
>         },
>         {
> -               V4L2_DV_1080I60,
>                 V4L2_DV_BT_CEA_1920X1080I60,
>                 tvp7002_parms_1080I60,
>                 V4L2_COLORSPACE_REC709,
> @@ -364,7 +361,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
>                 205
>         },
>         {
> -               V4L2_DV_1080I50,
>                 V4L2_DV_BT_CEA_1920X1080I50,
>                 tvp7002_parms_1080I50,
>                 V4L2_COLORSPACE_REC709,
> @@ -375,7 +371,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
>                 245
>         },
>         {
> -               V4L2_DV_720P50,
>                 V4L2_DV_BT_CEA_1280X720P50,
>                 tvp7002_parms_720P50,
>                 V4L2_COLORSPACE_REC709,
> @@ -386,7 +381,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
>                 183
>         },
>         {
> -               V4L2_DV_1080P60,
>                 V4L2_DV_BT_CEA_1920X1080P60,
>                 tvp7002_parms_1080P60,
>                 V4L2_COLORSPACE_REC709,
> @@ -397,7 +391,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
>                 102
>         },
>         {
> -               V4L2_DV_480P59_94,
>                 V4L2_DV_BT_CEA_720X480P59_94,
>                 tvp7002_parms_480P,
>                 V4L2_COLORSPACE_SMPTE170M,
> @@ -408,7 +401,6 @@ static const struct tvp7002_timings_definition tvp7002_timings[] = {
>                 0xffff
>         },
>         {
> -               V4L2_DV_576P50,
>                 V4L2_DV_BT_CEA_720X576P50,
>                 tvp7002_parms_576P,
>                 V4L2_COLORSPACE_SMPTE170M,
> @@ -588,32 +580,6 @@ static int tvp7002_write_inittab(struct v4l2_subdev *sd,
>         return error;
>  }
>
> -/*
> - * tvp7002_s_dv_preset() - Set digital video preset
> - * @sd: ptr to v4l2_subdev struct
> - * @dv_preset: ptr to v4l2_dv_preset struct
> - *
> - * Set the digital video preset for a TVP7002 decoder device.
> - * Returns zero when successful or -EINVAL if register access fails.
> - */
> -static int tvp7002_s_dv_preset(struct v4l2_subdev *sd,
> -                                       struct v4l2_dv_preset *dv_preset)
> -{
> -       struct tvp7002 *device = to_tvp7002(sd);
> -       u32 preset;
> -       int i;
> -
> -       for (i = 0; i < NUM_TIMINGS; i++) {
> -               preset = tvp7002_timings[i].preset;
> -               if (preset == dv_preset->preset) {
> -                       device->current_timings = &tvp7002_timings[i];
> -                       return tvp7002_write_inittab(sd, tvp7002_timings[i].p_settings);
> -               }
> -       }
> -
> -       return -EINVAL;
> -}
> -
>  static int tvp7002_s_dv_timings(struct v4l2_subdev *sd,
>                                         struct v4l2_dv_timings *dv_timings)
>  {
> @@ -752,22 +718,6 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)
>         return 0;
>  }
>
> -static int tvp7002_query_dv_preset(struct v4l2_subdev *sd,
> -                                       struct v4l2_dv_preset *qpreset)
> -{
> -       int index;
> -       int err = tvp7002_query_dv(sd, &index);
> -
> -       if (err || index == NUM_TIMINGS) {
> -               qpreset->preset = V4L2_DV_INVALID;
> -               if (err == -ENOLINK)
> -                       err = 0;
> -               return err;
> -       }
> -       qpreset->preset = tvp7002_timings[index].preset;
> -       return 0;
> -}
> -
>  static int tvp7002_query_dv_timings(struct v4l2_subdev *sd,
>                                         struct v4l2_dv_timings *timings)
>  {
> @@ -915,23 +865,6 @@ static int tvp7002_log_status(struct v4l2_subdev *sd)
>         return 0;
>  }
>
> -/*
> - * tvp7002_enum_dv_presets() - Enum supported digital video formats
> - * @sd: pointer to standard V4L2 sub-device structure
> - * @preset: pointer to format struct
> - *
> - * Enumerate supported digital video formats.
> - */
> -static int tvp7002_enum_dv_presets(struct v4l2_subdev *sd,
> -               struct v4l2_dv_enum_preset *preset)
> -{
> -       /* Check requested format index is within range */
> -       if (preset->index >= NUM_TIMINGS)
> -               return -EINVAL;
> -
> -       return v4l_fill_dv_preset_info(tvp7002_timings[preset->index].preset, preset);
> -}
> -
>  static int tvp7002_enum_dv_timings(struct v4l2_subdev *sd,
>                 struct v4l2_enum_dv_timings *timings)
>  {
> @@ -966,9 +899,6 @@ static const struct v4l2_subdev_core_ops tvp7002_core_ops = {
>
>  /* Specific video subsystem operation handlers */
>  static const struct v4l2_subdev_video_ops tvp7002_video_ops = {
> -       .enum_dv_presets = tvp7002_enum_dv_presets,
> -       .s_dv_preset = tvp7002_s_dv_preset,
> -       .query_dv_preset = tvp7002_query_dv_preset,
>         .g_dv_timings = tvp7002_g_dv_timings,
>         .s_dv_timings = tvp7002_s_dv_timings,
>         .enum_dv_timings = tvp7002_enum_dv_timings,
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 07/18] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS
  2013-02-16  9:28   ` [RFC PATCH 07/18] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS Hans Verkuil
@ 2013-02-16 13:39     ` Scott Jiang
  0 siblings, 0 replies; 42+ messages in thread
From: Scott Jiang @ 2013-02-16 13:39 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Prabhakar Lad, Tomasz Stanislawski, Kyungmin Park,
	Hans Verkuil

2013/2/16 Hans Verkuil <hverkuil@xs4all.nl>:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> The use of V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is obsolete, use DV_TIMINGS instead.
> Note that V4L2_IN/OUT_CAP_CUSTOM_TIMINGS is just a #define for
> V4L2_IN/OUT_CAP_DV_TIMINGS.
>
> At some point in the future these CUSTOM_TIMINGS defines might be removed.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Scott Jiang <scott.jiang.linux@gmail.com>

Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
> ---
>  arch/blackfin/mach-bf609/boards/ezkit.c        |    8 ++++----
>  drivers/media/platform/blackfin/bfin_capture.c |    4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/blackfin/mach-bf609/boards/ezkit.c b/arch/blackfin/mach-bf609/boards/ezkit.c
> index 61c1f47..97d7016 100644
> --- a/arch/blackfin/mach-bf609/boards/ezkit.c
> +++ b/arch/blackfin/mach-bf609/boards/ezkit.c
> @@ -936,19 +936,19 @@ static struct v4l2_input adv7842_inputs[] = {
>                 .index = 2,
>                 .name = "Component",
>                 .type = V4L2_INPUT_TYPE_CAMERA,
> -               .capabilities = V4L2_IN_CAP_CUSTOM_TIMINGS,
> +               .capabilities = V4L2_IN_CAP_DV_TIMINGS,
>         },
>         {
>                 .index = 3,
>                 .name = "VGA",
>                 .type = V4L2_INPUT_TYPE_CAMERA,
> -               .capabilities = V4L2_IN_CAP_CUSTOM_TIMINGS,
> +               .capabilities = V4L2_IN_CAP_DV_TIMINGS,
>         },
>         {
>                 .index = 4,
>                 .name = "HDMI",
>                 .type = V4L2_INPUT_TYPE_CAMERA,
> -               .capabilities = V4L2_IN_CAP_CUSTOM_TIMINGS,
> +               .capabilities = V4L2_IN_CAP_DV_TIMINGS,
>         },
>  };
>
> @@ -1074,7 +1074,7 @@ static struct v4l2_output adv7511_outputs[] = {
>                 .index = 0,
>                 .name = "HDMI",
>                 .type = V4L2_INPUT_TYPE_CAMERA,
> -               .capabilities = V4L2_OUT_CAP_CUSTOM_TIMINGS,
> +               .capabilities = V4L2_OUT_CAP_DV_TIMINGS,
>         },
>  };
>
> diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c
> index 5f209d5..6691355 100644
> --- a/drivers/media/platform/blackfin/bfin_capture.c
> +++ b/drivers/media/platform/blackfin/bfin_capture.c
> @@ -384,7 +384,7 @@ static int bcap_start_streaming(struct vb2_queue *vq, unsigned int count)
>         params.ppi_control = bcap_dev->cfg->ppi_control;
>         params.int_mask = bcap_dev->cfg->int_mask;
>         if (bcap_dev->cfg->inputs[bcap_dev->cur_input].capabilities
> -                       & V4L2_IN_CAP_CUSTOM_TIMINGS) {
> +                       & V4L2_IN_CAP_DV_TIMINGS) {
>                 struct v4l2_bt_timings *bt = &bcap_dev->dv_timings.bt;
>
>                 params.hdelay = bt->hsync + bt->hbackporch;
> @@ -1110,7 +1110,7 @@ static int bcap_probe(struct platform_device *pdev)
>                 }
>                 bcap_dev->std = std;
>         }
> -       if (config->inputs[0].capabilities & V4L2_IN_CAP_CUSTOM_TIMINGS) {
> +       if (config->inputs[0].capabilities & V4L2_IN_CAP_DV_TIMINGS) {
>                 struct v4l2_dv_timings dv_timings;
>                 ret = v4l2_subdev_call(bcap_dev->sd, video,
>                                 g_dv_timings, &dv_timings);
> --
> 1.7.10.4
>

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

* Re: [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
  2013-02-16 12:50       ` Prabhakar Lad
@ 2013-02-16 19:18         ` Sekhar Nori
  -1 siblings, 0 replies; 42+ messages in thread
From: Sekhar Nori @ 2013-02-16 19:18 UTC (permalink / raw)
  To: Prabhakar Lad
  Cc: Hans Verkuil, linux-media, Tomasz Stanislawski, Kyungmin Park,
	Scott Jiang, Hans Verkuil, dlos, LAK



On 2/16/2013 6:20 PM, Prabhakar Lad wrote:
> Cc'ed  Sekhar, DLOS, LAK.
> 
> Sekhar Can you Ack this patch for platform changes ?

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

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

* [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS
@ 2013-02-16 19:18         ` Sekhar Nori
  0 siblings, 0 replies; 42+ messages in thread
From: Sekhar Nori @ 2013-02-16 19:18 UTC (permalink / raw)
  To: linux-arm-kernel



On 2/16/2013 6:20 PM, Prabhakar Lad wrote:
> Cc'ed  Sekhar, DLOS, LAK.
> 
> Sekhar Can you Ack this patch for platform changes ?

Acked-by: Sekhar Nori <nsekhar@ti.com>

Thanks,
Sekhar

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

* Re: [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
  2013-02-16 12:58       ` Prabhakar Lad
@ 2013-02-16 19:23         ` Sekhar Nori
  -1 siblings, 0 replies; 42+ messages in thread
From: Sekhar Nori @ 2013-02-16 19:23 UTC (permalink / raw)
  To: Prabhakar Lad
  Cc: Hans Verkuil, linux-media, Tomasz Stanislawski, Kyungmin Park,
	Scott Jiang, Hans Verkuil, dlos, LAK

On 2/16/2013 6:28 PM, Prabhakar Lad wrote:
> Cc'ed Sekhar, DLOS, LAK.
> 
> Sekhar Can you Ack this patch ? Or maybe you can take this patch through
> your tree ?

I can take the patch, but I can only send for v3.10 since for v3.9 ARM
tree is only accepting bug fixes for already accepted code. If you wish
to take this through media tree for v3.9, feel free to add:

Acked-by: Sekhar Nori <nsekhar@ti.com>

Since this appears to be an ARM-only patch, its better to add an 'ARM:'
prefix to the subject line as is the norm with all other ARM patches.

Thanks,
Sekhar

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

* [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
@ 2013-02-16 19:23         ` Sekhar Nori
  0 siblings, 0 replies; 42+ messages in thread
From: Sekhar Nori @ 2013-02-16 19:23 UTC (permalink / raw)
  To: linux-arm-kernel

On 2/16/2013 6:28 PM, Prabhakar Lad wrote:
> Cc'ed Sekhar, DLOS, LAK.
> 
> Sekhar Can you Ack this patch ? Or maybe you can take this patch through
> your tree ?

I can take the patch, but I can only send for v3.10 since for v3.9 ARM
tree is only accepting bug fixes for already accepted code. If you wish
to take this through media tree for v3.9, feel free to add:

Acked-by: Sekhar Nori <nsekhar@ti.com>

Since this appears to be an ARM-only patch, its better to add an 'ARM:'
prefix to the subject line as is the norm with all other ARM patches.

Thanks,
Sekhar

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

* Re: [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
  2013-02-16 19:23         ` Sekhar Nori
@ 2013-02-16 19:33           ` Hans Verkuil
  -1 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16 19:33 UTC (permalink / raw)
  To: Sekhar Nori
  Cc: Prabhakar Lad, linux-media, Tomasz Stanislawski, Kyungmin Park,
	Scott Jiang, Hans Verkuil, dlos, LAK

On Sat February 16 2013 20:23:39 Sekhar Nori wrote:
> On 2/16/2013 6:28 PM, Prabhakar Lad wrote:
> > Cc'ed Sekhar, DLOS, LAK.
> > 
> > Sekhar Can you Ack this patch ? Or maybe you can take this patch through
> > your tree ?
> 
> I can take the patch, but I can only send for v3.10 since for v3.9 ARM
> tree is only accepting bug fixes for already accepted code. If you wish
> to take this through media tree for v3.9, feel free to add:

There is no hurry. If you can take this patch for 3.10, then that is fine
by me. This patch series is unlikely to make it in 3.9 anyway, nor does it
need to. Just let me know if you take it, then I can drop it from my patch
series.

Regards,

	Hans

> 
> Acked-by: Sekhar Nori <nsekhar@ti.com>
> 
> Since this appears to be an ARM-only patch, its better to add an 'ARM:'
> prefix to the subject line as is the norm with all other ARM patches.
> 
> Thanks,
> Sekhar
> 

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

* [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
@ 2013-02-16 19:33           ` Hans Verkuil
  0 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-02-16 19:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat February 16 2013 20:23:39 Sekhar Nori wrote:
> On 2/16/2013 6:28 PM, Prabhakar Lad wrote:
> > Cc'ed Sekhar, DLOS, LAK.
> > 
> > Sekhar Can you Ack this patch ? Or maybe you can take this patch through
> > your tree ?
> 
> I can take the patch, but I can only send for v3.10 since for v3.9 ARM
> tree is only accepting bug fixes for already accepted code. If you wish
> to take this through media tree for v3.9, feel free to add:

There is no hurry. If you can take this patch for 3.10, then that is fine
by me. This patch series is unlikely to make it in 3.9 anyway, nor does it
need to. Just let me know if you take it, then I can drop it from my patch
series.

Regards,

	Hans

> 
> Acked-by: Sekhar Nori <nsekhar@ti.com>
> 
> Since this appears to be an ARM-only patch, its better to add an 'ARM:'
> prefix to the subject line as is the norm with all other ARM patches.
> 
> Thanks,
> Sekhar
> 

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

* Re: [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
  2013-02-16 19:33           ` Hans Verkuil
@ 2013-02-19 10:47             ` Sekhar Nori
  -1 siblings, 0 replies; 42+ messages in thread
From: Sekhar Nori @ 2013-02-19 10:47 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: Prabhakar Lad, linux-media, Tomasz Stanislawski, Kyungmin Park,
	Scott Jiang, Hans Verkuil, dlos, LAK

Hi Hans,

On 2/17/2013 1:03 AM, Hans Verkuil wrote:
> On Sat February 16 2013 20:23:39 Sekhar Nori wrote:
>> On 2/16/2013 6:28 PM, Prabhakar Lad wrote:
>>> Cc'ed Sekhar, DLOS, LAK.
>>>
>>> Sekhar Can you Ack this patch ? Or maybe you can take this patch through
>>> your tree ?
>>
>> I can take the patch, but I can only send for v3.10 since for v3.9 ARM
>> tree is only accepting bug fixes for already accepted code. If you wish
>> to take this through media tree for v3.9, feel free to add:
> 
> There is no hurry. If you can take this patch for 3.10, then that is fine
> by me. This patch series is unlikely to make it in 3.9 anyway, nor does it
> need to. Just let me know if you take it, then I can drop it from my patch
> series.

It appears that it will be simpler if you manage the entire series. I
have already acked this one, so please take it through the media tree.

Thanks,
Sekhar

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

* [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS
@ 2013-02-19 10:47             ` Sekhar Nori
  0 siblings, 0 replies; 42+ messages in thread
From: Sekhar Nori @ 2013-02-19 10:47 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Hans,

On 2/17/2013 1:03 AM, Hans Verkuil wrote:
> On Sat February 16 2013 20:23:39 Sekhar Nori wrote:
>> On 2/16/2013 6:28 PM, Prabhakar Lad wrote:
>>> Cc'ed Sekhar, DLOS, LAK.
>>>
>>> Sekhar Can you Ack this patch ? Or maybe you can take this patch through
>>> your tree ?
>>
>> I can take the patch, but I can only send for v3.10 since for v3.9 ARM
>> tree is only accepting bug fixes for already accepted code. If you wish
>> to take this through media tree for v3.9, feel free to add:
> 
> There is no hurry. If you can take this patch for 3.10, then that is fine
> by me. This patch series is unlikely to make it in 3.9 anyway, nor does it
> need to. Just let me know if you take it, then I can drop it from my patch
> series.

It appears that it will be simpler if you manage the entire series. I
have already acked this one, so please take it through the media tree.

Thanks,
Sekhar

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

* Re: [RFC PATCH 00/18] Remove DV_PRESET API
  2013-02-16  9:28 [RFC PATCH 00/18] Remove DV_PRESET API Hans Verkuil
  2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
@ 2013-03-01 11:01 ` Tomasz Stanislawski
  2013-03-01 11:32   ` Hans Verkuil
  1 sibling, 1 reply; 42+ messages in thread
From: Tomasz Stanislawski @ 2013-03-01 11:01 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: linux-media, Prabhakar Lad, Kyungmin Park, Scott Jiang

Hi Hans,
Thank you for the patches.
I applied the patchset on the top of SPRC's 3.8-rc4 kernel.
I tested the s5p-tv dv-timings using 0.9.3 using v4l-utils.
The test platform was Universal C210 (based on Exynos 4210 SoC).

Every timing mode worked correctly so do not hesitate to add:

Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>

to all s5p-tv related patches.

I tested following features:
a) v4l2-ctl --list-dv-timings
   Result: got 10 timings entries as expected
b) v4l2-ctl --get-dv-timings-cap
   Result: got timings caps. The was minor issue. Minimal with is 720 not 640.
c) for each available timing
   v4l2-ctl --set-dv-bt-timings=index={index}
   v4l2-ctl --get-dv-bt-timings
   Show test image on the screen
   Result: TV detected correct timings for all cases

I found some minor issues in the patches.
Please refer to the inlined comments.

BTW.
The v4l2-ctl reports that fps for 1080i50 and 1080i60 as 25 and 30 respectively.
I agree that those values correctly reflects relation between
image resolution and the pixel rate.
However, I admit it looks a little bit confusing when suddenly 50 changes into 25.
It should clarified if F in FPS stands for "frame" or "field".

Regards,
Tomasz Stanislawski

On 02/16/2013 10:28 AM, Hans Verkuil wrote:
> Hi all!
> 
> This patch series removes the last remnants of the deprecated DV_PRESET API
> from the kernel:
> 
> - remove the dv_preset ops from the tvp7002 driver: all bridge drivers that
>   use this i2c driver have already been converted to the DV_TIMINGS API, so
>   these ops are no longer used. Prabhakar, can you test this for me?
> 
> - fix some remaining references to the preset API from the davinci drivers.
>   It's trivial stuff, but I would appreciate it if you can look at it, 
>   Prabhakar.
> 
> - rename some CUSTOM_TIMINGS defines to DV_TIMINGS since CUSTOM_TIMINGS
>   is deprecated. It certainly shouldn't be used anymore in the kernel.
>   Trivial patches, but please look at it as well, Prabhakar and Scott.
> 
> - convert the s5p-tv drivers from the DV_PRESET to the DV_TIMINGS API and
>   remove the DV_PRESET API. Tomasz or Kyungmin Park, can you test this?
>   I do not know whether removal of the DV_PRESET API is possible at this
>   stage for the s5p-tv since I do not know if any code inside Samsung
>   uses the DV_PRESET API. If the DV_PRESET API cannot be removed at this
>   time, then let me know. I would have to make some changes to allow the
>   preset and timings APIs to co-exist. I would really like to remove the
>   preset API some time this year, though, if only to prevent new drivers 
>   from attempting to use the preset API.
> 
> - finally remove the remaining core DV_PRESET support.
> 
> - remove the DV_PRESET API from the videodev2.h header. Note that I am not
>   at all certain if we should do this. I know that the DV_PRESET API has
>   only been used in embedded systems, so the impact should be very limited.
>   But it is probably better to wait for a year or so before actually 
>   removing it from the header. The main reason for adding this removal is
>   to verify that I haven't forgotten any driver conversions.
> 
> Comments are welcome!
> 
> Regards,
> 
> 	Hans
> 


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

* Re: [RFC PATCH 09/18] s5p-tv: add dv_timings support for hdmi.
  2013-02-16  9:28   ` [RFC PATCH 09/18] s5p-tv: add dv_timings support for hdmi Hans Verkuil
@ 2013-03-01 11:01     ` Tomasz Stanislawski
  0 siblings, 0 replies; 42+ messages in thread
From: Tomasz Stanislawski @ 2013-03-01 11:01 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Prabhakar Lad, Kyungmin Park, Scott Jiang, Hans Verkuil

Hi Hans,
Please refer to the comments below.

On 02/16/2013 10:28 AM, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> This just adds dv_timings support without modifying existing dv_preset
> support.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/media/platform/s5p-tv/hdmi_drv.c |   92 +++++++++++++++++++++++++-----
>  1 file changed, 79 insertions(+), 13 deletions(-)
> 

[snip]

> +static int hdmi_enum_dv_timings(struct v4l2_subdev *sd,
> +	struct v4l2_enum_dv_timings *timings)
> +{
> +	if (timings->index >= ARRAY_SIZE(hdmi_timings))
> +		return -EINVAL;
> +	timings->timings = hdmi_timings[timings->index].dv_timings;
> +	if (!hdmi_timings[timings->index].reduced_fps)
> +		timings->timings.bt.flags &= ~V4L2_DV_FL_CAN_REDUCE_FPS;
> +	return 0;
> +}
> +
> +static int hdmi_dv_timings_cap(struct v4l2_subdev *sd,
> +	struct v4l2_dv_timings_cap *cap)
> +{
> +	cap->type = V4L2_DV_BT_656_1120;

The minimal width among all the supported timings is 720 not 640.

> +	cap->bt.min_width = 640;
> +	cap->bt.max_width = 1920;
> +	cap->bt.min_height = 480;
> +	cap->bt.max_height = 1080;

The range of pixelclock is a property of hdmiphy.
Not all ranges might be supported on all platforms.
Therefore it may be a good idea to obtains those values
from hdmiphy by chaining hdmi_dv_timings_cap to hdmiphy.

> +	cap->bt.min_pixelclock = 27000000;
> +	cap->bt.max_pixelclock = 148500000;
> +	cap->bt.standards = V4L2_DV_BT_STD_CEA861;
> +	cap->bt.capabilities = V4L2_DV_BT_CAP_INTERLACED |
> +			       V4L2_DV_BT_CAP_PROGRESSIVE;
> +	return 0;
> +}
> +
>  static const struct v4l2_subdev_core_ops hdmi_sd_core_ops = {
>  	.s_power = hdmi_s_power,
>  };
> @@ -687,6 +749,10 @@ static const struct v4l2_subdev_video_ops hdmi_sd_video_ops = {
>  	.s_dv_preset = hdmi_s_dv_preset,
>  	.g_dv_preset = hdmi_g_dv_preset,
>  	.enum_dv_presets = hdmi_enum_dv_presets,
> +	.s_dv_timings = hdmi_s_dv_timings,
> +	.g_dv_timings = hdmi_g_dv_timings,
> +	.enum_dv_timings = hdmi_enum_dv_timings,
> +	.dv_timings_cap = hdmi_dv_timings_cap,
>  	.g_mbus_fmt = hdmi_g_mbus_fmt,
>  	.s_stream = hdmi_s_stream,
>  };
> 


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

* Re: [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy.
  2013-02-16  9:28   ` [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy Hans Verkuil
@ 2013-03-01 11:02     ` Tomasz Stanislawski
  2013-03-01 11:25       ` Hans Verkuil
  0 siblings, 1 reply; 42+ messages in thread
From: Tomasz Stanislawski @ 2013-03-01 11:02 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Prabhakar Lad, Kyungmin Park, Scott Jiang, Hans Verkuil

Hi Hans,
Please refer to the comments below.

On 02/16/2013 10:28 AM, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> This just adds dv_timings support without modifying existing dv_preset
> support, although I had to refactor a little bit in order to share
> hdmiphy_find_conf() between the preset and timings code.
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/media/platform/s5p-tv/hdmiphy_drv.c |   48 ++++++++++++++++++++++-----
>  1 file changed, 39 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
> index 80717ce..85b4211 100644
> --- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
> +++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
> @@ -197,14 +197,9 @@ static unsigned long hdmiphy_preset_to_pixclk(u32 preset)
>  		return 0;
>  }
>  
> -static const u8 *hdmiphy_find_conf(u32 preset, const struct hdmiphy_conf *conf)
> +static const u8 *hdmiphy_find_conf(unsigned long pixclk,
> +		const struct hdmiphy_conf *conf)
>  {
> -	unsigned long pixclk;
> -
> -	pixclk = hdmiphy_preset_to_pixclk(preset);
> -	if (!pixclk)
> -		return NULL;
> -
>  	for (; conf->pixclk; ++conf)
>  		if (conf->pixclk == pixclk)
>  			return conf->data;
> @@ -220,15 +215,49 @@ static int hdmiphy_s_power(struct v4l2_subdev *sd, int on)
>  static int hdmiphy_s_dv_preset(struct v4l2_subdev *sd,
>  	struct v4l2_dv_preset *preset)
>  {
> -	const u8 *data;
> +	const u8 *data = NULL;
>  	u8 buffer[32];
>  	int ret;
>  	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
>  	struct i2c_client *client = v4l2_get_subdevdata(sd);
> +	unsigned long pixclk;
>  	struct device *dev = &client->dev;
>  
>  	dev_info(dev, "s_dv_preset(preset = %d)\n", preset->preset);
> -	data = hdmiphy_find_conf(preset->preset, ctx->conf_tab);
> +
> +	pixclk = hdmiphy_preset_to_pixclk(preset->preset);

Just nitpicking.
The pixclk might be 0 is the preset is not supported hdmiphy.
For some platforms not all frequencies are supported.
Anyway, if pixclk is 0 then hdmiphy_find_conf will detect it.

> +	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
> +	if (!data) {
> +		dev_err(dev, "format not supported\n");
> +		return -EINVAL;
> +	}
> +
> +	/* storing configuration to the device */
> +	memcpy(buffer, data, 32);
> +	ret = i2c_master_send(client, buffer, 32);
> +	if (ret != 32) {
> +		dev_err(dev, "failed to configure HDMIPHY via I2C\n");
> +		return -EIO;
> +	}
> +
> +	return 0;
> +}
> +
> +static int hdmiphy_s_dv_timings(struct v4l2_subdev *sd,
> +	struct v4l2_dv_timings *timings)
> +{
> +	const u8 *data;
> +	u8 buffer[32];
> +	int ret;
> +	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
> +	struct i2c_client *client = v4l2_get_subdevdata(sd);
> +	struct device *dev = &client->dev;
> +	unsigned long pixclk = timings->bt.pixelclock;
> +
> +	dev_info(dev, "s_dv_timings\n");

Using test against V4L2_DV_FL_REDUCED_FPS and 74250000 looks little hacky to me.
Why there is no such a check for 148500000 and 27000000 (REDUCED -> INCREASED?).
Maybe it will be better to past both timings->bt.pixelclock and timings->bt.flags
as parameters for hdmiphy_find_conf function. The hdmiphy_find_conf could
perform pixclk adjustment or some fallback policy based on the flags.

> +	if ((timings->bt.flags & V4L2_DV_FL_REDUCED_FPS) && pixclk == 74250000)
> +		pixclk = 74176000;
> +	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
>  	if (!data) {
>  		dev_err(dev, "format not supported\n");
>  		return -EINVAL;
> @@ -271,6 +300,7 @@ static const struct v4l2_subdev_core_ops hdmiphy_core_ops = {
>  
>  static const struct v4l2_subdev_video_ops hdmiphy_video_ops = {
>  	.s_dv_preset = hdmiphy_s_dv_preset,
> +	.s_dv_timings = hdmiphy_s_dv_timings,
>  	.s_stream =  hdmiphy_s_stream,
>  };
>  
> 


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

* Re: [RFC PATCH 11/18] s5p-tv: remove dv_preset support from mixer_video.
  2013-02-16  9:28   ` [RFC PATCH 11/18] s5p-tv: remove dv_preset support from mixer_video Hans Verkuil
@ 2013-03-01 11:02     ` Tomasz Stanislawski
  0 siblings, 0 replies; 42+ messages in thread
From: Tomasz Stanislawski @ 2013-03-01 11:02 UTC (permalink / raw)
  To: Hans Verkuil
  Cc: linux-media, Prabhakar Lad, Kyungmin Park, Scott Jiang, Hans Verkuil

Hi Hans,
Please refer to the comments below.

On 02/16/2013 10:28 AM, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> The dv_preset API is deprecated and is replaced by the much improved dv_timings
> API. Remove the dv_preset support from this driver as this will allow us to
> remove the dv_preset API altogether (s5p-tv being the last user of this code).
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> ---
>  drivers/media/platform/s5p-tv/mixer_video.c |   68 ++-------------------------
>  1 file changed, 3 insertions(+), 65 deletions(-)
> 

[snip]

>  static int mxr_enum_dv_timings(struct file *file, void *fh,
>  	struct v4l2_enum_dv_timings *timings)
>  {
> @@ -584,7 +526,7 @@ static int mxr_s_dv_timings(struct file *file, void *fh,
>  	/* lock protects from changing sd_out */
>  	mutex_lock(&mdev->mutex);
>  
> -	/* preset change cannot be done while there is an entity
> +	/* timings change cannot be done while there is an entity
>  	 * dependant on output configuration
>  	 */
>  	if (mdev->n_output > 0) {
> @@ -689,8 +631,8 @@ static int mxr_enum_output(struct file *file, void *fh, struct v4l2_output *a)
>  	/* try to obtain supported tv norms */
>  	v4l2_subdev_call(sd, video, g_tvnorms_output, &a->std);
>  	a->capabilities = 0;
> -	if (sd->ops->video && sd->ops->video->s_dv_preset)
> -		a->capabilities |= V4L2_OUT_CAP_PRESETS;

Could you move the lines below to the patch named
"[RFC PATCH 08/18] s5p-tv: add dv_timings support for mixer_video.".

> +	if (sd->ops->video && sd->ops->video->s_dv_timings)
> +		a->capabilities |= V4L2_OUT_CAP_DV_TIMINGS;

Don't you think that all "add" patches should go in reverse order?
I mean that dv_timings hdmiphy should be applied before hdmi. The hdmi before mixer.
This way all non-functional features would stay invisible from user-space until
they become functional.

>  	if (sd->ops->video && sd->ops->video->s_std_output)
>  		a->capabilities |= V4L2_OUT_CAP_STD;
>  	a->type = V4L2_OUTPUT_TYPE_ANALOG;
> @@ -811,10 +753,6 @@ static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
>  	/* Streaming control */
>  	.vidioc_streamon = mxr_streamon,
>  	.vidioc_streamoff = mxr_streamoff,
> -	/* Preset functions */
> -	.vidioc_enum_dv_presets = mxr_enum_dv_presets,
> -	.vidioc_s_dv_preset = mxr_s_dv_preset,
> -	.vidioc_g_dv_preset = mxr_g_dv_preset,
>  	/* DV Timings functions */
>  	.vidioc_enum_dv_timings = mxr_enum_dv_timings,
>  	.vidioc_s_dv_timings = mxr_s_dv_timings,
> 


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

* Re: [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy.
  2013-03-01 11:02     ` Tomasz Stanislawski
@ 2013-03-01 11:25       ` Hans Verkuil
  0 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-03-01 11:25 UTC (permalink / raw)
  To: Tomasz Stanislawski
  Cc: linux-media, Prabhakar Lad, Kyungmin Park, Scott Jiang, Hans Verkuil

On Fri March 1 2013 12:02:14 Tomasz Stanislawski wrote:
> Hi Hans,
> Please refer to the comments below.
> 
> On 02/16/2013 10:28 AM, Hans Verkuil wrote:
> > From: Hans Verkuil <hans.verkuil@cisco.com>
> > 
> > This just adds dv_timings support without modifying existing dv_preset
> > support, although I had to refactor a little bit in order to share
> > hdmiphy_find_conf() between the preset and timings code.
> > 
> > Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> > Cc: Tomasz Stanislawski <t.stanislaws@samsung.com>
> > Cc: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> >  drivers/media/platform/s5p-tv/hdmiphy_drv.c |   48 ++++++++++++++++++++++-----
> >  1 file changed, 39 insertions(+), 9 deletions(-)
> > 
> > diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
> > index 80717ce..85b4211 100644
> > --- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
> > +++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
> > @@ -197,14 +197,9 @@ static unsigned long hdmiphy_preset_to_pixclk(u32 preset)
> >  		return 0;
> >  }
> >  
> > -static const u8 *hdmiphy_find_conf(u32 preset, const struct hdmiphy_conf *conf)
> > +static const u8 *hdmiphy_find_conf(unsigned long pixclk,
> > +		const struct hdmiphy_conf *conf)
> >  {
> > -	unsigned long pixclk;
> > -
> > -	pixclk = hdmiphy_preset_to_pixclk(preset);
> > -	if (!pixclk)
> > -		return NULL;
> > -
> >  	for (; conf->pixclk; ++conf)
> >  		if (conf->pixclk == pixclk)
> >  			return conf->data;
> > @@ -220,15 +215,49 @@ static int hdmiphy_s_power(struct v4l2_subdev *sd, int on)
> >  static int hdmiphy_s_dv_preset(struct v4l2_subdev *sd,
> >  	struct v4l2_dv_preset *preset)
> >  {
> > -	const u8 *data;
> > +	const u8 *data = NULL;
> >  	u8 buffer[32];
> >  	int ret;
> >  	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
> >  	struct i2c_client *client = v4l2_get_subdevdata(sd);
> > +	unsigned long pixclk;
> >  	struct device *dev = &client->dev;
> >  
> >  	dev_info(dev, "s_dv_preset(preset = %d)\n", preset->preset);
> > -	data = hdmiphy_find_conf(preset->preset, ctx->conf_tab);
> > +
> > +	pixclk = hdmiphy_preset_to_pixclk(preset->preset);
> 
> Just nitpicking.
> The pixclk might be 0 is the preset is not supported hdmiphy.
> For some platforms not all frequencies are supported.
> Anyway, if pixclk is 0 then hdmiphy_find_conf will detect it.

I'll add a comment clarifying this. I actually was relying on find_conf
to handle the 0 case.

> > +	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
> > +	if (!data) {
> > +		dev_err(dev, "format not supported\n");
> > +		return -EINVAL;
> > +	}
> > +
> > +	/* storing configuration to the device */
> > +	memcpy(buffer, data, 32);
> > +	ret = i2c_master_send(client, buffer, 32);
> > +	if (ret != 32) {
> > +		dev_err(dev, "failed to configure HDMIPHY via I2C\n");
> > +		return -EIO;
> > +	}
> > +
> > +	return 0;
> > +}
> > +
> > +static int hdmiphy_s_dv_timings(struct v4l2_subdev *sd,
> > +	struct v4l2_dv_timings *timings)
> > +{
> > +	const u8 *data;
> > +	u8 buffer[32];
> > +	int ret;
> > +	struct hdmiphy_ctx *ctx = sd_to_ctx(sd);
> > +	struct i2c_client *client = v4l2_get_subdevdata(sd);
> > +	struct device *dev = &client->dev;
> > +	unsigned long pixclk = timings->bt.pixelclock;
> > +
> > +	dev_info(dev, "s_dv_timings\n");
> 
> Using test against V4L2_DV_FL_REDUCED_FPS and 74250000 looks little hacky to me.
> Why there is no such a check for 148500000 and 27000000 (REDUCED -> INCREASED?).

Because that was not supported by the original code. I have no idea whether 1080p59.94
is supported or not, or what pixelclock should be used in that case. So I faithfully
reproduced the original functionality.

BTW, it is 'reduced': 74.25 MHz is for 30 fps, 74.176 is for 29.97 fps. Also, REDUCED_FPS
doesn't apply to the 27 MHz case which is always 29.97 fps in the NTSC resolution
case.

> Maybe it will be better to past both timings->bt.pixelclock and timings->bt.flags
> as parameters for hdmiphy_find_conf function. The hdmiphy_find_conf could
> perform pixclk adjustment or some fallback policy based on the flags.

I really prefer to keep the same functionality. I don't want to make changes
to the existing functionality, partially to make it easier to prevent
regressions, partially because I don't have the setup anyway to test this if
I add functionality.

But feel free to provide an additional patch doing this :-)

Regards,

	Hans

> 
> > +	if ((timings->bt.flags & V4L2_DV_FL_REDUCED_FPS) && pixclk == 74250000)
> > +		pixclk = 74176000;
> > +	data = hdmiphy_find_conf(pixclk, ctx->conf_tab);
> >  	if (!data) {
> >  		dev_err(dev, "format not supported\n");
> >  		return -EINVAL;
> > @@ -271,6 +300,7 @@ static const struct v4l2_subdev_core_ops hdmiphy_core_ops = {
> >  
> >  static const struct v4l2_subdev_video_ops hdmiphy_video_ops = {
> >  	.s_dv_preset = hdmiphy_s_dv_preset,
> > +	.s_dv_timings = hdmiphy_s_dv_timings,
> >  	.s_stream =  hdmiphy_s_stream,
> >  };
> >  
> > 
> 

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

* Re: [RFC PATCH 00/18] Remove DV_PRESET API
  2013-03-01 11:01 ` [RFC PATCH 00/18] Remove DV_PRESET API Tomasz Stanislawski
@ 2013-03-01 11:32   ` Hans Verkuil
  0 siblings, 0 replies; 42+ messages in thread
From: Hans Verkuil @ 2013-03-01 11:32 UTC (permalink / raw)
  To: Tomasz Stanislawski
  Cc: linux-media, Prabhakar Lad, Kyungmin Park, Scott Jiang

On Fri March 1 2013 12:01:09 Tomasz Stanislawski wrote:
> Hi Hans,
> Thank you for the patches.
> I applied the patchset on the top of SPRC's 3.8-rc4 kernel.
> I tested the s5p-tv dv-timings using 0.9.3 using v4l-utils.
> The test platform was Universal C210 (based on Exynos 4210 SoC).
> 
> Every timing mode worked correctly so do not hesitate to add:
> 
> Tested-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
> 
> to all s5p-tv related patches.

Thanks for testing! Much appreciated.

> 
> I tested following features:
> a) v4l2-ctl --list-dv-timings
>    Result: got 10 timings entries as expected
> b) v4l2-ctl --get-dv-timings-cap
>    Result: got timings caps. The was minor issue. Minimal with is 720 not 640.
> c) for each available timing
>    v4l2-ctl --set-dv-bt-timings=index={index}
>    v4l2-ctl --get-dv-bt-timings
>    Show test image on the screen
>    Result: TV detected correct timings for all cases
> 
> I found some minor issues in the patches.
> Please refer to the inlined comments.

I'll take those into account for my v2 posting.

> BTW.
> The v4l2-ctl reports that fps for 1080i50 and 1080i60 as 25 and 30 respectively.
> I agree that those values correctly reflects relation between
> image resolution and the pixel rate.
> However, I admit it looks a little bit confusing when suddenly 50 changes into 25.
> It should clarified if F in FPS stands for "frame" or "field".

Can you add this patch to v4l2-ctl and see if that looks better?

--------------- cut here ---------------
diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp
index 863357a..d39faca 100644
--- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp
@@ -260,10 +260,9 @@ static void print_dv_timings(const struct v4l2_dv_timings *t)
 				(bt->polarities & V4L2_DV_HSYNC_POS_POL) ? '+' : '-');
 		printf("\tPixelclock: %lld Hz", bt->pixelclock);
 		if (bt->width && bt->height)
-			printf(" (%.2f fps)", (double)bt->pixelclock /
+			printf(" (%.2f fields per second)", (double)bt->pixelclock /
 					((bt->width + bt->hfrontporch + bt->hsync + bt->hbackporch) *
-					 (bt->height + bt->vfrontporch + bt->vsync + bt->vbackporch +
-					  bt->il_vfrontporch + bt->il_vsync + bt->il_vbackporch)));
+					 (bt->height + bt->vfrontporch + bt->vsync + bt->vbackporch)));
 		printf("\n");
 		printf("\tHorizontal frontporch: %d\n", bt->hfrontporch);
 		printf("\tHorizontal sync: %d\n", bt->hsync);
--------------- cut here ---------------

Also, can you run v4l2-compliance as well? See what that reports.

Regards,

	Hans

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

end of thread, other threads:[~2013-03-01 11:32 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-16  9:28 [RFC PATCH 00/18] Remove DV_PRESET API Hans Verkuil
2013-02-16  9:28 ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 02/18] tvp7002: use dv_timings structs instead of presets Hans Verkuil
2013-02-16 13:12     ` Prabhakar Lad
2013-02-16  9:28   ` [RFC PATCH 03/18] tvp7002: remove dv_preset support Hans Verkuil
2013-02-16 13:13     ` Prabhakar Lad
2013-02-16  9:28   ` [RFC PATCH 04/18] davinci_vpfe: fix copy-paste errors in several comments Hans Verkuil
2013-02-16 12:40     ` Prabhakar Lad
2013-02-16  9:28   ` [RFC PATCH 05/18] davinci: remove VPBE_ENC_DV_PRESET and rename VPBE_ENC_CUSTOM_TIMINGS Hans Verkuil
2013-02-16 12:50     ` Prabhakar Lad
2013-02-16 12:50       ` Prabhakar Lad
2013-02-16 19:18       ` Sekhar Nori
2013-02-16 19:18         ` Sekhar Nori
2013-02-16  9:28   ` [RFC PATCH 06/18] davinci: replace V4L2_OUT_CAP_CUSTOM_TIMINGS by V4L2_OUT_CAP_DV_TIMINGS Hans Verkuil
2013-02-16 12:58     ` Prabhakar Lad
2013-02-16 12:58       ` Prabhakar Lad
2013-02-16 19:23       ` Sekhar Nori
2013-02-16 19:23         ` Sekhar Nori
2013-02-16 19:33         ` Hans Verkuil
2013-02-16 19:33           ` Hans Verkuil
2013-02-19 10:47           ` Sekhar Nori
2013-02-19 10:47             ` Sekhar Nori
2013-02-16  9:28   ` [RFC PATCH 07/18] blackfin: replace V4L2_IN/OUT_CAP_CUSTOM_TIMINGS by DV_TIMINGS Hans Verkuil
2013-02-16 13:39     ` Scott Jiang
2013-02-16  9:28   ` [RFC PATCH 08/18] s5p-tv: add dv_timings support for mixer_video Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 09/18] s5p-tv: add dv_timings support for hdmi Hans Verkuil
2013-03-01 11:01     ` Tomasz Stanislawski
2013-02-16  9:28   ` [RFC PATCH 10/18] s5p-tv: add dv_timings support for hdmiphy Hans Verkuil
2013-03-01 11:02     ` Tomasz Stanislawski
2013-03-01 11:25       ` Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 11/18] s5p-tv: remove dv_preset support from mixer_video Hans Verkuil
2013-03-01 11:02     ` Tomasz Stanislawski
2013-02-16  9:28   ` [RFC PATCH 12/18] s5p-tv: remove the dv_preset API from hdmi Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 13/18] s5p-tv: remove the dv_preset API from hdmiphy Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 14/18] v4l2-common: remove obsolete v4l_fill_dv_preset_info Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 15/18] v4l2-subdev: remove obsolete dv_preset ops Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 16/18] v4l2 core: remove the obsolete dv_preset support Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 17/18] DocBook/media/v4l: remove the documentation of the obsolete dv_preset API Hans Verkuil
2013-02-16  9:28   ` [RFC PATCH 18/18] videodev2.h: remove obsolete DV_PRESET API Hans Verkuil
2013-02-16 13:12   ` [RFC PATCH 01/18] tvp7002: replace 'preset' by 'timings' in various structs/variables Prabhakar Lad
2013-03-01 11:01 ` [RFC PATCH 00/18] Remove DV_PRESET API Tomasz Stanislawski
2013-03-01 11:32   ` Hans Verkuil

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.