Re: [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions

2017-08-24 Thread Christian König

Am 24.08.2017 um 12:48 schrieb Tom St Denis:

On non IOTLB/IOMMU builds these functions would be undefined.

Signed-off-by: Tom St Denis 
---
  include/drm/ttm/ttm_page_alloc.h | 10 ++
  1 file changed, 10 insertions(+)

diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 8695918ea629..4400c08169cd 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -116,6 +116,16 @@ static inline void ttm_dma_unpopulate(struct ttm_dma_tt 
*ttm_dma,
  struct device *dev)
  {
  }
+
+static inline int ttm_populate_and_map_pages(struct device *dev, struct 
ttm_dma_tt *tt)
+{
+   return 0;


We should probably return -ENOMEM here, just like the dummy 
ttm_dma_populate() does.


With that fixed the patch is Reviewed-by: Christian König 
.


Regards,
Christian.


+}
+
+static inline void ttm_unmap_and_unpopulate_pages(struct device *dev, struct 
ttm_dma_tt *tt)
+{
+}
+
  #endif
  
  #endif



___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions

2017-08-24 Thread Tom St Denis
On non IOTLB/IOMMU builds these functions would be undefined.

Signed-off-by: Tom St Denis 
---
 include/drm/ttm/ttm_page_alloc.h | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 8695918ea629..4400c08169cd 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -116,6 +116,16 @@ static inline void ttm_dma_unpopulate(struct ttm_dma_tt 
*ttm_dma,
  struct device *dev)
 {
 }
+
+static inline int ttm_populate_and_map_pages(struct device *dev, struct 
ttm_dma_tt *tt)
+{
+   return 0;
+}
+
+static inline void ttm_unmap_and_unpopulate_pages(struct device *dev, struct 
ttm_dma_tt *tt)
+{
+}
+
 #endif
 
 #endif
-- 
2.12.0

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel