public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification"
@ 2015-06-06 22:26 Ezequiel Garcia
  2015-06-06 22:26 ` [PATCH v2 1/2] stk1160: Reduce driver verbosity Ezequiel Garcia
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ezequiel Garcia @ 2015-06-06 22:26 UTC (permalink / raw)
  To: linux-media, Hans Verkuil; +Cc: dale.hamel, michael, Ezequiel Garcia

I've removed the driver verbosity and fixed the frame scale implementation.
In addition to the usual mplayer/vlc/qv4l2, it's tested with v4l2-compliance
on 4.1-rc4.

v4l2-compliance passes:
Total: 111, Succeeded: 111, Failed: 0, Warnings: 5

v4l2-compliance -s shows some failures, but AFAICS it's not the
driver's fault as the failing ioclt are handled by generic
implementations (vb2_ioctl_reqbufs):

	test MMAP: FAIL
		VIDIOC_QUERYCAP returned 0 (Success)
		VIDIOC_QUERY_EXT_CTRL returned 0 (Success)
		VIDIOC_TRY_EXT_CTRLS returned 0 (Success)
		VIDIOC_QUERYCTRL returned 0 (Success)
		VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)
		VIDIOC_REQBUFS returned -1 (Device or resource busy)
		fail: v4l2-test-buffers.cpp(976): ret != EINVAL
	test USERPTR: FAIL
		VIDIOC_QUERYCAP returned 0 (Success)
		VIDIOC_QUERY_EXT_CTRL returned 0 (Success)
		VIDIOC_TRY_EXT_CTRLS returned 0 (Success)
		VIDIOC_QUERYCTRL returned 0 (Success)
		VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)
		VIDIOC_REQBUFS returned -1 (Invalid argument)
	test DMABUF: OK (Not Supported)
		VIDIOC_QUERYCAP returned 0 (Success)
		VIDIOC_QUERY_EXT_CTRL returned 0 (Success)
		VIDIOC_TRY_EXT_CTRLS returned 0 (Success)
		VIDIOC_QUERYCTRL returned 0 (Success)
		VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)

Total: 115, Succeeded: 113, Failed: 2, Warnings: 5

Thanks,

Ezequiel Garcia (2):
  stk1160: Reduce driver verbosity
  stk1160: Add frame scaling support

 drivers/media/usb/stk1160/stk1160-core.c |   5 +-
 drivers/media/usb/stk1160/stk1160-reg.h  |  34 ++++++
 drivers/media/usb/stk1160/stk1160-v4l.c  | 203 +++++++++++++++++++++++++------
 drivers/media/usb/stk1160/stk1160.h      |   1 -
 4 files changed, 202 insertions(+), 41 deletions(-)

-- 
2.3.3


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

* [PATCH v2 1/2] stk1160: Reduce driver verbosity
  2015-06-06 22:26 [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Ezequiel Garcia
@ 2015-06-06 22:26 ` Ezequiel Garcia
  2015-06-06 22:26 ` [PATCH v2 2/2] stk1160: Add frame scaling support Ezequiel Garcia
  2015-06-08 10:02 ` [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Hans Verkuil
  2 siblings, 0 replies; 6+ messages in thread
From: Ezequiel Garcia @ 2015-06-06 22:26 UTC (permalink / raw)
  To: linux-media, Hans Verkuil; +Cc: dale.hamel, michael, Ezequiel Garcia

These messages are not really informational, and just makes the driver's
output too verbose. This commit changes some messages to a debug level,
removes a really useless "driver loaded" message and finally undefines
the DEBUG macro.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 drivers/media/usb/stk1160/stk1160-core.c |  5 +----
 drivers/media/usb/stk1160/stk1160-v4l.c  | 16 ++++++++--------
 drivers/media/usb/stk1160/stk1160.h      |  1 -
 3 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c
index 03504dc..1b6836f 100644
--- a/drivers/media/usb/stk1160/stk1160-core.c
+++ b/drivers/media/usb/stk1160/stk1160-core.c
@@ -162,7 +162,7 @@ static void stk1160_release(struct v4l2_device *v4l2_dev)
 {
 	struct stk1160 *dev = container_of(v4l2_dev, struct stk1160, v4l2_dev);
 
-	stk1160_info("releasing all resources\n");
+	stk1160_dbg("releasing all resources\n");
 
 	stk1160_i2c_unregister(dev);
 
@@ -363,9 +363,6 @@ static int stk1160_probe(struct usb_interface *interface,
 	dev->sd_saa7115 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap,
 		"saa7115_auto", 0, saa7113_addrs);
 
-	stk1160_info("driver ver %s successfully loaded\n",
-		STK1160_VERSION);
-
 	/* i2c reset saa711x */
 	v4l2_device_call_all(&dev->v4l2_dev, 0, core, reset, 0);
 	v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_stream, 0);
diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c
index 749ad56..498bdc7 100644
--- a/drivers/media/usb/stk1160/stk1160-v4l.c
+++ b/drivers/media/usb/stk1160/stk1160-v4l.c
@@ -136,7 +136,7 @@ static bool stk1160_set_alternate(struct stk1160 *dev)
 			dev->alt = i;
 	}
 
-	stk1160_info("setting alternate %d\n", dev->alt);
+	stk1160_dbg("setting alternate %d\n", dev->alt);
 
 	if (dev->alt != prev_alt) {
 		stk1160_dbg("minimum isoc packet size: %u (alt=%d)\n",
@@ -224,7 +224,7 @@ static void stk1160_stop_hw(struct stk1160 *dev)
 
 	/* set alternate 0 */
 	dev->alt = 0;
-	stk1160_info("setting alternate %d\n", dev->alt);
+	stk1160_dbg("setting alternate %d\n", dev->alt);
 	usb_set_interface(dev->udev, 0, 0);
 
 	/* Stop stk1160 */
@@ -537,8 +537,8 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *v4l_fmt,
 
 	sizes[0] = size;
 
-	stk1160_info("%s: buffer count %d, each %ld bytes\n",
-			__func__, *nbuffers, size);
+	stk1160_dbg("%s: buffer count %d, each %ld bytes\n",
+		    __func__, *nbuffers, size);
 
 	return 0;
 }
@@ -622,8 +622,8 @@ void stk1160_clear_queue(struct stk1160 *dev)
 			struct stk1160_buffer, list);
 		list_del(&buf->list);
 		vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
-		stk1160_info("buffer [%p/%d] aborted\n",
-				buf, buf->vb.v4l2_buf.index);
+		stk1160_dbg("buffer [%p/%d] aborted\n",
+			    buf, buf->vb.v4l2_buf.index);
 	}
 
 	/* It's important to release the current buffer */
@@ -632,8 +632,8 @@ void stk1160_clear_queue(struct stk1160 *dev)
 		dev->isoc_ctl.buf = NULL;
 
 		vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
-		stk1160_info("buffer [%p/%d] aborted\n",
-				buf, buf->vb.v4l2_buf.index);
+		stk1160_dbg("buffer [%p/%d] aborted\n",
+			    buf, buf->vb.v4l2_buf.index);
 	}
 	spin_unlock_irqrestore(&dev->buf_lock, flags);
 }
diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h
index abdea48..77f5d46 100644
--- a/drivers/media/usb/stk1160/stk1160.h
+++ b/drivers/media/usb/stk1160/stk1160.h
@@ -58,7 +58,6 @@
  * new drivers should use.
  *
  */
-#define DEBUG
 #ifdef DEBUG
 #define stk1160_dbg(fmt, args...) \
 	printk(KERN_DEBUG "stk1160: " fmt,  ## args)
-- 
2.3.3


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

* [PATCH v2 2/2] stk1160: Add frame scaling support
  2015-06-06 22:26 [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Ezequiel Garcia
  2015-06-06 22:26 ` [PATCH v2 1/2] stk1160: Reduce driver verbosity Ezequiel Garcia
@ 2015-06-06 22:26 ` Ezequiel Garcia
  2015-06-08 10:02 ` [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Hans Verkuil
  2 siblings, 0 replies; 6+ messages in thread
From: Ezequiel Garcia @ 2015-06-06 22:26 UTC (permalink / raw)
  To: linux-media, Hans Verkuil; +Cc: dale.hamel, michael, Ezequiel Garcia

This commit implements frame decimation for stk1160, which allows
to support format changes instead of a static frame size.

The stk1160 supports independent row and column decimation, in two
different modes:
 * set a number of rows/columns units to skip for each unit sent.
 * set a number of rows/columns units to send for each unit skipped.

This effectively allows to achieve different frame scaling ratios.

The unit number can be set to either two row/columns sent/skipped,
or four row/columns sent/skipped. Since the video format (UYVY)
has 4-bytes, using a unit number of two row/columns, results
in frame color 'shifting'.

Signed-off-by: Michael Stegemann <michael@stegemann.it>
Signed-off-by: Dale Hamel <dale.hamel@srvthe.net>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
Changes from v1:

  * Clamp width and height in stk1160_try_fmt, this guarantees
    sane values are given to the driver.

 drivers/media/usb/stk1160/stk1160-reg.h |  34 ++++++
 drivers/media/usb/stk1160/stk1160-v4l.c | 187 +++++++++++++++++++++++++++-----
 2 files changed, 193 insertions(+), 28 deletions(-)

diff --git a/drivers/media/usb/stk1160/stk1160-reg.h b/drivers/media/usb/stk1160/stk1160-reg.h
index 3e49da6..81ff3a1 100644
--- a/drivers/media/usb/stk1160/stk1160-reg.h
+++ b/drivers/media/usb/stk1160/stk1160-reg.h
@@ -33,6 +33,40 @@
  */
 #define STK1160_DCTRL			0x100
 
+/*
+ * Decimation Control Register:
+ * Byte 104: Horizontal Decimation Line Unit Count
+ * Byte 105: Vertical Decimation Line Unit Count
+ * Byte 106: Decimation Control
+ * Bit 0 - Horizontal Decimation Control
+ *   0 Horizontal decimation is disabled.
+ *   1 Horizontal decimation is enabled.
+ * Bit 1 - Decimates Half or More Column
+ *   0 Decimates less than half from original column,
+ *     send count unit (0x105) before each unit skipped.
+ *   1 Decimates half or more from original column,
+ *     skip count unit (0x105) before each unit sent.
+ * Bit 2 - Vertical Decimation Control
+ *   0 Vertical decimation is disabled.
+ *   1 Vertical decimation is enabled.
+ * Bit 3 - Vertical Greater or Equal to Half
+ *   0 Decimates less than half from original row,
+ *     send count unit (0x105) before each unit skipped.
+ *   1 Decimates half or more from original row,
+ *     skip count unit (0x105) before each unit sent.
+ * Bit 4 - Decimation Unit
+ *  0 Decimation will work with 2 rows or columns per unit.
+ *  1 Decimation will work with 4 rows or columns per unit.
+ */
+#define STK1160_DMCTRL_H_UNITS		0x104
+#define STK1160_DMCTRL_V_UNITS		0x105
+#define STK1160_DMCTRL			0x106
+#define  STK1160_H_DEC_EN		BIT(0)
+#define  STK1160_H_DEC_MODE		BIT(1)
+#define  STK1160_V_DEC_EN		BIT(2)
+#define  STK1160_V_DEC_MODE		BIT(3)
+#define  STK1160_DEC_UNIT_SIZE		BIT(4)
+
 /* Capture Frame Start Position */
 #define STK116_CFSPO			0x110
 #define STK116_CFSPO_STX_L		0x110
diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c
index 498bdc7..167a5a0 100644
--- a/drivers/media/usb/stk1160/stk1160-v4l.c
+++ b/drivers/media/usb/stk1160/stk1160-v4l.c
@@ -42,6 +42,17 @@ static bool keep_buffers;
 module_param(keep_buffers, bool, 0644);
 MODULE_PARM_DESC(keep_buffers, "don't release buffers upon stop streaming");
 
+enum stk1160_decimate_mode {
+	STK1160_DECIMATE_MORE_THAN_HALF,
+	STK1160_DECIMATE_LESS_THAN_HALF,
+};
+
+struct stk1160_decimate_ctrl {
+	bool col_en, row_en;
+	enum stk1160_decimate_mode col_mode, row_mode;
+	unsigned int col_n, row_n;
+};
+
 /* supported video standards */
 static struct stk1160_fmt format[] = {
 	{
@@ -106,6 +117,37 @@ static void stk1160_set_std(struct stk1160 *dev)
 
 }
 
+static void stk1160_set_fmt(struct stk1160 *dev,
+			    struct stk1160_decimate_ctrl *ctrl)
+{
+	u32 val = 0;
+
+	if (ctrl) {
+		/*
+		 * Since the format is UYVY, the device must skip or send
+		 * a number of rows/columns multiple of four. This way, the
+		 * colour format is preserved. The STK1160_DEC_UNIT_SIZE bit
+		 * does exactly this.
+		 */
+		val |= STK1160_DEC_UNIT_SIZE;
+		val |= ctrl->col_en ? STK1160_H_DEC_EN : 0;
+		val |= ctrl->row_en ? STK1160_V_DEC_EN : 0;
+		val |= ctrl->col_mode == STK1160_DECIMATE_MORE_THAN_HALF ? STK1160_H_DEC_MODE : 0;
+		val |= ctrl->row_mode == STK1160_DECIMATE_MORE_THAN_HALF ? STK1160_V_DEC_MODE : 0;
+
+		/* Horizontal count units */
+		stk1160_write_reg(dev, STK1160_DMCTRL_H_UNITS, ctrl->col_n);
+		/* Vertical count units */
+		stk1160_write_reg(dev, STK1160_DMCTRL_V_UNITS, ctrl->row_n);
+
+		stk1160_dbg("decimate 0x%x, column units %d, row units %d\n",
+			    val, ctrl->col_n, ctrl->row_n);
+	}
+
+	/* Decimation control */
+	stk1160_write_reg(dev, STK1160_DMCTRL, val);
+}
+
 /*
  * Set a new alternate setting.
  * Returns true is dev->max_pkt_size has changed, false otherwise.
@@ -321,41 +363,137 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
 	return 0;
 }
 
-static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
-			struct v4l2_format *f)
+static int stk1160_try_fmt(struct stk1160 *dev, struct v4l2_format *f,
+			    struct stk1160_decimate_ctrl *ctrl)
 {
-	struct stk1160 *dev = video_drvdata(file);
+	unsigned int width, height;
+	unsigned int base_width, base_height;
+	unsigned int col_n, row_n;
+	enum stk1160_decimate_mode col_mode, row_mode;
+	bool col_en, row_en;
+
+	base_width = 720;
+	base_height = (dev->norm & V4L2_STD_525_60) ? 480 : 576;
+
+	/* Minimum width and height is 1% the frame size */
+	width = clamp_t(unsigned int, f->fmt.pix.width,
+			base_width / 100, base_width);
+	height = clamp_t(unsigned int, f->fmt.pix.height,
+			base_height / 100, base_height);
+
+	if (width == base_width) {
+		/* No decimation */
+		col_en = false;
+		col_mode = STK1160_DECIMATE_LESS_THAN_HALF;
+		col_n = 0;
+		f->fmt.pix.width = base_width;
+	} else if (width > base_width / 2) {
+		/*
+		 * The device will send count units for each
+		 * unit skipped. This means count unit is:
+		 *
+		 * n = width / (frame width - width)
+		 *
+		 * And the width is:
+		 *
+		 * width = (n / n + 1) * frame width
+		 */
+		col_en = true;
+		col_mode = STK1160_DECIMATE_LESS_THAN_HALF;
+		col_n = DIV_ROUND_CLOSEST(width, base_width - width);
+		f->fmt.pix.width = (base_width * col_n) / (col_n + 1);
 
-	/*
-	 * User can't choose size at his own will,
-	 * so we just return him the current size chosen
-	 * at standard selection.
-	 * TODO: Implement frame scaling?
-	 */
+	} else if (width <= base_width / 2) {
+
+		/*
+		 * The device will skip count units for each
+		 * unit sent. This means count is:
+		 *
+		 * n = (frame width / width) - 1
+		 *
+		 * And the width is:
+		 *
+		 * width = frame width / (n + 1)
+		 */
+		col_en = true;
+		col_mode = STK1160_DECIMATE_MORE_THAN_HALF;
+		col_n = DIV_ROUND_CLOSEST(base_width, width) - 1;
+		f->fmt.pix.width = base_width / (col_n + 1);
+	} else {
+		col_en = false;
+		col_mode = STK1160_DECIMATE_LESS_THAN_HALF;
+		col_n = 0;
+		f->fmt.pix.width = base_width;
+	}
+
+	if (height == base_height) {
+		row_en = false;
+		row_mode = STK1160_DECIMATE_LESS_THAN_HALF;
+		row_n = 0;
+		f->fmt.pix.height = base_height;
+	} else if (height > base_height / 2) {
+		row_en = true;
+		row_mode = STK1160_DECIMATE_LESS_THAN_HALF;
+		row_n = DIV_ROUND_CLOSEST(height, base_height - height);
+		f->fmt.pix.height = (base_height * row_n) / (row_n + 1);
+
+	} else if (height <= base_height / 2) {
+		row_en = true;
+		row_mode = STK1160_DECIMATE_MORE_THAN_HALF;
+		row_n = DIV_ROUND_CLOSEST(base_height, height) - 1;
+		f->fmt.pix.height = base_height / (row_n + 1);
+	} else {
+		row_en = false;
+		row_mode = STK1160_DECIMATE_LESS_THAN_HALF;
+		row_n = 0;
+		f->fmt.pix.height = base_height;
+	}
 
 	f->fmt.pix.pixelformat = dev->fmt->fourcc;
-	f->fmt.pix.width = dev->width;
-	f->fmt.pix.height = dev->height;
 	f->fmt.pix.field = V4L2_FIELD_INTERLACED;
-	f->fmt.pix.bytesperline = dev->width * 2;
-	f->fmt.pix.sizeimage = dev->height * f->fmt.pix.bytesperline;
+	f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
+	f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
 	f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
 
+	if (ctrl) {
+		ctrl->col_en = col_en;
+		ctrl->col_n = col_n;
+		ctrl->col_mode = col_mode;
+		ctrl->row_en = row_en;
+		ctrl->row_n = row_n;
+		ctrl->row_mode = row_mode;
+	}
+
+	stk1160_dbg("width %d, height %d\n",
+		    f->fmt.pix.width, f->fmt.pix.height);
 	return 0;
 }
 
+static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
+				  struct v4l2_format *f)
+{
+	struct stk1160 *dev = video_drvdata(file);
+
+	return stk1160_try_fmt(dev, f, NULL);
+}
+
 static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
 					struct v4l2_format *f)
 {
 	struct stk1160 *dev = video_drvdata(file);
 	struct vb2_queue *q = &dev->vb_vidq;
+	struct stk1160_decimate_ctrl ctrl;
+	int rc;
 
 	if (vb2_is_busy(q))
 		return -EBUSY;
 
-	vidioc_try_fmt_vid_cap(file, priv, f);
-
-	/* We don't support any format changes */
+	rc = stk1160_try_fmt(dev, f, &ctrl);
+	if (rc < 0)
+		return rc;
+	dev->width = f->fmt.pix.width;
+	dev->height = f->fmt.pix.height;
+	stk1160_set_fmt(dev, &ctrl);
 
 	return 0;
 }
@@ -391,22 +529,15 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id norm)
 		return -ENODEV;
 
 	/* We need to set this now, before we call stk1160_set_std */
+	dev->width = 720;
+	dev->height = (norm & V4L2_STD_525_60) ? 480 : 576;
 	dev->norm = norm;
 
-	/* This is taken from saa7115 video decoder */
-	if (dev->norm & V4L2_STD_525_60) {
-		dev->width = 720;
-		dev->height = 480;
-	} else if (dev->norm & V4L2_STD_625_50) {
-		dev->width = 720;
-		dev->height = 576;
-	} else {
-		stk1160_err("invalid standard\n");
-		return -EINVAL;
-	}
-
 	stk1160_set_std(dev);
 
+	/* Calling with NULL disables frame decimation */
+	stk1160_set_fmt(dev, NULL);
+
 	v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_std,
 			dev->norm);
 
-- 
2.3.3


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

* Re: [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification"
  2015-06-06 22:26 [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Ezequiel Garcia
  2015-06-06 22:26 ` [PATCH v2 1/2] stk1160: Reduce driver verbosity Ezequiel Garcia
  2015-06-06 22:26 ` [PATCH v2 2/2] stk1160: Add frame scaling support Ezequiel Garcia
@ 2015-06-08 10:02 ` Hans Verkuil
  2015-06-08 15:28   ` Ezequiel Garcia
  2 siblings, 1 reply; 6+ messages in thread
From: Hans Verkuil @ 2015-06-08 10:02 UTC (permalink / raw)
  To: Ezequiel Garcia, linux-media; +Cc: dale.hamel, michael

Hi Ezequiel,

On 06/07/2015 12:26 AM, Ezequiel Garcia wrote:
> I've removed the driver verbosity and fixed the frame scale implementation.
> In addition to the usual mplayer/vlc/qv4l2, it's tested with v4l2-compliance
> on 4.1-rc4.

I recommend you use the media_tree.git master branch: v4l2-compliance is always
in sync with that one.

I'm not getting the issues you show below with v4l2-compliance -s (although once
it starts streaming I get sequence errors, see the patch I posted that fixes that).

So use the media_tree master branch and use the latest v4l2-compliance. If you still
get the error you see below, then that needs to be investigated further, since I
don't see it.

However, testing with v4l2-compliance -f (which tests scaling) just stalls:

Test input 0:

Stream using all formats:
        test MMAP for Format UYVY, Frame Size 6x4:

It sits there until I press Ctrl-C.

This is NTSC input, BTW.

Regards,

	Hans

> 
> v4l2-compliance passes:
> Total: 111, Succeeded: 111, Failed: 0, Warnings: 5
> 
> v4l2-compliance -s shows some failures, but AFAICS it's not the
> driver's fault as the failing ioclt are handled by generic
> implementations (vb2_ioctl_reqbufs):
> 
> 	test MMAP: FAIL
> 		VIDIOC_QUERYCAP returned 0 (Success)
> 		VIDIOC_QUERY_EXT_CTRL returned 0 (Success)
> 		VIDIOC_TRY_EXT_CTRLS returned 0 (Success)
> 		VIDIOC_QUERYCTRL returned 0 (Success)
> 		VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)
> 		VIDIOC_REQBUFS returned -1 (Device or resource busy)
> 		fail: v4l2-test-buffers.cpp(976): ret != EINVAL
> 	test USERPTR: FAIL
> 		VIDIOC_QUERYCAP returned 0 (Success)
> 		VIDIOC_QUERY_EXT_CTRL returned 0 (Success)
> 		VIDIOC_TRY_EXT_CTRLS returned 0 (Success)
> 		VIDIOC_QUERYCTRL returned 0 (Success)
> 		VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)
> 		VIDIOC_REQBUFS returned -1 (Invalid argument)
> 	test DMABUF: OK (Not Supported)
> 		VIDIOC_QUERYCAP returned 0 (Success)
> 		VIDIOC_QUERY_EXT_CTRL returned 0 (Success)
> 		VIDIOC_TRY_EXT_CTRLS returned 0 (Success)
> 		VIDIOC_QUERYCTRL returned 0 (Success)
> 		VIDIOC_G_SELECTION returned -1 (Inappropriate ioctl for device)
> 
> Total: 115, Succeeded: 113, Failed: 2, Warnings: 5
> 
> Thanks,
> 
> Ezequiel Garcia (2):
>   stk1160: Reduce driver verbosity
>   stk1160: Add frame scaling support
> 
>  drivers/media/usb/stk1160/stk1160-core.c |   5 +-
>  drivers/media/usb/stk1160/stk1160-reg.h  |  34 ++++++
>  drivers/media/usb/stk1160/stk1160-v4l.c  | 203 +++++++++++++++++++++++++------
>  drivers/media/usb/stk1160/stk1160.h      |   1 -
>  4 files changed, 202 insertions(+), 41 deletions(-)
> 


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

* Re: [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification"
  2015-06-08 10:02 ` [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Hans Verkuil
@ 2015-06-08 15:28   ` Ezequiel Garcia
  2015-06-08 16:35     ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Ezequiel Garcia @ 2015-06-08 15:28 UTC (permalink / raw)
  To: Hans Verkuil, linux-media; +Cc: dale.hamel, michael



On 06/08/2015 07:02 AM, Hans Verkuil wrote:
> Hi Ezequiel,
> 
> On 06/07/2015 12:26 AM, Ezequiel Garcia wrote:
>> I've removed the driver verbosity and fixed the frame scale implementation.
>> In addition to the usual mplayer/vlc/qv4l2, it's tested with v4l2-compliance
>> on 4.1-rc4.
> 
> I recommend you use the media_tree.git master branch: v4l2-compliance is always
> in sync with that one.
> 
> I'm not getting the issues you show below with v4l2-compliance -s (although once
> it starts streaming I get sequence errors, see the patch I posted that fixes that).
> 
> So use the media_tree master branch and use the latest v4l2-compliance. If you still
> get the error you see below, then that needs to be investigated further, since I
> don't see it.
> 
> However, testing with v4l2-compliance -f (which tests scaling) just stalls:
> 
> Test input 0:
> 
> Stream using all formats:
>         test MMAP for Format UYVY, Frame Size 6x4:
> 
> It sits there until I press Ctrl-C.
> 
> This is NTSC input, BTW.
> 

Ouch, sorry about that. I'll re-run with latest v4l2-compliance.

You've marked the "stk1160: Reduce driver verbosity" also as
changes-requested. Do you want any changes on it? I don't think that
patch can introduce any issues, since it's just fixing the level of printks.

-- 
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar

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

* Re: [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification"
  2015-06-08 15:28   ` Ezequiel Garcia
@ 2015-06-08 16:35     ` Hans Verkuil
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Verkuil @ 2015-06-08 16:35 UTC (permalink / raw)
  To: Ezequiel Garcia, linux-media; +Cc: dale.hamel, michael

On 06/08/2015 05:28 PM, Ezequiel Garcia wrote:
> 
> 
> On 06/08/2015 07:02 AM, Hans Verkuil wrote:
>> Hi Ezequiel,
>>
>> On 06/07/2015 12:26 AM, Ezequiel Garcia wrote:
>>> I've removed the driver verbosity and fixed the frame scale implementation.
>>> In addition to the usual mplayer/vlc/qv4l2, it's tested with v4l2-compliance
>>> on 4.1-rc4.
>>
>> I recommend you use the media_tree.git master branch: v4l2-compliance is always
>> in sync with that one.
>>
>> I'm not getting the issues you show below with v4l2-compliance -s (although once
>> it starts streaming I get sequence errors, see the patch I posted that fixes that).
>>
>> So use the media_tree master branch and use the latest v4l2-compliance. If you still
>> get the error you see below, then that needs to be investigated further, since I
>> don't see it.
>>
>> However, testing with v4l2-compliance -f (which tests scaling) just stalls:
>>
>> Test input 0:
>>
>> Stream using all formats:
>>         test MMAP for Format UYVY, Frame Size 6x4:
>>
>> It sits there until I press Ctrl-C.
>>
>> This is NTSC input, BTW.
>>
> 
> Ouch, sorry about that. I'll re-run with latest v4l2-compliance.
> 
> You've marked the "stk1160: Reduce driver verbosity" also as
> changes-requested. Do you want any changes on it? I don't think that
> patch can introduce any issues, since it's just fixing the level of printks.
> 

No, that one is OK. I expect you'll repost the patch series anyway.

Regards,

	Hans

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

end of thread, other threads:[~2015-06-08 16:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-06 22:26 [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Ezequiel Garcia
2015-06-06 22:26 ` [PATCH v2 1/2] stk1160: Reduce driver verbosity Ezequiel Garcia
2015-06-06 22:26 ` [PATCH v2 2/2] stk1160: Add frame scaling support Ezequiel Garcia
2015-06-08 10:02 ` [PATCH v2 0/2] stk1160: Frame scaling and "de-verbosification" Hans Verkuil
2015-06-08 15:28   ` Ezequiel Garcia
2015-06-08 16:35     ` Hans Verkuil

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