All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	airlied@redhat.com, m.szyprowski@samsung.com,
	kyungmin.park@samsung.com, sumit.semwal@ti.com,
	daeinki@gmail.com, daniel.vetter@ffwll.ch, robdclark@gmail.com,
	pawel@osciak.com, linaro-mm-sig@lists.linaro.org,
	hverkuil@xs4all.nl, remi@remlab.net, subashrp@gmail.com,
	mchehab@redhat.com, g.liakhovetski@gmx.de,
	Sumit Semwal <sumit.semwal@linaro.org>
Subject: Re: [PATCHv6 01/13] v4l: Add DMABUF as a memory type
Date: Mon, 28 May 2012 23:12:06 +0200	[thread overview]
Message-ID: <39362499.rezgOX57D6@avalon> (raw)
In-Reply-To: <1337775027-9489-2-git-send-email-t.stanislaws@samsung.com>

Hi Tomasz,

Thanks for the patch.

On Wednesday 23 May 2012 14:10:15 Tomasz Stanislawski wrote:
> From: Sumit Semwal <sumit.semwal@ti.com>
> 
> Adds DMABUF memory type to v4l framework. Also adds the related file
> descriptor in v4l2_plane and v4l2_buffer.

Sorry not to have caught this earlier, but haven't you forgotten to add 
support for V4L2_MEMORY_DMABUF to v4l2-compat-ioctl32.c ?

> Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
>    [original work in the PoC for buffer sharing]
> Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/video/v4l2-ioctl.c |    1 +
>  include/linux/videodev2.h        |    7 +++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/media/video/v4l2-ioctl.c
> b/drivers/media/video/v4l2-ioctl.c index 91be4e8..31fc2ad 100644
> --- a/drivers/media/video/v4l2-ioctl.c
> +++ b/drivers/media/video/v4l2-ioctl.c
> @@ -175,6 +175,7 @@ static const char *v4l2_memory_names[] = {
>  	[V4L2_MEMORY_MMAP]    = "mmap",
>  	[V4L2_MEMORY_USERPTR] = "userptr",
>  	[V4L2_MEMORY_OVERLAY] = "overlay",
> +	[V4L2_MEMORY_DMABUF] = "dmabuf",
>  };
> 
>  #define prt_names(a, arr) ((((a) >= 0) && ((a) < ARRAY_SIZE(arr))) ? \
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 370d111..51b20f4 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -185,6 +185,7 @@ enum v4l2_memory {
>  	V4L2_MEMORY_MMAP             = 1,
>  	V4L2_MEMORY_USERPTR          = 2,
>  	V4L2_MEMORY_OVERLAY          = 3,
> +	V4L2_MEMORY_DMABUF           = 4,
>  };
> 
>  /* see also http://vektor.theorem.ca/graphics/ycbcr/ */
> @@ -591,6 +592,8 @@ struct v4l2_requestbuffers {
>   *			should be passed to mmap() called on the video node)
>   * @userptr:		when memory is V4L2_MEMORY_USERPTR, a userspace pointer
>   *			pointing to this plane
> + * @fd:			when memory is V4L2_MEMORY_DMABUF, a userspace file
> + *			descriptor associated with this plane
>   * @data_offset:	offset in the plane to the start of data; usually 0,
>   *			unless there is a header in front of the data
>   *
> @@ -605,6 +608,7 @@ struct v4l2_plane {
>  	union {
>  		__u32		mem_offset;
>  		unsigned long	userptr;
> +		int		fd;
>  	} m;
>  	__u32			data_offset;
>  	__u32			reserved[11];
> @@ -629,6 +633,8 @@ struct v4l2_plane {
>   *		(or a "cookie" that should be passed to mmap() as offset)
>   * @userptr:	for non-multiplanar buffers with memory ==
> V4L2_MEMORY_USERPTR; *		a userspace pointer pointing to this buffer
> + * @fd:		for non-multiplanar buffers with memory == 
V4L2_MEMORY_DMABUF;
> + *		a userspace file descriptor associated with this buffer
>   * @planes:	for multiplanar buffers; userspace pointer to the array of
> plane *		info structs for this buffer
>   * @length:	size in bytes of the buffer (NOT its payload) for single-
plane
> @@ -655,6 +661,7 @@ struct v4l2_buffer {
>  		__u32           offset;
>  		unsigned long   userptr;
>  		struct v4l2_plane *planes;
> +		int		fd;
>  	} m;
>  	__u32			length;
>  	__u32			input;
-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomasz Stanislawski <t.stanislaws@samsung.com>
Cc: pawel@osciak.com, mchehab@redhat.com, daniel.vetter@ffwll.ch,
	dri-devel@lists.freedesktop.org, subashrp@gmail.com,
	linaro-mm-sig@lists.linaro.org, kyungmin.park@samsung.com,
	airlied@redhat.com, remi@remlab.net, linux-media@vger.kernel.org,
	Sumit Semwal <sumit.semwal@linaro.org>,
	g.liakhovetski@gmx.de, m.szyprowski@samsung.com
Subject: Re: [PATCHv6 01/13] v4l: Add DMABUF as a memory type
Date: Mon, 28 May 2012 23:12:06 +0200	[thread overview]
Message-ID: <39362499.rezgOX57D6@avalon> (raw)
In-Reply-To: <1337775027-9489-2-git-send-email-t.stanislaws@samsung.com>

Hi Tomasz,

Thanks for the patch.

On Wednesday 23 May 2012 14:10:15 Tomasz Stanislawski wrote:
> From: Sumit Semwal <sumit.semwal@ti.com>
> 
> Adds DMABUF memory type to v4l framework. Also adds the related file
> descriptor in v4l2_plane and v4l2_buffer.

Sorry not to have caught this earlier, but haven't you forgotten to add 
support for V4L2_MEMORY_DMABUF to v4l2-compat-ioctl32.c ?

> Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
>    [original work in the PoC for buffer sharing]
> Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/video/v4l2-ioctl.c |    1 +
>  include/linux/videodev2.h        |    7 +++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/media/video/v4l2-ioctl.c
> b/drivers/media/video/v4l2-ioctl.c index 91be4e8..31fc2ad 100644
> --- a/drivers/media/video/v4l2-ioctl.c
> +++ b/drivers/media/video/v4l2-ioctl.c
> @@ -175,6 +175,7 @@ static const char *v4l2_memory_names[] = {
>  	[V4L2_MEMORY_MMAP]    = "mmap",
>  	[V4L2_MEMORY_USERPTR] = "userptr",
>  	[V4L2_MEMORY_OVERLAY] = "overlay",
> +	[V4L2_MEMORY_DMABUF] = "dmabuf",
>  };
> 
>  #define prt_names(a, arr) ((((a) >= 0) && ((a) < ARRAY_SIZE(arr))) ? \
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 370d111..51b20f4 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -185,6 +185,7 @@ enum v4l2_memory {
>  	V4L2_MEMORY_MMAP             = 1,
>  	V4L2_MEMORY_USERPTR          = 2,
>  	V4L2_MEMORY_OVERLAY          = 3,
> +	V4L2_MEMORY_DMABUF           = 4,
>  };
> 
>  /* see also http://vektor.theorem.ca/graphics/ycbcr/ */
> @@ -591,6 +592,8 @@ struct v4l2_requestbuffers {
>   *			should be passed to mmap() called on the video node)
>   * @userptr:		when memory is V4L2_MEMORY_USERPTR, a userspace pointer
>   *			pointing to this plane
> + * @fd:			when memory is V4L2_MEMORY_DMABUF, a userspace file
> + *			descriptor associated with this plane
>   * @data_offset:	offset in the plane to the start of data; usually 0,
>   *			unless there is a header in front of the data
>   *
> @@ -605,6 +608,7 @@ struct v4l2_plane {
>  	union {
>  		__u32		mem_offset;
>  		unsigned long	userptr;
> +		int		fd;
>  	} m;
>  	__u32			data_offset;
>  	__u32			reserved[11];
> @@ -629,6 +633,8 @@ struct v4l2_plane {
>   *		(or a "cookie" that should be passed to mmap() as offset)
>   * @userptr:	for non-multiplanar buffers with memory ==
> V4L2_MEMORY_USERPTR; *		a userspace pointer pointing to this buffer
> + * @fd:		for non-multiplanar buffers with memory == 
V4L2_MEMORY_DMABUF;
> + *		a userspace file descriptor associated with this buffer
>   * @planes:	for multiplanar buffers; userspace pointer to the array of
> plane *		info structs for this buffer
>   * @length:	size in bytes of the buffer (NOT its payload) for single-
plane
> @@ -655,6 +661,7 @@ struct v4l2_buffer {
>  		__u32           offset;
>  		unsigned long   userptr;
>  		struct v4l2_plane *planes;
> +		int		fd;
>  	} m;
>  	__u32			length;
>  	__u32			input;
-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2012-05-28 21:22 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23 12:10 [PATCHv6 00/13] Integration of videobuf2 with dmabuf Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 01/13] v4l: Add DMABUF as a memory type Tomasz Stanislawski
2012-05-28 21:12   ` Laurent Pinchart [this message]
2012-05-28 21:12     ` Laurent Pinchart
2012-05-23 12:10 ` [PATCHv6 02/13] Documentation: media: description of DMABUF importing in V4L2 Tomasz Stanislawski
2012-05-28 21:30   ` Laurent Pinchart
2012-05-23 12:10 ` [PATCHv6 03/13] v4l: vb2: add support for shared buffer (dma_buf) Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 04/13] v4l: vb: remove warnings about MEMORY_DMABUF Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 05/13] v4l: vb2-dma-contig: Shorten vb2_dma_contig prefix to vb2_dc Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 06/13] v4l: vb2-dma-contig: Remove unneeded allocation context structure Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 07/13] v4l: vb2-dma-contig: Reorder functions Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 08/13] v4l: vb2-dma-contig: add support for scatterlist in userptr mode Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 09/13] v4l: vb2: add prepare/finish callbacks to allocators Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 10/13] v4l: vb2-dma-contig: add prepare/finish to dma-contig allocator Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 11/13] v4l: vb2-dma-contig: add support for dma_buf importing Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 12/13] v4l: s5p-tv: mixer: support for dmabuf importing Tomasz Stanislawski
2012-05-23 12:10 ` [PATCHv6 13/13] v4l: s5p-fimc: " Tomasz Stanislawski
2012-05-28 22:25 ` [PATCHv6 00/13] Integration of videobuf2 with dmabuf Laurent Pinchart
2012-05-30 15:26   ` Semwal, Sumit
2012-06-04 19:34     ` [Linaro-mm-sig] " Rebecca Schultz Zavin
2012-06-04 20:28       ` Rob Clark
2012-06-04 20:46         ` Rebecca Schultz Zavin
2012-06-04 20:56           ` Rebecca Schultz Zavin
2012-06-04 21:04           ` Rob Clark
2012-06-04 21:58       ` Hans Verkuil
2012-06-05  3:36         ` Rebecca Schultz Zavin
2012-06-05  6:37         ` Hans Verkuil
2012-06-06  3:46       ` Laurent Pinchart
2012-06-06  8:17         ` Hans Verkuil
2012-06-07  0:52           ` Laurent Pinchart
2012-06-07  6:43             ` Hans Verkuil
2012-06-07 10:18               ` Sylwester Nawrocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39362499.rezgOX57D6@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=airlied@redhat.com \
    --cc=daeinki@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=hverkuil@xs4all.nl \
    --cc=kyungmin.park@samsung.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@redhat.com \
    --cc=pawel@osciak.com \
    --cc=remi@remlab.net \
    --cc=robdclark@gmail.com \
    --cc=subashrp@gmail.com \
    --cc=sumit.semwal@linaro.org \
    --cc=sumit.semwal@ti.com \
    --cc=t.stanislaws@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.