linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 09/15] dma-buf: Drop dma_buf_k(un)map
       [not found] <20191118103536.17675-1-daniel.vetter@ffwll.ch>
@ 2019-11-18 10:35 ` Daniel Vetter
  2019-11-18 10:35 ` [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support Daniel Vetter
  2019-11-18 10:35 ` [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks Daniel Vetter
  2 siblings, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-11-18 10:35 UTC (permalink / raw)
  To: DRI Development
  Cc: Intel Graphics Development, Daniel Vetter, Daniel Vetter,
	Sumit Semwal, linux-media, linaro-mm-sig

It's unused.

10 years ago, back when 32bit was still fairly common and trying to
not exhaust vmalloc space sounded like a worthwhile goal, adding these
to dma_buf made sense.

Reality is that they simply never caught on, and nowadays everyone who
needs plenty of buffers will run in 64bit mode anyway.

Also update the docs in this area to adjust them to reality.

The actual hooks in dma_buf_ops will be removed once all the
implementations are gone.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
---
 drivers/dma-buf/dma-buf.c | 63 ++-------------------------------------
 include/linux/dma-buf.h   |  2 --
 2 files changed, 3 insertions(+), 62 deletions(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index d377b4ca66bf..97988ce1d2dc 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -880,29 +880,9 @@ EXPORT_SYMBOL_GPL(dma_buf_unmap_attachment);
  *   with calls to dma_buf_begin_cpu_access() and dma_buf_end_cpu_access()
  *   access.
  *
- *   To support dma_buf objects residing in highmem cpu access is page-based
- *   using an api similar to kmap. Accessing a dma_buf is done in aligned chunks
- *   of PAGE_SIZE size. Before accessing a chunk it needs to be mapped, which
- *   returns a pointer in kernel virtual address space. Afterwards the chunk
- *   needs to be unmapped again. There is no limit on how often a given chunk
- *   can be mapped and unmapped, i.e. the importer does not need to call
- *   begin_cpu_access again before mapping the same chunk again.
- *
- *   Interfaces::
- *      void \*dma_buf_kmap(struct dma_buf \*, unsigned long);
- *      void dma_buf_kunmap(struct dma_buf \*, unsigned long, void \*);
- *
- *   Implementing the functions is optional for exporters and for importers all
- *   the restrictions of using kmap apply.
- *
- *   dma_buf kmap calls outside of the range specified in begin_cpu_access are
- *   undefined. If the range is not PAGE_SIZE aligned, kmap needs to succeed on
- *   the partial chunks at the beginning and end but may return stale or bogus
- *   data outside of the range (in these partial chunks).
- *
- *   For some cases the overhead of kmap can be too high, a vmap interface
- *   is introduced. This interface should be used very carefully, as vmalloc
- *   space is a limited resources on many architectures.
+ *   Since for most kernel internal dma-buf accesses need the entire buffer, a
+ *   vmap interface is introduced. Note that on very old 32-bit architectures
+ *   vmalloc space might be limited and result in vmap calls failing.
  *
  *   Interfaces::
  *      void \*dma_buf_vmap(struct dma_buf \*dmabuf)
@@ -1052,43 +1032,6 @@ int dma_buf_end_cpu_access(struct dma_buf *dmabuf,
 }
 EXPORT_SYMBOL_GPL(dma_buf_end_cpu_access);
 
-/**
- * dma_buf_kmap - Map a page of the buffer object into kernel address space. The
- * same restrictions as for kmap and friends apply.
- * @dmabuf:	[in]	buffer to map page from.
- * @page_num:	[in]	page in PAGE_SIZE units to map.
- *
- * This call must always succeed, any necessary preparations that might fail
- * need to be done in begin_cpu_access.
- */
-void *dma_buf_kmap(struct dma_buf *dmabuf, unsigned long page_num)
-{
-	WARN_ON(!dmabuf);
-
-	if (!dmabuf->ops->map)
-		return NULL;
-	return dmabuf->ops->map(dmabuf, page_num);
-}
-EXPORT_SYMBOL_GPL(dma_buf_kmap);
-
-/**
- * dma_buf_kunmap - Unmap a page obtained by dma_buf_kmap.
- * @dmabuf:	[in]	buffer to unmap page from.
- * @page_num:	[in]	page in PAGE_SIZE units to unmap.
- * @vaddr:	[in]	kernel space pointer obtained from dma_buf_kmap.
- *
- * This call must always succeed.
- */
-void dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long page_num,
-		    void *vaddr)
-{
-	WARN_ON(!dmabuf);
-
-	if (dmabuf->ops->unmap)
-		dmabuf->ops->unmap(dmabuf, page_num, vaddr);
-}
-EXPORT_SYMBOL_GPL(dma_buf_kunmap);
-
 
 /**
  * dma_buf_mmap - Setup up a userspace mmap with the given vma
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index af73f835c51c..7feb9c3805ae 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -464,8 +464,6 @@ int dma_buf_begin_cpu_access(struct dma_buf *dma_buf,
 			     enum dma_data_direction dir);
 int dma_buf_end_cpu_access(struct dma_buf *dma_buf,
 			   enum dma_data_direction dir);
-void *dma_buf_kmap(struct dma_buf *, unsigned long);
-void dma_buf_kunmap(struct dma_buf *, unsigned long, void *);
 
 int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
 		 unsigned long);
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support
       [not found] <20191118103536.17675-1-daniel.vetter@ffwll.ch>
  2019-11-18 10:35 ` [PATCH 09/15] dma-buf: Drop dma_buf_k(un)map Daniel Vetter
@ 2019-11-18 10:35 ` Daniel Vetter
  2019-11-18 10:58   ` Marek Szyprowski
  2019-11-18 11:02   ` Hans Verkuil
  2019-11-18 10:35 ` [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks Daniel Vetter
  2 siblings, 2 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-11-18 10:35 UTC (permalink / raw)
  To: DRI Development
  Cc: Intel Graphics Development, Daniel Vetter, Daniel Vetter,
	Pawel Osciak, Marek Szyprowski, Kyungmin Park, Tomasz Figa,
	linux-media

No in-tree users left.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Pawel Osciak <pawel@osciak.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Tomasz Figa <tfiga@chromium.org>
Cc: linux-media@vger.kernel.org
--
Ack for merging this through drm trees very much appreciated.
-Daniel
---
 drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8 --------
 drivers/media/common/videobuf2/videobuf2-dma-sg.c     | 8 --------
 drivers/media/common/videobuf2/videobuf2-vmalloc.c    | 8 --------
 3 files changed, 24 deletions(-)

diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
index 44cd0e530bbd..d0c9dffe49e5 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
@@ -335,13 +335,6 @@ static void vb2_dc_dmabuf_ops_release(struct dma_buf *dbuf)
 	vb2_dc_put(dbuf->priv);
 }
 
-static void *vb2_dc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
-{
-	struct vb2_dc_buf *buf = dbuf->priv;
-
-	return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL;
-}
-
 static void *vb2_dc_dmabuf_ops_vmap(struct dma_buf *dbuf)
 {
 	struct vb2_dc_buf *buf = dbuf->priv;
@@ -360,7 +353,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = {
 	.detach = vb2_dc_dmabuf_ops_detach,
 	.map_dma_buf = vb2_dc_dmabuf_ops_map,
 	.unmap_dma_buf = vb2_dc_dmabuf_ops_unmap,
-	.map = vb2_dc_dmabuf_ops_kmap,
 	.vmap = vb2_dc_dmabuf_ops_vmap,
 	.mmap = vb2_dc_dmabuf_ops_mmap,
 	.release = vb2_dc_dmabuf_ops_release,
diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
index ed706b2a263c..6db60e9d5183 100644
--- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c
+++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
@@ -470,13 +470,6 @@ static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf)
 	vb2_dma_sg_put(dbuf->priv);
 }
 
-static void *vb2_dma_sg_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
-{
-	struct vb2_dma_sg_buf *buf = dbuf->priv;
-
-	return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL;
-}
-
 static void *vb2_dma_sg_dmabuf_ops_vmap(struct dma_buf *dbuf)
 {
 	struct vb2_dma_sg_buf *buf = dbuf->priv;
@@ -495,7 +488,6 @@ static const struct dma_buf_ops vb2_dma_sg_dmabuf_ops = {
 	.detach = vb2_dma_sg_dmabuf_ops_detach,
 	.map_dma_buf = vb2_dma_sg_dmabuf_ops_map,
 	.unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap,
-	.map = vb2_dma_sg_dmabuf_ops_kmap,
 	.vmap = vb2_dma_sg_dmabuf_ops_vmap,
 	.mmap = vb2_dma_sg_dmabuf_ops_mmap,
 	.release = vb2_dma_sg_dmabuf_ops_release,
diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
index 04d51ca63223..4d5af352e249 100644
--- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c
+++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
@@ -319,13 +319,6 @@ static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf)
 	vb2_vmalloc_put(dbuf->priv);
 }
 
-static void *vb2_vmalloc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
-{
-	struct vb2_vmalloc_buf *buf = dbuf->priv;
-
-	return buf->vaddr + pgnum * PAGE_SIZE;
-}
-
 static void *vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf)
 {
 	struct vb2_vmalloc_buf *buf = dbuf->priv;
@@ -344,7 +337,6 @@ static const struct dma_buf_ops vb2_vmalloc_dmabuf_ops = {
 	.detach = vb2_vmalloc_dmabuf_ops_detach,
 	.map_dma_buf = vb2_vmalloc_dmabuf_ops_map,
 	.unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap,
-	.map = vb2_vmalloc_dmabuf_ops_kmap,
 	.vmap = vb2_vmalloc_dmabuf_ops_vmap,
 	.mmap = vb2_vmalloc_dmabuf_ops_mmap,
 	.release = vb2_vmalloc_dmabuf_ops_release,
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks
       [not found] <20191118103536.17675-1-daniel.vetter@ffwll.ch>
  2019-11-18 10:35 ` [PATCH 09/15] dma-buf: Drop dma_buf_k(un)map Daniel Vetter
  2019-11-18 10:35 ` [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support Daniel Vetter
@ 2019-11-18 10:35 ` Daniel Vetter
  2019-11-18 15:22   ` kbuild test robot
  2019-11-26 10:54   ` Daniel Vetter
  2 siblings, 2 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-11-18 10:35 UTC (permalink / raw)
  To: DRI Development
  Cc: Intel Graphics Development, Daniel Vetter, Daniel Vetter,
	Sumit Semwal, linux-media, linaro-mm-sig

All implementations are gone now.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: linux-media@vger.kernel.org
Cc: linaro-mm-sig@lists.linaro.org
---
 include/linux/dma-buf.h | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 7feb9c3805ae..abf5459a5b9d 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -249,31 +249,6 @@ struct dma_buf_ops {
 	 */
 	int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
 
-	/**
-	 * @map:
-	 *
-	 * Maps a page from the buffer into kernel address space. The page is
-	 * specified by offset into the buffer in PAGE_SIZE units.
-	 *
-	 * This callback is optional.
-	 *
-	 * Returns:
-	 *
-	 * Virtual address pointer where requested page can be accessed. NULL
-	 * on error or when this function is unimplemented by the exporter.
-	 */
-	void *(*map)(struct dma_buf *, unsigned long);
-
-	/**
-	 * @unmap:
-	 *
-	 * Unmaps a page from the buffer. Page offset and address pointer should
-	 * be the same as the one passed to and returned by matching call to map.
-	 *
-	 * This callback is optional.
-	 */
-	void (*unmap)(struct dma_buf *, unsigned long, void *);
-
 	void *(*vmap)(struct dma_buf *);
 	void (*vunmap)(struct dma_buf *, void *vaddr);
 };
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support
  2019-11-18 10:35 ` [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support Daniel Vetter
@ 2019-11-18 10:58   ` Marek Szyprowski
  2019-11-18 11:02   ` Hans Verkuil
  1 sibling, 0 replies; 9+ messages in thread
From: Marek Szyprowski @ 2019-11-18 10:58 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Pawel Osciak, Intel Graphics Development, Tomasz Figa,
	Kyungmin Park, Daniel Vetter, linux-media


On 18.11.2019 11:35, Daniel Vetter wrote:
> No in-tree users left.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Pawel Osciak <pawel@osciak.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Tomasz Figa <tfiga@chromium.org>
> Cc: linux-media@vger.kernel.org

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> --
> Ack for merging this through drm trees very much appreciated.
> -Daniel
> ---
>   drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8 --------
>   drivers/media/common/videobuf2/videobuf2-dma-sg.c     | 8 --------
>   drivers/media/common/videobuf2/videobuf2-vmalloc.c    | 8 --------
>   3 files changed, 24 deletions(-)
>
> diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
> index 44cd0e530bbd..d0c9dffe49e5 100644
> --- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
> +++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
> @@ -335,13 +335,6 @@ static void vb2_dc_dmabuf_ops_release(struct dma_buf *dbuf)
>   	vb2_dc_put(dbuf->priv);
>   }
>   
> -static void *vb2_dc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
> -{
> -	struct vb2_dc_buf *buf = dbuf->priv;
> -
> -	return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL;
> -}
> -
>   static void *vb2_dc_dmabuf_ops_vmap(struct dma_buf *dbuf)
>   {
>   	struct vb2_dc_buf *buf = dbuf->priv;
> @@ -360,7 +353,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = {
>   	.detach = vb2_dc_dmabuf_ops_detach,
>   	.map_dma_buf = vb2_dc_dmabuf_ops_map,
>   	.unmap_dma_buf = vb2_dc_dmabuf_ops_unmap,
> -	.map = vb2_dc_dmabuf_ops_kmap,
>   	.vmap = vb2_dc_dmabuf_ops_vmap,
>   	.mmap = vb2_dc_dmabuf_ops_mmap,
>   	.release = vb2_dc_dmabuf_ops_release,
> diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
> index ed706b2a263c..6db60e9d5183 100644
> --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c
> +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
> @@ -470,13 +470,6 @@ static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf)
>   	vb2_dma_sg_put(dbuf->priv);
>   }
>   
> -static void *vb2_dma_sg_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
> -{
> -	struct vb2_dma_sg_buf *buf = dbuf->priv;
> -
> -	return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL;
> -}
> -
>   static void *vb2_dma_sg_dmabuf_ops_vmap(struct dma_buf *dbuf)
>   {
>   	struct vb2_dma_sg_buf *buf = dbuf->priv;
> @@ -495,7 +488,6 @@ static const struct dma_buf_ops vb2_dma_sg_dmabuf_ops = {
>   	.detach = vb2_dma_sg_dmabuf_ops_detach,
>   	.map_dma_buf = vb2_dma_sg_dmabuf_ops_map,
>   	.unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap,
> -	.map = vb2_dma_sg_dmabuf_ops_kmap,
>   	.vmap = vb2_dma_sg_dmabuf_ops_vmap,
>   	.mmap = vb2_dma_sg_dmabuf_ops_mmap,
>   	.release = vb2_dma_sg_dmabuf_ops_release,
> diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
> index 04d51ca63223..4d5af352e249 100644
> --- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c
> +++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
> @@ -319,13 +319,6 @@ static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf)
>   	vb2_vmalloc_put(dbuf->priv);
>   }
>   
> -static void *vb2_vmalloc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
> -{
> -	struct vb2_vmalloc_buf *buf = dbuf->priv;
> -
> -	return buf->vaddr + pgnum * PAGE_SIZE;
> -}
> -
>   static void *vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf)
>   {
>   	struct vb2_vmalloc_buf *buf = dbuf->priv;
> @@ -344,7 +337,6 @@ static const struct dma_buf_ops vb2_vmalloc_dmabuf_ops = {
>   	.detach = vb2_vmalloc_dmabuf_ops_detach,
>   	.map_dma_buf = vb2_vmalloc_dmabuf_ops_map,
>   	.unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap,
> -	.map = vb2_vmalloc_dmabuf_ops_kmap,
>   	.vmap = vb2_vmalloc_dmabuf_ops_vmap,
>   	.mmap = vb2_vmalloc_dmabuf_ops_mmap,
>   	.release = vb2_vmalloc_dmabuf_ops_release,

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support
  2019-11-18 10:35 ` [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support Daniel Vetter
  2019-11-18 10:58   ` Marek Szyprowski
@ 2019-11-18 11:02   ` Hans Verkuil
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Verkuil @ 2019-11-18 11:02 UTC (permalink / raw)
  To: Daniel Vetter, DRI Development
  Cc: Intel Graphics Development, Daniel Vetter, Pawel Osciak,
	Marek Szyprowski, Kyungmin Park, Tomasz Figa, linux-media

On 11/18/19 11:35 AM, Daniel Vetter wrote:
> No in-tree users left.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

Thanks!

	Hans

> Cc: Pawel Osciak <pawel@osciak.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Tomasz Figa <tfiga@chromium.org>
> Cc: linux-media@vger.kernel.org
> --
> Ack for merging this through drm trees very much appreciated.
> -Daniel
> ---
>  drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8 --------
>  drivers/media/common/videobuf2/videobuf2-dma-sg.c     | 8 --------
>  drivers/media/common/videobuf2/videobuf2-vmalloc.c    | 8 --------
>  3 files changed, 24 deletions(-)
> 
> diff --git a/drivers/media/common/videobuf2/videobuf2-dma-contig.c b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
> index 44cd0e530bbd..d0c9dffe49e5 100644
> --- a/drivers/media/common/videobuf2/videobuf2-dma-contig.c
> +++ b/drivers/media/common/videobuf2/videobuf2-dma-contig.c
> @@ -335,13 +335,6 @@ static void vb2_dc_dmabuf_ops_release(struct dma_buf *dbuf)
>  	vb2_dc_put(dbuf->priv);
>  }
>  
> -static void *vb2_dc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
> -{
> -	struct vb2_dc_buf *buf = dbuf->priv;
> -
> -	return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL;
> -}
> -
>  static void *vb2_dc_dmabuf_ops_vmap(struct dma_buf *dbuf)
>  {
>  	struct vb2_dc_buf *buf = dbuf->priv;
> @@ -360,7 +353,6 @@ static const struct dma_buf_ops vb2_dc_dmabuf_ops = {
>  	.detach = vb2_dc_dmabuf_ops_detach,
>  	.map_dma_buf = vb2_dc_dmabuf_ops_map,
>  	.unmap_dma_buf = vb2_dc_dmabuf_ops_unmap,
> -	.map = vb2_dc_dmabuf_ops_kmap,
>  	.vmap = vb2_dc_dmabuf_ops_vmap,
>  	.mmap = vb2_dc_dmabuf_ops_mmap,
>  	.release = vb2_dc_dmabuf_ops_release,
> diff --git a/drivers/media/common/videobuf2/videobuf2-dma-sg.c b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
> index ed706b2a263c..6db60e9d5183 100644
> --- a/drivers/media/common/videobuf2/videobuf2-dma-sg.c
> +++ b/drivers/media/common/videobuf2/videobuf2-dma-sg.c
> @@ -470,13 +470,6 @@ static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf)
>  	vb2_dma_sg_put(dbuf->priv);
>  }
>  
> -static void *vb2_dma_sg_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
> -{
> -	struct vb2_dma_sg_buf *buf = dbuf->priv;
> -
> -	return buf->vaddr ? buf->vaddr + pgnum * PAGE_SIZE : NULL;
> -}
> -
>  static void *vb2_dma_sg_dmabuf_ops_vmap(struct dma_buf *dbuf)
>  {
>  	struct vb2_dma_sg_buf *buf = dbuf->priv;
> @@ -495,7 +488,6 @@ static const struct dma_buf_ops vb2_dma_sg_dmabuf_ops = {
>  	.detach = vb2_dma_sg_dmabuf_ops_detach,
>  	.map_dma_buf = vb2_dma_sg_dmabuf_ops_map,
>  	.unmap_dma_buf = vb2_dma_sg_dmabuf_ops_unmap,
> -	.map = vb2_dma_sg_dmabuf_ops_kmap,
>  	.vmap = vb2_dma_sg_dmabuf_ops_vmap,
>  	.mmap = vb2_dma_sg_dmabuf_ops_mmap,
>  	.release = vb2_dma_sg_dmabuf_ops_release,
> diff --git a/drivers/media/common/videobuf2/videobuf2-vmalloc.c b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
> index 04d51ca63223..4d5af352e249 100644
> --- a/drivers/media/common/videobuf2/videobuf2-vmalloc.c
> +++ b/drivers/media/common/videobuf2/videobuf2-vmalloc.c
> @@ -319,13 +319,6 @@ static void vb2_vmalloc_dmabuf_ops_release(struct dma_buf *dbuf)
>  	vb2_vmalloc_put(dbuf->priv);
>  }
>  
> -static void *vb2_vmalloc_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long pgnum)
> -{
> -	struct vb2_vmalloc_buf *buf = dbuf->priv;
> -
> -	return buf->vaddr + pgnum * PAGE_SIZE;
> -}
> -
>  static void *vb2_vmalloc_dmabuf_ops_vmap(struct dma_buf *dbuf)
>  {
>  	struct vb2_vmalloc_buf *buf = dbuf->priv;
> @@ -344,7 +337,6 @@ static const struct dma_buf_ops vb2_vmalloc_dmabuf_ops = {
>  	.detach = vb2_vmalloc_dmabuf_ops_detach,
>  	.map_dma_buf = vb2_vmalloc_dmabuf_ops_map,
>  	.unmap_dma_buf = vb2_vmalloc_dmabuf_ops_unmap,
> -	.map = vb2_vmalloc_dmabuf_ops_kmap,
>  	.vmap = vb2_vmalloc_dmabuf_ops_vmap,
>  	.mmap = vb2_vmalloc_dmabuf_ops_mmap,
>  	.release = vb2_vmalloc_dmabuf_ops_release,
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks
  2019-11-18 10:35 ` [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks Daniel Vetter
@ 2019-11-18 15:22   ` kbuild test robot
  2019-11-18 16:43     ` Daniel Vetter
  2019-11-26 10:54   ` Daniel Vetter
  1 sibling, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2019-11-18 15:22 UTC (permalink / raw)
  To: Daniel Vetter
  Cc: kbuild-all, DRI Development, Intel Graphics Development,
	Daniel Vetter, Daniel Vetter, Sumit Semwal, linux-media,
	linaro-mm-sig

[-- Attachment #1: Type: text/plain, Size: 4145 bytes --]

Hi Daniel,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v5.4-rc8 next-20191115]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Retire-dma_buf_k-un-map/20191118-184537
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
     .map    = kmap_udmabuf,
      ^~~
      mmap
>> drivers/dma-buf/udmabuf.c:114:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .map    = kmap_udmabuf,
               ^~~~~~~~~~~~
   drivers/dma-buf/udmabuf.c:114:12: note: (near initialization for 'udmabuf_ops.begin_cpu_access')
>> drivers/dma-buf/udmabuf.c:115:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
     .unmap    = kunmap_udmabuf,
      ^~~~~
      vunmap
   drivers/dma-buf/udmabuf.c:115:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .unmap    = kunmap_udmabuf,
                 ^~~~~~~~~~~~~~
   drivers/dma-buf/udmabuf.c:115:14: note: (near initialization for 'udmabuf_ops.end_cpu_access')
   cc1: some warnings being treated as errors
--
>> drivers/gpu/drm/udl/udl_dmabuf.c:169:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
     .map   = udl_dmabuf_kmap,
      ^~~
      mmap
>> drivers/gpu/drm/udl/udl_dmabuf.c:169:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .map   = udl_dmabuf_kmap,
              ^~~~~~~~~~~~~~~
   drivers/gpu/drm/udl/udl_dmabuf.c:169:11: note: (near initialization for 'udl_dmabuf_ops.release')
>> drivers/gpu/drm/udl/udl_dmabuf.c:170:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
     .unmap   = udl_dmabuf_kunmap,
      ^~~~~
      vunmap
   drivers/gpu/drm/udl/udl_dmabuf.c:170:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .unmap   = udl_dmabuf_kunmap,
                ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/udl/udl_dmabuf.c:170:13: note: (near initialization for 'udl_dmabuf_ops.begin_cpu_access')
   cc1: some warnings being treated as errors

vim +114 drivers/dma-buf/udmabuf.c

fbb0de79507819 Gerd Hoffmann 2018-08-27  109  
a34852891ba45d Gerd Hoffmann 2018-09-11  110  static const struct dma_buf_ops udmabuf_ops = {
fbb0de79507819 Gerd Hoffmann 2018-08-27  111  	.map_dma_buf	  = map_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27  112  	.unmap_dma_buf	  = unmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27  113  	.release	  = release_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 @114  	.map		  = kmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27 @115  	.unmap		  = kunmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27  116  	.mmap		  = mmap_udmabuf,
fbb0de79507819 Gerd Hoffmann 2018-08-27  117  };
fbb0de79507819 Gerd Hoffmann 2018-08-27  118  

:::::: The code at line 114 was first introduced by commit
:::::: fbb0de795078190a9834b3409e4b009cfb18a6d4 Add udmabuf misc device

:::::: TO: Gerd Hoffmann <kraxel@redhat.com>
:::::: CC: Gerd Hoffmann <kraxel@redhat.com>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51379 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks
  2019-11-18 15:22   ` kbuild test robot
@ 2019-11-18 16:43     ` Daniel Vetter
  2019-11-25  0:46       ` [kbuild-all] " Rong Chen
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel Vetter @ 2019-11-18 16:43 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, DRI Development, Intel Graphics Development,
	Daniel Vetter, Sumit Semwal,
	open list:DMA BUFFER SHARING FRAMEWORK,
	moderated list:DMA BUFFER SHARING FRAMEWORK

On Mon, Nov 18, 2019 at 4:23 PM kbuild test robot <lkp@intel.com> wrote:
>
> Hi Daniel,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on drm-intel/for-linux-next]
> [also build test ERROR on v5.4-rc8 next-20191115]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

Too old tree, on latest drm-tip this compiles since udl has lots its
own dma-buf implementation. Also, the patch set will start to compile
once linux-next is open for 5.6.

Cheers, Daniel

>
> url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Retire-dma_buf_k-un-map/20191118-184537
> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 7.4.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.4.0 make.cross ARCH=m68k
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>      .map    = kmap_udmabuf,
>       ^~~
>       mmap
> >> drivers/dma-buf/udmabuf.c:114:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .map    = kmap_udmabuf,
>                ^~~~~~~~~~~~
>    drivers/dma-buf/udmabuf.c:114:12: note: (near initialization for 'udmabuf_ops.begin_cpu_access')
> >> drivers/dma-buf/udmabuf.c:115:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>      .unmap    = kunmap_udmabuf,
>       ^~~~~
>       vunmap
>    drivers/dma-buf/udmabuf.c:115:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .unmap    = kunmap_udmabuf,
>                  ^~~~~~~~~~~~~~
>    drivers/dma-buf/udmabuf.c:115:14: note: (near initialization for 'udmabuf_ops.end_cpu_access')
>    cc1: some warnings being treated as errors
> --
> >> drivers/gpu/drm/udl/udl_dmabuf.c:169:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>      .map   = udl_dmabuf_kmap,
>       ^~~
>       mmap
> >> drivers/gpu/drm/udl/udl_dmabuf.c:169:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .map   = udl_dmabuf_kmap,
>               ^~~~~~~~~~~~~~~
>    drivers/gpu/drm/udl/udl_dmabuf.c:169:11: note: (near initialization for 'udl_dmabuf_ops.release')
> >> drivers/gpu/drm/udl/udl_dmabuf.c:170:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>      .unmap   = udl_dmabuf_kunmap,
>       ^~~~~
>       vunmap
>    drivers/gpu/drm/udl/udl_dmabuf.c:170:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>      .unmap   = udl_dmabuf_kunmap,
>                 ^~~~~~~~~~~~~~~~~
>    drivers/gpu/drm/udl/udl_dmabuf.c:170:13: note: (near initialization for 'udl_dmabuf_ops.begin_cpu_access')
>    cc1: some warnings being treated as errors
>
> vim +114 drivers/dma-buf/udmabuf.c
>
> fbb0de79507819 Gerd Hoffmann 2018-08-27  109
> a34852891ba45d Gerd Hoffmann 2018-09-11  110  static const struct dma_buf_ops udmabuf_ops = {
> fbb0de79507819 Gerd Hoffmann 2018-08-27  111    .map_dma_buf      = map_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  112    .unmap_dma_buf    = unmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  113    .release          = release_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27 @114    .map              = kmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27 @115    .unmap            = kunmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  116    .mmap             = mmap_udmabuf,
> fbb0de79507819 Gerd Hoffmann 2018-08-27  117  };
> fbb0de79507819 Gerd Hoffmann 2018-08-27  118
>
> :::::: The code at line 114 was first introduced by commit
> :::::: fbb0de795078190a9834b3409e4b009cfb18a6d4 Add udmabuf misc device
>
> :::::: TO: Gerd Hoffmann <kraxel@redhat.com>
> :::::: CC: Gerd Hoffmann <kraxel@redhat.com>
>
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [kbuild-all] Re: [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks
  2019-11-18 16:43     ` Daniel Vetter
@ 2019-11-25  0:46       ` Rong Chen
  0 siblings, 0 replies; 9+ messages in thread
From: Rong Chen @ 2019-11-25  0:46 UTC (permalink / raw)
  To: Daniel Vetter, kbuild test robot
  Cc: kbuild-all, DRI Development, Intel Graphics Development,
	Daniel Vetter, Sumit Semwal,
	open list:DMA BUFFER SHARING FRAMEWORK,
	moderated list:DMA BUFFER SHARING FRAMEWORK



On 11/19/19 12:43 AM, Daniel Vetter wrote:
> On Mon, Nov 18, 2019 at 4:23 PM kbuild test robot <lkp@intel.com> wrote:
>> Hi Daniel,
>>
>> I love your patch! Yet something to improve:
>>
>> [auto build test ERROR on drm-intel/for-linux-next]
>> [also build test ERROR on v5.4-rc8 next-20191115]
>> [if your patch is applied to the wrong git tree, please drop us a note to help
>> improve the system. BTW, we also suggest to use '--base' option to specify the
>> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
> Too old tree, on latest drm-tip this compiles since udl has lots its
> own dma-buf implementation. Also, the patch set will start to compile
> once linux-next is open for 5.6.
>
> Cheers, Daniel

Hi Daniel,

Thanks for clarifying, we'll take a look at the wrong base.

Best Regards,
Rong Chen

>
>> url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/Retire-dma_buf_k-un-map/20191118-184537
>> base:   git://anongit.freedesktop.org/drm-intel for-linux-next
>> config: m68k-allmodconfig (attached as .config)
>> compiler: m68k-linux-gcc (GCC) 7.4.0
>> reproduce:
>>          wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>>          chmod +x ~/bin/make.cross
>>          # save the attached .config to linux build tree
>>          GCC_VERSION=7.4.0 make.cross ARCH=m68k
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>>> drivers/dma-buf/udmabuf.c:114:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>>       .map    = kmap_udmabuf,
>>        ^~~
>>        mmap
>>>> drivers/dma-buf/udmabuf.c:114:12: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .map    = kmap_udmabuf,
>>                 ^~~~~~~~~~~~
>>     drivers/dma-buf/udmabuf.c:114:12: note: (near initialization for 'udmabuf_ops.begin_cpu_access')
>>>> drivers/dma-buf/udmabuf.c:115:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>>       .unmap    = kunmap_udmabuf,
>>        ^~~~~
>>        vunmap
>>     drivers/dma-buf/udmabuf.c:115:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .unmap    = kunmap_udmabuf,
>>                   ^~~~~~~~~~~~~~
>>     drivers/dma-buf/udmabuf.c:115:14: note: (near initialization for 'udmabuf_ops.end_cpu_access')
>>     cc1: some warnings being treated as errors
>> --
>>>> drivers/gpu/drm/udl/udl_dmabuf.c:169:3: error: 'const struct dma_buf_ops' has no member named 'map'; did you mean 'mmap'?
>>       .map   = udl_dmabuf_kmap,
>>        ^~~
>>        mmap
>>>> drivers/gpu/drm/udl/udl_dmabuf.c:169:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .map   = udl_dmabuf_kmap,
>>                ^~~~~~~~~~~~~~~
>>     drivers/gpu/drm/udl/udl_dmabuf.c:169:11: note: (near initialization for 'udl_dmabuf_ops.release')
>>>> drivers/gpu/drm/udl/udl_dmabuf.c:170:3: error: 'const struct dma_buf_ops' has no member named 'unmap'; did you mean 'vunmap'?
>>       .unmap   = udl_dmabuf_kunmap,
>>        ^~~~~
>>        vunmap
>>     drivers/gpu/drm/udl/udl_dmabuf.c:170:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>>       .unmap   = udl_dmabuf_kunmap,
>>                  ^~~~~~~~~~~~~~~~~
>>     drivers/gpu/drm/udl/udl_dmabuf.c:170:13: note: (near initialization for 'udl_dmabuf_ops.begin_cpu_access')
>>     cc1: some warnings being treated as errors
>>
>> vim +114 drivers/dma-buf/udmabuf.c
>>
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  109
>> a34852891ba45d Gerd Hoffmann 2018-09-11  110  static const struct dma_buf_ops udmabuf_ops = {
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  111    .map_dma_buf      = map_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  112    .unmap_dma_buf    = unmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  113    .release          = release_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27 @114    .map              = kmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27 @115    .unmap            = kunmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  116    .mmap             = mmap_udmabuf,
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  117  };
>> fbb0de79507819 Gerd Hoffmann 2018-08-27  118
>>
>> :::::: The code at line 114 was first introduced by commit
>> :::::: fbb0de795078190a9834b3409e4b009cfb18a6d4 Add udmabuf misc device
>>
>> :::::: TO: Gerd Hoffmann <kraxel@redhat.com>
>> :::::: CC: Gerd Hoffmann <kraxel@redhat.com>
>>
>> ---
>> 0-DAY kernel test infrastructure                 Open Source Technology Center
>> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
>
>


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks
  2019-11-18 10:35 ` [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks Daniel Vetter
  2019-11-18 15:22   ` kbuild test robot
@ 2019-11-26 10:54   ` Daniel Vetter
  1 sibling, 0 replies; 9+ messages in thread
From: Daniel Vetter @ 2019-11-26 10:54 UTC (permalink / raw)
  To: DRI Development
  Cc: Intel Graphics Development, Daniel Vetter, Daniel Vetter,
	Sumit Semwal, linux-media, linaro-mm-sig

On Mon, Nov 18, 2019 at 11:35:36AM +0100, Daniel Vetter wrote:
> All implementations are gone now.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Sumit Semwal <sumit.semwal@linaro.org>
> Cc: linux-media@vger.kernel.org
> Cc: linaro-mm-sig@lists.linaro.org

Applied the final two patches of this series now too.
-Daniel

> ---
>  include/linux/dma-buf.h | 25 -------------------------
>  1 file changed, 25 deletions(-)
> 
> diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
> index 7feb9c3805ae..abf5459a5b9d 100644
> --- a/include/linux/dma-buf.h
> +++ b/include/linux/dma-buf.h
> @@ -249,31 +249,6 @@ struct dma_buf_ops {
>  	 */
>  	int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
>  
> -	/**
> -	 * @map:
> -	 *
> -	 * Maps a page from the buffer into kernel address space. The page is
> -	 * specified by offset into the buffer in PAGE_SIZE units.
> -	 *
> -	 * This callback is optional.
> -	 *
> -	 * Returns:
> -	 *
> -	 * Virtual address pointer where requested page can be accessed. NULL
> -	 * on error or when this function is unimplemented by the exporter.
> -	 */
> -	void *(*map)(struct dma_buf *, unsigned long);
> -
> -	/**
> -	 * @unmap:
> -	 *
> -	 * Unmaps a page from the buffer. Page offset and address pointer should
> -	 * be the same as the one passed to and returned by matching call to map.
> -	 *
> -	 * This callback is optional.
> -	 */
> -	void (*unmap)(struct dma_buf *, unsigned long, void *);
> -
>  	void *(*vmap)(struct dma_buf *);
>  	void (*vunmap)(struct dma_buf *, void *vaddr);
>  };
> -- 
> 2.24.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-11-26 10:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191118103536.17675-1-daniel.vetter@ffwll.ch>
2019-11-18 10:35 ` [PATCH 09/15] dma-buf: Drop dma_buf_k(un)map Daniel Vetter
2019-11-18 10:35 ` [PATCH 11/15] media/videobuf2: Drop dma_buf->k(un)map support Daniel Vetter
2019-11-18 10:58   ` Marek Szyprowski
2019-11-18 11:02   ` Hans Verkuil
2019-11-18 10:35 ` [PATCH 15/15] dma-buf: Remove kernel map/unmap hooks Daniel Vetter
2019-11-18 15:22   ` kbuild test robot
2019-11-18 16:43     ` Daniel Vetter
2019-11-25  0:46       ` [kbuild-all] " Rong Chen
2019-11-26 10:54   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).