Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463456

Re: [PATCH v4 04/13] media: platform: pxa_camera: convert to vb2

From Robert Jarzmik <robert.jarzmik@free.fr>
Newsgroups linux.kernel
Subject Re: [PATCH v4 04/13] media: platform: pxa_camera: convert to vb2
Date 2016-08-16 08:40 +0200
Message-ID <s6Gcy-80i-19@gated-at.bofh.it> (permalink)
References <s6vqN-14k-3@gated-at.bofh.it> <s6vqO-14k-41@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Robert Jarzmik <robert.jarzmik@free.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@free.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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4 04/13] media: platform: pxa_camera: convert to vb2 Robert Jarzmik <robert.jarzmik@free.fr> - 2016-08-15 21:10 +0200
  Re: [PATCH v4 04/13] media: platform: pxa_camera: convert to vb2 Robert Jarzmik <robert.jarzmik@free.fr> - 2016-08-16 08:40 +0200

csiph-web