Re: [PATCH v2] dma-buf-map: Rename to iosys-map

2022-02-03 Thread Lucas De Marchi

On Wed, Feb 02, 2022 at 11:20:16AM +0100, Thomas Zimmermann wrote:

Hi

Am 02.02.22 um 10:11 schrieb Lucas De Marchi:


diff --git a/Documentation/driver-api/dma-buf.rst 
b/Documentation/driver-api/dma-buf.rst
index 2cd7db82d9fe..ea1e81894d7c 100644
--- a/Documentation/driver-api/dma-buf.rst
+++ b/Documentation/driver-api/dma-buf.rst
@@ -131,10 +131,10 @@ Kernel Functions and Structures Reference
 Buffer Mapping Helpers
 ~~
-.. kernel-doc:: include/linux/dma-buf-map.h
+.. kernel-doc:: include/linux/iosys-map.h
:doc: overview
-.. kernel-doc:: include/linux/dma-buf-map.h
+.. kernel-doc:: include/linux/iosys-map.h
:internal:


Should we move this section to a better place than dma-buf.rst? 
There's 'Bus-Independent Device Accesses' in 
Documentation/driver-api/device-io.rst. It describes all the I/O 
helpers and looks like a good fit.


Sounds like a good idea. I will include that in v3.
Cc'ing Jonathan and linux-doc, too.





 Reservation Objects
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 1b2372ef4131..ee842606e883 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -222,7 +222,7 @@ Convert drivers to use drm_fbdev_generic_setup()
 Most drivers can use drm_fbdev_generic_setup(). Driver have to implement
 atomic modesetting and GEM vmap support. Historically, generic fbdev emulation
 expected the framebuffer in system memory or system-like memory. By employing
-struct dma_buf_map, drivers with frambuffers in I/O memory can be supported
+struct iosys_map, drivers with frambuffers in I/O memory can be supported
 as well.
 Contact: Maintainer of the driver you plan to convert
@@ -234,7 +234,7 @@ Reimplement functions in drm_fbdev_fb_ops without fbdev
 A number of callback functions in drm_fbdev_fb_ops could benefit from
 being rewritten without dependencies on the fbdev module. Some of the
-helpers could further benefit from using struct dma_buf_map instead of
+helpers could further benefit from using struct iosys_map instead of
 raw pointers.
 Contact: Thomas Zimmermann , Daniel Vetter
@@ -434,19 +434,19 @@ Contact: Emil Velikov, respective driver maintainers
 Level: Intermediate
-Use struct dma_buf_map throughout codebase
---
+Use struct iosys_map throughout codebase
+
-Pointers to shared device memory are stored in struct dma_buf_map. Each
+Pointers to shared device memory are stored in struct iosys_map. Each
 instance knows whether it refers to system or I/O memory. Most of the DRM-wide
-interface have been converted to use struct dma_buf_map, but implementations
+interface have been converted to use struct iosys_map, but implementations
 often still use raw pointers.
-The task is to use struct dma_buf_map where it makes sense.
+The task is to use struct iosys_map where it makes sense.
-* Memory managers should use struct dma_buf_map for dma-buf-imported buffers.
-* TTM might benefit from using struct dma_buf_map internally.
-* Framebuffer copying and blitting helpers should operate on struct 
dma_buf_map.
+* Memory managers should use struct iosys_map for dma-buf-imported buffers.
+* TTM might benefit from using struct iosys_map internally.
+* Framebuffer copying and blitting helpers should operate on struct iosys_map.
 Contact: Thomas Zimmermann , Christian König, Daniel 
Vetter
diff --git a/MAINTAINERS b/MAINTAINERS
index d03ad8da1f36..112676f11792 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5675,7 +5675,6 @@ T:git git://anongit.freedesktop.org/drm/drm-misc
 F: Documentation/driver-api/dma-buf.rst
 F: drivers/dma-buf/
 F: include/linux/*fence.h
-F: include/linux/dma-buf*


There's still include/linux/dma-buf.h that needs to be listed.


 F: include/linux/dma-resv.h
 K: \bdma_(?:buf|fence|resv)\b
@@ -9976,6 +9975,13 @@ F:   include/linux/iova.h
 F: include/linux/of_iommu.h
 F: include/uapi/linux/iommu.h
+IOSYS-MAP HELPERS
+M: Thomas Zimmermann 
+L: dri-devel@lists.freedesktop.org
+S: Maintained
+T: git git://anongit.freedesktop.org/drm/drm-misc
+F: include/linux/iosys-map.h


Makes sense.

I briefly looked through the rst of the code conversion. Looks good to 
me. Thanks for squashing the patches into one.



thanks
Lucas De Marchi



Best regards
Thomas


+
 IO_URING
 M: Jens Axboe 
 R: Pavel Begunkov 
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 602b12d7470d..df23239b04fc 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -1047,8 +1047,8 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_move_notify, DMA_BUF);
  *
  *   Interfaces::
  *
- *  void \*dma_buf_vmap(struct dma_buf \*dmabuf, struct dma_buf_map \*map)
- *  void dma_buf_vunmap(struct dma_buf \*dmabuf, struct dma_buf_map \*map)
+ *  void \*dma_buf_vmap(struct dma_buf \*dmabuf, struct iosys_map \*map)
+ *  void dma_buf_vunmap(struct dma_buf \*dmabuf, struct 

Re: [PATCH v2] dma-buf-map: Rename to iosys-map

2022-02-02 Thread Sumit Semwal
Hello Lucas,

On Wed, 2 Feb 2022 at 15:08, Lucas De Marchi  wrote:
>
> On Wed, Feb 02, 2022 at 10:25:28AM +0100, Christian König wrote:
> >Am 02.02.22 um 10:11 schrieb Lucas De Marchi:
> >>[SNIP]
> >>diff --git a/MAINTAINERS b/MAINTAINERS
> >>index d03ad8da1f36..112676f11792 100644
> >>--- a/MAINTAINERS
> >>+++ b/MAINTAINERS
> >>@@ -5675,7 +5675,6 @@ T:  git git://anongit.freedesktop.org/drm/drm-misc
> >>  F:  Documentation/driver-api/dma-buf.rst
> >>  F:  drivers/dma-buf/
> >>  F:  include/linux/*fence.h
> >
> >Oh, that is not correct to begin with.
>
> right, include/linux/dma-fence*
>
> >
> >>-F:   include/linux/dma-buf*
> >
> >That here should probably be changed to point directly to
> >include/linux/dma-buf.h, but that can come later on.
>
> thanks for catching that. I will change it on next version and add your
> (and any additional) ack.
>
> Lucas De Marchi
>
> >
> >Feel free to add an Acked-by: Christian König
> > to the patch.
> >
> >If nobody objects I'm going to push it drm-misc-next and provide a
> >follow up to cleanup the MAINTAINERS file a bit more.
Thank you for the patch; apologies for not being able to respond
earlier (was out due to covid, just getting back slowly).

With Christian's suggestions, looks good to me as well - feel free to add an
Acked-by: Sumit Semwal  to the same.

> >
> >Regards,
> >Christian.
Best,
Sumit.

> >
> >>  F:  include/linux/dma-resv.h
> >>  K:  \bdma_(?:buf|fence|resv)\b
> >>@@ -9976,6 +9975,13 @@ F: include/linux/iova.h
> >>  F:  include/linux/of_iommu.h
> >>  F:  include/uapi/linux/iommu.h
> >>+IOSYS-MAP HELPERS
> >>+M:   Thomas Zimmermann 
> >>+L:   dri-devel@lists.freedesktop.org
> >>+S:   Maintained
> >>+T:   git git://anongit.freedesktop.org/drm/drm-misc
> >>+F:   include/linux/iosys-map.h
> >>+
> >


Re: [PATCH v2] dma-buf-map: Rename to iosys-map

2022-02-02 Thread Lucas De Marchi

On Wed, Feb 02, 2022 at 10:25:28AM +0100, Christian König wrote:

Am 02.02.22 um 10:11 schrieb Lucas De Marchi:

[SNIP]
diff --git a/MAINTAINERS b/MAINTAINERS
index d03ad8da1f36..112676f11792 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5675,7 +5675,6 @@ T:git git://anongit.freedesktop.org/drm/drm-misc
 F: Documentation/driver-api/dma-buf.rst
 F: drivers/dma-buf/
 F: include/linux/*fence.h


Oh, that is not correct to begin with.


right, include/linux/dma-fence*




-F: include/linux/dma-buf*


That here should probably be changed to point directly to 
include/linux/dma-buf.h, but that can come later on.


thanks for catching that. I will change it on next version and add your
(and any additional) ack.

Lucas De Marchi



Feel free to add an Acked-by: Christian König 
 to the patch.


If nobody objects I'm going to push it drm-misc-next and provide a 
follow up to cleanup the MAINTAINERS file a bit more.


Regards,
Christian.


 F: include/linux/dma-resv.h
 K: \bdma_(?:buf|fence|resv)\b
@@ -9976,6 +9975,13 @@ F:   include/linux/iova.h
 F: include/linux/of_iommu.h
 F: include/uapi/linux/iommu.h
+IOSYS-MAP HELPERS
+M: Thomas Zimmermann 
+L: dri-devel@lists.freedesktop.org
+S: Maintained
+T: git git://anongit.freedesktop.org/drm/drm-misc
+F: include/linux/iosys-map.h
+




Re: [PATCH v2] dma-buf-map: Rename to iosys-map

2022-02-02 Thread Christian König

Am 02.02.22 um 10:11 schrieb Lucas De Marchi:

[SNIP]
  
diff --git a/MAINTAINERS b/MAINTAINERS

index d03ad8da1f36..112676f11792 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5675,7 +5675,6 @@ T:git git://anongit.freedesktop.org/drm/drm-misc
  F:Documentation/driver-api/dma-buf.rst
  F:drivers/dma-buf/
  F:include/linux/*fence.h


Oh, that is not correct to begin with.


-F: include/linux/dma-buf*


That here should probably be changed to point directly to 
include/linux/dma-buf.h, but that can come later on.


Feel free to add an Acked-by: Christian König  
to the patch.


If nobody objects I'm going to push it drm-misc-next and provide a 
follow up to cleanup the MAINTAINERS file a bit more.


Regards,
Christian.


  F:include/linux/dma-resv.h
  K:\bdma_(?:buf|fence|resv)\b
  
@@ -9976,6 +9975,13 @@ F:	include/linux/iova.h

  F:include/linux/of_iommu.h
  F:include/uapi/linux/iommu.h
  
+IOSYS-MAP HELPERS

+M: Thomas Zimmermann 
+L: dri-devel@lists.freedesktop.org
+S: Maintained
+T: git git://anongit.freedesktop.org/drm/drm-misc
+F: include/linux/iosys-map.h
+