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] [day] [month] [year] [list]
Date:	Tue, 16 Aug 2016 08:32:15 +0200
From:	Robert Jarzmik <robert.jarzmik@...e.fr>
To:	Hans Verkuil <hverkuil@...all.nl>,
	Mauro Carvalho Chehab <mchehab@...nel.org>
Cc:	Guennadi Liakhovetski <g.liakhovetski@....de>,
	Jiri Kosina <trivial@...nel.org>, linux-kernel@...r.kernel.org,
	linux-media@...r.kernel.org
Subject: Re: [PATCH v4 04/13] media: platform: pxa_camera: convert to vb2

Robert Jarzmik <robert.jarzmik@...e.fr> writes:

> Convert pxa_camera from videobuf to videobuf2.
>
> As the soc_camera was already compatible with videobuf2, the port is
> quite straightforward.
>
> The special case of this code in which the vb2 to prepare is "too
> big" in terms of size for the new capture format, the pxa_camera will
> fail.
>
> Signed-off-by: Robert Jarzmik <robert.jarzmik@...e.fr>
...zip...

> diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c
> index 2aaf4a8f71a0..5bf97c6b6810 100644
> --- a/drivers/media/platform/soc_camera/pxa_camera.c
> +++ b/drivers/media/platform/soc_camera/pxa_camera.c
> -static void pxa_camera_init_videobuf(struct videobuf_queue *q,
> -			      struct soc_camera_device *icd)
> +static int pxa_camera_init_videobuf2(struct vb2_queue *vq,
> +				     struct soc_camera_device *icd)
>  {
>  	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
>  	struct pxa_camera_dev *pcdev = ici->priv;
> +	int ret;
>  
> -	/*
> -	 * We must pass NULL as dev pointer, then all pci_* dma operations
> -	 * transform to normal dma_* ones.
> -	 */
> -	videobuf_queue_sg_init(q, &pxa_videobuf_ops, NULL, &pcdev->lock,
> -				V4L2_BUF_TYPE_VIDEO_CAPTURE, V4L2_FIELD_NONE,
> -				sizeof(struct pxa_buffer), icd, &ici->host_lock);
> +	vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
> +	vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> +	vq->drv_priv = pcdev;
> +	vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> +	vq->buf_struct_size = sizeof(struct pxa_buffer);
> +	vq->dev = pcdev->v4l2_dev.dev;

This last line breaks bisectability as the v4l2_dev only appears in patch 10
... I'm afraid at least this will trigger a v5 respin of the patches.

Cheers.

--
Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ