lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 18 Mar 2013 09:29:07 +0100
From:	Hans Verkuil <hverkuil@...all.nl>
To:	Jon Arne Jørgensen <jonarne@...arne.no>
Cc:	linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
	elezegarcia@...il.com
Subject: Re: [RFC V1 4/8] smi2021: Add smi2021_v4l2.c

On Thu March 14 2013 15:07:00 Jon Arne Jørgensen wrote:
> This file is responsible for registering the device with the v4l2 subsystem,
> and the communication with v4l2.
> Most of the v4l2 ioctls are just passed on to vidbuf2.
> 
> Signed-off-by: Jon Arne Jørgensen <jonarne@...arne.no>
> ---
>  drivers/media/usb/smi2021/smi2021_v4l2.c | 566 +++++++++++++++++++++++++++++++
>  1 file changed, 566 insertions(+)
>  create mode 100644 drivers/media/usb/smi2021/smi2021_v4l2.c
> 
> diff --git a/drivers/media/usb/smi2021/smi2021_v4l2.c b/drivers/media/usb/smi2021/smi2021_v4l2.c
> new file mode 100644
> index 0000000..d402093
> --- /dev/null
> +++ b/drivers/media/usb/smi2021/smi2021_v4l2.c
> @@ -0,0 +1,566 @@

...

> +int smi2021_vb2_setup(struct smi2021_dev *dev)
> +{
> +	int rc;
> +	struct vb2_queue *q;
> +
> +	q = &dev->vb_vidq;
> +	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> +	q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR;
> +	q->drv_priv = dev;
> +	q->buf_struct_size = sizeof(struct smi2021_buffer);
> +	q->ops = &smi2021_video_qops;
> +	q->mem_ops = &vb2_vmalloc_memops;

q->timestamp_type isn't filled in.

For that matter, neither the sequence number nor the timestamp are filled in
in v4l2_buffer during capturing.

You need to add a buf_finish op to fill those in (use v4l2_timestamp() for the
timestamp).

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ