* [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes
@ 2013-02-16 10:18 Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
2013-03-29 20:10 ` [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Anatolij Gustschin
0 siblings, 2 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-02-16 10:18 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin
This patch series converts fsl-viu to the control framework and provides
some additional v4l2 compliance fixes.
Anatolij, are you able to test this?
Ideally I'd like to see the output of the v4l2-compliance tool (found in
the http://git.linuxtv.org/v4l-utils.git repository). I know that there are
remaining issues, especially with the fact that there can be one user at a
time only (very bad!) and some overlay issues. I can try to fix those, but
I need someone to test otherwise I won't bother.
Regards,
Hans
^ permalink raw reply [flat|nested] 8+ messages in thread
* [RFC PATCH 1/5] fsl-viu: convert to the control framework.
2013-02-16 10:18 [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Hans Verkuil
@ 2013-02-16 10:18 ` Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 2/5] fsl-viu: add device_caps support to querycap Hans Verkuil
` (3 more replies)
2013-03-29 20:10 ` [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Anatolij Gustschin
1 sibling, 4 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-02-16 10:18 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Interestingly enough, the existing control handling code basically did
nothing. At least the new code will inherit the controls from the
saa7115 driver.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/fsl-viu.c | 110 +++++---------------------------------
1 file changed, 14 insertions(+), 96 deletions(-)
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index 5f7db3f..4a46819 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -26,6 +26,7 @@
#include <media/v4l2-common.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
+#include <media/v4l2-ctrls.h>
#include <media/videobuf-dma-contig.h>
#define DRV_NAME "fsl_viu"
@@ -38,49 +39,6 @@
/* I2C address of video decoder chip is 0x4A */
#define VIU_VIDEO_DECODER_ADDR 0x25
-/* supported controls */
-static struct v4l2_queryctrl viu_qctrl[] = {
- {
- .id = V4L2_CID_BRIGHTNESS,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Brightness",
- .minimum = 0,
- .maximum = 255,
- .step = 1,
- .default_value = 127,
- .flags = 0,
- }, {
- .id = V4L2_CID_CONTRAST,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Contrast",
- .minimum = 0,
- .maximum = 255,
- .step = 0x1,
- .default_value = 0x10,
- .flags = 0,
- }, {
- .id = V4L2_CID_SATURATION,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Saturation",
- .minimum = 0,
- .maximum = 255,
- .step = 0x1,
- .default_value = 127,
- .flags = 0,
- }, {
- .id = V4L2_CID_HUE,
- .type = V4L2_CTRL_TYPE_INTEGER,
- .name = "Hue",
- .minimum = -128,
- .maximum = 127,
- .step = 0x1,
- .default_value = 0,
- .flags = 0,
- }
-};
-
-static int qctl_regs[ARRAY_SIZE(viu_qctrl)];
-
static int info_level;
#define dprintk(level, fmt, arg...) \
@@ -154,6 +112,7 @@ struct viu_reg {
struct viu_dev {
struct v4l2_device v4l2_dev;
+ struct v4l2_ctrl_handler hdl;
struct mutex lock;
spinlock_t slock;
int users;
@@ -1006,51 +965,6 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
return 0;
}
-/* Controls */
-static int vidioc_queryctrl(struct file *file, void *priv,
- struct v4l2_queryctrl *qc)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(viu_qctrl); i++) {
- if (qc->id && qc->id == viu_qctrl[i].id) {
- memcpy(qc, &(viu_qctrl[i]), sizeof(*qc));
- return 0;
- }
- }
- return -EINVAL;
-}
-
-static int vidioc_g_ctrl(struct file *file, void *priv,
- struct v4l2_control *ctrl)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(viu_qctrl); i++) {
- if (ctrl->id == viu_qctrl[i].id) {
- ctrl->value = qctl_regs[i];
- return 0;
- }
- }
- return -EINVAL;
-}
-static int vidioc_s_ctrl(struct file *file, void *priv,
- struct v4l2_control *ctrl)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(viu_qctrl); i++) {
- if (ctrl->id == viu_qctrl[i].id) {
- if (ctrl->value < viu_qctrl[i].minimum
- || ctrl->value > viu_qctrl[i].maximum)
- return -ERANGE;
- qctl_regs[i] = ctrl->value;
- return 0;
- }
- }
- return -EINVAL;
-}
-
inline void viu_activate_next_buf(struct viu_dev *dev,
struct viu_dmaqueue *viuq)
{
@@ -1262,7 +1176,6 @@ static int viu_open(struct file *file)
struct viu_reg *vr;
int minor = vdev->minor;
u32 status_cfg;
- int i;
dprintk(1, "viu: open (minor=%d)\n", minor);
@@ -1300,10 +1213,6 @@ static int viu_open(struct file *file)
dev->crop_current.width = fh->width;
dev->crop_current.height = fh->height;
- /* Put all controls at a sane state */
- for (i = 0; i < ARRAY_SIZE(viu_qctrl); i++)
- qctl_regs[i] = viu_qctrl[i].default_value;
-
dprintk(1, "Open: fh=0x%08lx, dev=0x%08lx, dev->vidq=0x%08lx\n",
(unsigned long)fh, (unsigned long)dev,
(unsigned long)&dev->vidq);
@@ -1460,9 +1369,6 @@ static const struct v4l2_ioctl_ops viu_ioctl_ops = {
.vidioc_enum_input = vidioc_enum_input,
.vidioc_g_input = vidioc_g_input,
.vidioc_s_input = vidioc_s_input,
- .vidioc_queryctrl = vidioc_queryctrl,
- .vidioc_g_ctrl = vidioc_g_ctrl,
- .vidioc_s_ctrl = vidioc_s_ctrl,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
};
@@ -1540,6 +1446,16 @@ static int viu_of_probe(struct platform_device *op)
}
ad = i2c_get_adapter(0);
+
+ v4l2_ctrl_handler_init(&viu_dev->hdl, 5);
+ if (viu_dev->hdl.error) {
+ ret = viu_dev->hdl.error;
+ dev_err(&op->dev, "couldn't register control\n");
+ goto err_vdev;
+ }
+ /* This control handler will inherit the control(s) from the
+ sub-device(s). */
+ viu_dev->v4l2_dev.ctrl_handler = &viu_dev->hdl;
viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad,
"saa7113", VIU_VIDEO_DECODER_ADDR, NULL);
@@ -1607,6 +1523,7 @@ err_irq:
err_clk:
video_unregister_device(viu_dev->vdev);
err_vdev:
+ v4l2_ctrl_handler_free(&viu_dev->hdl);
mutex_unlock(&viu_dev->lock);
i2c_put_adapter(ad);
v4l2_device_unregister(&viu_dev->v4l2_dev);
@@ -1629,6 +1546,7 @@ static int viu_of_remove(struct platform_device *op)
clk_disable(dev->clk);
clk_put(dev->clk);
+ v4l2_ctrl_handler_free(&dev->hdl);
video_unregister_device(dev->vdev);
i2c_put_adapter(client->adapter);
v4l2_device_unregister(&dev->v4l2_dev);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RFC PATCH 2/5] fsl-viu: add device_caps support to querycap.
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
@ 2013-02-16 10:18 ` Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 3/5] fsl-viu: fill in colorspace, zero priv, always set field to interlaced Hans Verkuil
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-02-16 10:18 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Also fill in bus_info correctly.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/fsl-viu.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index 4a46819..1567878 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -561,10 +561,12 @@ static int vidioc_querycap(struct file *file, void *priv,
{
strcpy(cap->driver, "viu");
strcpy(cap->card, "viu");
- cap->capabilities = V4L2_CAP_VIDEO_CAPTURE |
+ strcpy(cap->bus_info, "platform:viu");
+ cap->device_caps = V4L2_CAP_VIDEO_CAPTURE |
V4L2_CAP_STREAMING |
V4L2_CAP_VIDEO_OVERLAY |
V4L2_CAP_READWRITE;
+ cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RFC PATCH 3/5] fsl-viu: fill in colorspace, zero priv, always set field to interlaced.
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 2/5] fsl-viu: add device_caps support to querycap Hans Verkuil
@ 2013-02-16 10:18 ` Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 4/5] fsl-viu: remove deprecated use of current_norm Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 5/5] fsl-viu: add prio and control event support Hans Verkuil
3 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-02-16 10:18 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
- fill in the missing colorspace value.
- the priv field of v4l2_pix_format must be zeroed.
- don't reject incorrect field values, always replace with a valid value.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/fsl-viu.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index 1567878..961fc72 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -595,6 +595,8 @@ static int vidioc_g_fmt_cap(struct file *file, void *priv,
f->fmt.pix.bytesperline =
(f->fmt.pix.width * fh->fmt->depth) >> 3;
f->fmt.pix.sizeimage = fh->sizeimage;
+ f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+ f->fmt.pix.priv = 0;
return 0;
}
@@ -602,7 +604,6 @@ static int vidioc_try_fmt_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct viu_fmt *fmt;
- enum v4l2_field field;
unsigned int maxw, maxh;
fmt = format_by_fourcc(f->fmt.pix.pixelformat);
@@ -612,19 +613,10 @@ static int vidioc_try_fmt_cap(struct file *file, void *priv,
return -EINVAL;
}
- field = f->fmt.pix.field;
-
- if (field == V4L2_FIELD_ANY) {
- field = V4L2_FIELD_INTERLACED;
- } else if (field != V4L2_FIELD_INTERLACED) {
- dprintk(1, "Field type invalid.\n");
- return -EINVAL;
- }
-
maxw = norm_maxw();
maxh = norm_maxh();
- f->fmt.pix.field = field;
+ f->fmt.pix.field = V4L2_FIELD_INTERLACED;
if (f->fmt.pix.height < 32)
f->fmt.pix.height = 32;
if (f->fmt.pix.height > maxh)
@@ -636,6 +628,8 @@ static int vidioc_try_fmt_cap(struct file *file, void *priv,
f->fmt.pix.width &= ~0x03;
f->fmt.pix.bytesperline =
(f->fmt.pix.width * fmt->depth) >> 3;
+ f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+ f->fmt.pix.priv = 0;
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RFC PATCH 4/5] fsl-viu: remove deprecated use of current_norm.
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 2/5] fsl-viu: add device_caps support to querycap Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 3/5] fsl-viu: fill in colorspace, zero priv, always set field to interlaced Hans Verkuil
@ 2013-02-16 10:18 ` Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 5/5] fsl-viu: add prio and control event support Hans Verkuil
3 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-02-16 10:18 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
It was pointless anyway since fsl-viu already implements g_std.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/fsl-viu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index 961fc72..c7c1295 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -1376,8 +1376,7 @@ static struct video_device viu_template = {
.ioctl_ops = &viu_ioctl_ops,
.release = video_device_release,
- .tvnorms = V4L2_STD_NTSC_M | V4L2_STD_PAL,
- .current_norm = V4L2_STD_NTSC_M,
+ .tvnorms = V4L2_STD_ALL,
};
static int viu_of_probe(struct platform_device *op)
@@ -1452,6 +1451,7 @@ static int viu_of_probe(struct platform_device *op)
/* This control handler will inherit the control(s) from the
sub-device(s). */
viu_dev->v4l2_dev.ctrl_handler = &viu_dev->hdl;
+ viu_dev->std = V4L2_STD_NTSC_M;
viu_dev->decoder = v4l2_i2c_new_subdev(&viu_dev->v4l2_dev, ad,
"saa7113", VIU_VIDEO_DECODER_ADDR, NULL);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [RFC PATCH 5/5] fsl-viu: add prio and control event support.
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
` (2 preceding siblings ...)
2013-02-16 10:18 ` [RFC PATCH 4/5] fsl-viu: remove deprecated use of current_norm Hans Verkuil
@ 2013-02-16 10:18 ` Hans Verkuil
3 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-02-16 10:18 UTC (permalink / raw)
To: linux-media; +Cc: Anatolij Gustschin, Hans Verkuil
From: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
drivers/media/platform/fsl-viu.c | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c
index c7c1295..1d27f5a 100644
--- a/drivers/media/platform/fsl-viu.c
+++ b/drivers/media/platform/fsl-viu.c
@@ -27,6 +27,8 @@
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
+#include <media/v4l2-fh.h>
+#include <media/v4l2-event.h>
#include <media/videobuf-dma-contig.h>
#define DRV_NAME "fsl_viu"
@@ -152,6 +154,8 @@ struct viu_dev {
};
struct viu_fh {
+ /* must remain the first field of this struct */
+ struct v4l2_fh fh;
struct viu_dev *dev;
/* video capture */
@@ -1199,6 +1203,7 @@ static int viu_open(struct file *file)
return -ENOMEM;
}
+ v4l2_fh_init(&fh->fh, vdev);
file->private_data = fh;
fh->dev = dev;
@@ -1234,6 +1239,7 @@ static int viu_open(struct file *file)
fh->type, V4L2_FIELD_INTERLACED,
sizeof(struct viu_buf), fh,
&fh->dev->lock);
+ v4l2_fh_add(&fh->fh);
mutex_unlock(&dev->lock);
return 0;
}
@@ -1266,13 +1272,17 @@ static unsigned int viu_poll(struct file *file, struct poll_table_struct *wait)
struct viu_fh *fh = file->private_data;
struct videobuf_queue *q = &fh->vb_vidq;
struct viu_dev *dev = fh->dev;
- unsigned int res;
+ unsigned long req_events = poll_requested_events(wait);
+ unsigned int res = v4l2_ctrl_poll(file, wait);
if (V4L2_BUF_TYPE_VIDEO_CAPTURE != fh->type)
return POLLERR;
+ if (!(req_events & (POLLIN | POLLRDNORM)))
+ return res;
+
mutex_lock(&dev->lock);
- res = videobuf_poll_stream(file, q, wait);
+ res |= videobuf_poll_stream(file, q, wait);
mutex_unlock(&dev->lock);
return res;
}
@@ -1287,6 +1297,8 @@ static int viu_release(struct file *file)
viu_stop_dma(dev);
videobuf_stop(&fh->vb_vidq);
videobuf_mmap_free(&fh->vb_vidq);
+ v4l2_fh_del(&fh->fh);
+ v4l2_fh_exit(&fh->fh);
mutex_unlock(&dev->lock);
kfree(fh);
@@ -1367,6 +1379,9 @@ static const struct v4l2_ioctl_ops viu_ioctl_ops = {
.vidioc_s_input = vidioc_s_input,
.vidioc_streamon = vidioc_streamon,
.vidioc_streamoff = vidioc_streamoff,
+ .vidioc_log_status = v4l2_ctrl_log_status,
+ .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
+ .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};
static struct video_device viu_template = {
@@ -1467,9 +1482,10 @@ static int viu_of_probe(struct platform_device *op)
goto err_vdev;
}
- memcpy(vdev, &viu_template, sizeof(viu_template));
+ *vdev = viu_template;
vdev->v4l2_dev = &viu_dev->v4l2_dev;
+ set_bit(V4L2_FL_USE_FH_PRIO, &vdev->flags);
viu_dev->vdev = vdev;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes
2013-02-16 10:18 [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
@ 2013-03-29 20:10 ` Anatolij Gustschin
2013-03-29 22:54 ` Hans Verkuil
1 sibling, 1 reply; 8+ messages in thread
From: Anatolij Gustschin @ 2013-03-29 20:10 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media
Hi Hans,
On Sat, 16 Feb 2013 11:18:22 +0100
Hans Verkuil <hverkuil@xs4all.nl> wrote:
> This patch series converts fsl-viu to the control framework and provides
> some additional v4l2 compliance fixes.
>
> Anatolij, are you able to test this?
Sorry for long delay, finally managed to set up the board with recent kernel
to test the fsl-viu driver patches.
> Ideally I'd like to see the output of the v4l2-compliance tool (found in
> the http://git.linuxtv.org/v4l-utils.git repository). I know that there are
> remaining issues, especially with the fact that there can be one user at a
> time only (very bad!) and some overlay issues. I can try to fix those, but
> I need someone to test otherwise I won't bother.
Below is the output of the v4l2-compliance:
# v4l2-compliance -v -d 0
Driver Info:
Driver name : viu
Card type : viu
Bus info : platform:viu
Driver version: 3.9.0
Capabilities : 0x85000005
Video Capture
Video Overlay
Read/Write
Streaming
Device Capabilities
Device Caps : 0x05000005
Video Capture
Video Overlay
Read/Write
Streaming
Compliance test for device /dev/video0 (not using libv4l2):
Required ioctls:
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second video open: FAIL
Debug ioctls:
test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK
Input ioctls:
test VIDIOC_G/S_TUNER: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
fail: v4l2-test-input-output.cpp(415): could set input to invalid input 1
test VIDIOC_G/S/ENUMINPUT: FAIL
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Control ioctls:
info: checking v4l2_queryctrl of control 'User Controls' (0x00980001)
info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
info: checking v4l2_queryctrl of control 'Chroma AGC' (0x0098091d)
info: checking v4l2_queryctrl of control 'Chroma Gain' (0x00980924)
info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
info: checking v4l2_queryctrl of control 'Chroma AGC' (0x0098091d)
info: checking v4l2_queryctrl of control 'Chroma Gain' (0x00980924)
test VIDIOC_QUERYCTRL/MENU: OK
info: checking control 'User Controls' (0x00980001)
info: checking control 'Brightness' (0x00980900)
info: checking control 'Contrast' (0x00980901)
info: checking control 'Saturation' (0x00980902)
info: checking control 'Hue' (0x00980903)
info: checking control 'Chroma AGC' (0x0098091d)
info: checking control 'Chroma Gain' (0x00980924)
test VIDIOC_G/S_CTRL: OK
info: checking extended control 'User Controls' (0x00980001)
info: checking extended control 'Brightness' (0x00980900)
info: checking extended control 'Contrast' (0x00980901)
info: checking extended control 'Saturation' (0x00980902)
info: checking extended control 'Hue' (0x00980903)
info: checking extended control 'Chroma AGC' (0x0098091d)
info: checking extended control 'Chroma Gain' (0x00980924)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
info: checking control event 'User Controls' (0x00980001)
info: checking control event 'Brightness' (0x00980900)
info: checking control event 'Contrast' (0x00980901)
info: checking control event 'Saturation' (0x00980902)
info: checking control event 'Hue' (0x00980903)
info: checking control event 'Chroma AGC' (0x0098091d)
info: checking control event 'Chroma Gain' (0x00980924)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 7 Private Controls: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
Format ioctls:
fail: v4l2-test-formats.cpp(240): fmtdesc.pixelformat not set
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
test VIDIOC_G/S_PARM: OK
fail: v4l2-test-formats.cpp(339): !fmt.width || !fmt.height
test VIDIOC_G_FBUF: FAIL
fail: v4l2-test-formats.cpp(385): !pix.sizeimage
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
fail: v4l2-test-buffers.cpp(84): node->node2 == NULL
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
Total: 35, Succeeded: 29, Failed: 6, Warnings: 0
Thanks,
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes
2013-03-29 20:10 ` [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Anatolij Gustschin
@ 2013-03-29 22:54 ` Hans Verkuil
0 siblings, 0 replies; 8+ messages in thread
From: Hans Verkuil @ 2013-03-29 22:54 UTC (permalink / raw)
To: Anatolij Gustschin; +Cc: linux-media
On Fri March 29 2013 21:10:01 Anatolij Gustschin wrote:
> Hi Hans,
>
> On Sat, 16 Feb 2013 11:18:22 +0100
> Hans Verkuil <hverkuil@xs4all.nl> wrote:
>
> > This patch series converts fsl-viu to the control framework and provides
> > some additional v4l2 compliance fixes.
> >
> > Anatolij, are you able to test this?
>
> Sorry for long delay, finally managed to set up the board with recent kernel
> to test the fsl-viu driver patches.
Great! Thanks!
>
> > Ideally I'd like to see the output of the v4l2-compliance tool (found in
> > the http://git.linuxtv.org/v4l-utils.git repository). I know that there are
> > remaining issues, especially with the fact that there can be one user at a
> > time only (very bad!) and some overlay issues. I can try to fix those, but
> > I need someone to test otherwise I won't bother.
>
> Below is the output of the v4l2-compliance:
>
> # v4l2-compliance -v -d 0
> Driver Info:
> Driver name : viu
> Card type : viu
> Bus info : platform:viu
> Driver version: 3.9.0
> Capabilities : 0x85000005
> Video Capture
> Video Overlay
> Read/Write
> Streaming
> Device Capabilities
> Device Caps : 0x05000005
> Video Capture
> Video Overlay
> Read/Write
> Streaming
>
> Compliance test for device /dev/video0 (not using libv4l2):
>
> Required ioctls:
> test VIDIOC_QUERYCAP: OK
>
> Allow for multiple opens:
> test second video open: FAIL
>
> Debug ioctls:
> test VIDIOC_DBG_G_CHIP_IDENT: OK (Not Supported)
> test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
> test VIDIOC_LOG_STATUS: OK
>
> Input ioctls:
> test VIDIOC_G/S_TUNER: OK (Not Supported)
> test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
> test VIDIOC_ENUMAUDIO: OK (Not Supported)
> fail: v4l2-test-input-output.cpp(415): could set input to invalid input 1
> test VIDIOC_G/S/ENUMINPUT: FAIL
> test VIDIOC_G/S_AUDIO: OK (Not Supported)
> Inputs: 1 Audio Inputs: 0 Tuners: 0
>
> Output ioctls:
> test VIDIOC_G/S_MODULATOR: OK (Not Supported)
> test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
> test VIDIOC_ENUMAUDOUT: OK (Not Supported)
> test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
> test VIDIOC_G/S_AUDOUT: OK (Not Supported)
> Outputs: 0 Audio Outputs: 0 Modulators: 0
>
> Control ioctls:
> info: checking v4l2_queryctrl of control 'User Controls' (0x00980001)
> info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
> info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
> info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
> info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
> info: checking v4l2_queryctrl of control 'Chroma AGC' (0x0098091d)
> info: checking v4l2_queryctrl of control 'Chroma Gain' (0x00980924)
> info: checking v4l2_queryctrl of control 'Brightness' (0x00980900)
> info: checking v4l2_queryctrl of control 'Contrast' (0x00980901)
> info: checking v4l2_queryctrl of control 'Saturation' (0x00980902)
> info: checking v4l2_queryctrl of control 'Hue' (0x00980903)
> info: checking v4l2_queryctrl of control 'Chroma AGC' (0x0098091d)
> info: checking v4l2_queryctrl of control 'Chroma Gain' (0x00980924)
> test VIDIOC_QUERYCTRL/MENU: OK
> info: checking control 'User Controls' (0x00980001)
> info: checking control 'Brightness' (0x00980900)
> info: checking control 'Contrast' (0x00980901)
> info: checking control 'Saturation' (0x00980902)
> info: checking control 'Hue' (0x00980903)
> info: checking control 'Chroma AGC' (0x0098091d)
> info: checking control 'Chroma Gain' (0x00980924)
> test VIDIOC_G/S_CTRL: OK
> info: checking extended control 'User Controls' (0x00980001)
> info: checking extended control 'Brightness' (0x00980900)
> info: checking extended control 'Contrast' (0x00980901)
> info: checking extended control 'Saturation' (0x00980902)
> info: checking extended control 'Hue' (0x00980903)
> info: checking extended control 'Chroma AGC' (0x0098091d)
> info: checking extended control 'Chroma Gain' (0x00980924)
> test VIDIOC_G/S/TRY_EXT_CTRLS: OK
> info: checking control event 'User Controls' (0x00980001)
> info: checking control event 'Brightness' (0x00980900)
> info: checking control event 'Contrast' (0x00980901)
> info: checking control event 'Saturation' (0x00980902)
> info: checking control event 'Hue' (0x00980903)
> info: checking control event 'Chroma AGC' (0x0098091d)
> info: checking control event 'Chroma Gain' (0x00980924)
> test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
> test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
> Standard Controls: 7 Private Controls: 0
>
> Input/Output configuration ioctls:
> test VIDIOC_ENUM/G/S/QUERY_STD: OK
> test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
> test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
>
> Format ioctls:
> fail: v4l2-test-formats.cpp(240): fmtdesc.pixelformat not set
> test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL
> test VIDIOC_G/S_PARM: OK
> fail: v4l2-test-formats.cpp(339): !fmt.width || !fmt.height
> test VIDIOC_G_FBUF: FAIL
> fail: v4l2-test-formats.cpp(385): !pix.sizeimage
> test VIDIOC_G_FMT: FAIL
> test VIDIOC_TRY_FMT: OK (Not Supported)
> test VIDIOC_S_FMT: OK (Not Supported)
> test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
>
> Codec ioctls:
> test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
> test VIDIOC_G_ENC_INDEX: OK (Not Supported)
> test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
>
> Buffer ioctls:
> fail: v4l2-test-buffers.cpp(84): node->node2 == NULL
> test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
>
> Total: 35, Succeeded: 29, Failed: 6, Warnings: 0
OK, that's useful.
I have updated my fsl-viu tree to hopefully solve these remaining issues.
It's in the same place, but note that I have rebased it to the latest master.
There are two phases: commit 809f0db15a2d7aa708c3afeb4e766bad7121a8d5 ('fsl-viu:
small fixes') fixes a number of trivial mistakes, the remaining patches
after that attempt to fix the driver limitation that it can have only one open
filehandle at a time, which is quite bad.
However, that's a lot more work and it may well contain bugs, so if you
encounter problems with that, then try again with only the 'small fixes'
patch.
Thanks!
Hans
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-03-29 22:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-16 10:18 [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 1/5] fsl-viu: convert to the control framework Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 2/5] fsl-viu: add device_caps support to querycap Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 3/5] fsl-viu: fill in colorspace, zero priv, always set field to interlaced Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 4/5] fsl-viu: remove deprecated use of current_norm Hans Verkuil
2013-02-16 10:18 ` [RFC PATCH 5/5] fsl-viu: add prio and control event support Hans Verkuil
2013-03-29 20:10 ` [RFC PATCH 0/5] fsl-viu: v4l2 compliance fixes Anatolij Gustschin
2013-03-29 22:54 ` 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.