* [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions
@ 2017-08-24 10:48 Tom St Denis
[not found] ` <20170824104818.9973-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Tom St Denis @ 2017-08-24 10:48 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Tom St Denis, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On non IOTLB/IOMMU builds these functions would be undefined.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header.
[not found] ` <20170824104818.9973-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
@ 2017-08-24 10:48 ` Tom St Denis
[not found] ` <20170824104818.9973-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-08-24 11:52 ` [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions Christian König
1 sibling, 1 reply; 5+ messages in thread
From: Tom St Denis @ 2017-08-24 10:48 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Tom St Denis, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Minor tidy up.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
---
include/drm/ttm/ttm_page_alloc.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
index 4400c08169cd..19bdd907613c 100644
--- a/include/drm/ttm/ttm_page_alloc.h
+++ b/include/drm/ttm/ttm_page_alloc.h
@@ -47,7 +47,7 @@ void ttm_page_alloc_fini(void);
*
* Add backing pages to all of @ttm
*/
-extern int ttm_pool_populate(struct ttm_tt *ttm);
+int ttm_pool_populate(struct ttm_tt *ttm);
/**
* ttm_pool_unpopulate:
@@ -56,12 +56,12 @@ extern int ttm_pool_populate(struct ttm_tt *ttm);
*
* Free all pages of @ttm
*/
-extern void ttm_pool_unpopulate(struct ttm_tt *ttm);
+void ttm_pool_unpopulate(struct ttm_tt *ttm);
/**
* Output the state of pools to debugfs file
*/
-extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
+int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
@@ -78,10 +78,10 @@ void ttm_dma_page_alloc_fini(void);
/**
* Output the state of pools to debugfs file
*/
-extern int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data);
+int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data);
-extern int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev);
-extern void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
+int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev);
+void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
/**
--
2.12.0
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions
[not found] ` <20170824104818.9973-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-08-24 10:48 ` [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header Tom St Denis
@ 2017-08-24 11:52 ` Christian König
1 sibling, 0 replies; 5+ messages in thread
From: Christian König @ 2017-08-24 11:52 UTC (permalink / raw)
To: Tom St Denis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
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 <tom.stdenis@amd.com>
> ---
> 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
<christian.koenig@amd.com>.
Regards,
Christian.
> +}
> +
> +static inline void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt)
> +{
> +}
> +
> #endif
>
> #endif
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header.
[not found] ` <20170824104818.9973-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
@ 2017-08-24 11:53 ` Christian König
2017-08-24 11:55 ` Tom St Denis
0 siblings, 1 reply; 5+ messages in thread
From: Christian König @ 2017-08-24 11:53 UTC (permalink / raw)
To: Tom St Denis, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 24.08.2017 um 12:48 schrieb Tom St Denis:
> Minor tidy up.
>
> Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Thanks and sorry that I thought you added this, I really need more sleep.
Patch is Reviewed-by: Christian König <christian.koenig@amd.com>.
Christian.
> ---
> include/drm/ttm/ttm_page_alloc.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h
> index 4400c08169cd..19bdd907613c 100644
> --- a/include/drm/ttm/ttm_page_alloc.h
> +++ b/include/drm/ttm/ttm_page_alloc.h
> @@ -47,7 +47,7 @@ void ttm_page_alloc_fini(void);
> *
> * Add backing pages to all of @ttm
> */
> -extern int ttm_pool_populate(struct ttm_tt *ttm);
> +int ttm_pool_populate(struct ttm_tt *ttm);
>
> /**
> * ttm_pool_unpopulate:
> @@ -56,12 +56,12 @@ extern int ttm_pool_populate(struct ttm_tt *ttm);
> *
> * Free all pages of @ttm
> */
> -extern void ttm_pool_unpopulate(struct ttm_tt *ttm);
> +void ttm_pool_unpopulate(struct ttm_tt *ttm);
>
> /**
> * Output the state of pools to debugfs file
> */
> -extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
> +int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
>
>
> #if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
> @@ -78,10 +78,10 @@ void ttm_dma_page_alloc_fini(void);
> /**
> * Output the state of pools to debugfs file
> */
> -extern int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data);
> +int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data);
>
> -extern int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev);
> -extern void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
> +int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev);
> +void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
>
>
> /**
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header.
2017-08-24 11:53 ` Christian König
@ 2017-08-24 11:55 ` Tom St Denis
0 siblings, 0 replies; 5+ messages in thread
From: Tom St Denis @ 2017-08-24 11:55 UTC (permalink / raw)
To: Christian König, amd-gfx; +Cc: dri-devel
On 24/08/17 07:53 AM, Christian König wrote:
> Am 24.08.2017 um 12:48 schrieb Tom St Denis:
>> Minor tidy up.
>>
>> Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
>
> Thanks and sorry that I thought you added this, I really need more sleep.
>
> Patch is Reviewed-by: Christian König <christian.koenig@amd.com>.
No worries. For a second there I thought I was writing patches too
early for me :)
Should be an AMD rule that no patches before sun up in the summer...
Alas in Winter here in Canada that'd cut productivity down to 20% hehehe.
Cheers,
Tom
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-08-24 11:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 10:48 [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions Tom St Denis
[not found] ` <20170824104818.9973-1-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-08-24 10:48 ` [PATCH 2/2] drm/ttm: Remove needless 'extern' on functions in header Tom St Denis
[not found] ` <20170824104818.9973-2-tom.stdenis-5C7GfCeVMHo@public.gmane.org>
2017-08-24 11:53 ` Christian König
2017-08-24 11:55 ` Tom St Denis
2017-08-24 11:52 ` [PATCH 1/2] drm/ttm: Add dummy *populate_and_*map_pages() functions Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox