All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include
@ 2020-11-17 16:33 Christian König
  2020-11-17 16:33 ` [PATCH 2/4] drm/ttm: replace sysfs with debugfs Christian König
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Christian König @ 2020-11-17 16:33 UTC (permalink / raw)
  To: dri-devel

ttm_module.h deals with internals of TTM and should never
be include outside of it.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h           | 1 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       | 1 -
 drivers/gpu/drm/nouveau/nouveau_drv.h         | 1 -
 drivers/gpu/drm/qxl/qxl_drv.h                 | 1 -
 drivers/gpu/drm/qxl/qxl_ttm.c                 | 1 -
 drivers/gpu/drm/radeon/radeon.h               | 1 -
 drivers/gpu/drm/radeon/radeon_ttm.c           | 1 -
 drivers/gpu/drm/ttm/ttm_agp_backend.c         | 1 -
 drivers/gpu/drm/ttm/ttm_bo_vm.c               | 1 -
 drivers/gpu/drm/ttm/ttm_range_manager.c       | 1 -
 drivers/gpu/drm/vmwgfx/ttm_object.c           | 1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           | 1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           | 1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 1 -
 drivers/gpu/drm/vmwgfx/vmwgfx_thp.c           | 1 -
 include/drm/ttm/ttm_bo_driver.h               | 1 -
 16 files changed, 16 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 183b09d71b64..6e042b4ed13d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -55,7 +55,6 @@
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_execbuf_util.h>
 
 #include <drm/amdgpu_drm.h>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index c438d290a6db..967859c6be3c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -46,7 +46,6 @@
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
-#include <drm/ttm/ttm_module.h>
 
 #include <drm/drm_debugfs.h>
 #include <drm/amdgpu_drm.h>
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 8e90b3e47bbe..700fa0979d14 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -54,7 +54,6 @@
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
-#include <drm/ttm/ttm_module.h>
 
 #include <drm/drm_audio_component.h>
 
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
index 8bd0f916dfbc..83b54f0dad61 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.h
+++ b/drivers/gpu/drm/qxl/qxl_drv.h
@@ -46,7 +46,6 @@
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_execbuf_util.h>
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_placement.h>
 
 #include "qxl_dev.h"
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
index 128c38c8a837..0cc661df2258 100644
--- a/drivers/gpu/drm/qxl/qxl_ttm.c
+++ b/drivers/gpu/drm/qxl/qxl_ttm.c
@@ -31,7 +31,6 @@
 #include <drm/qxl_drm.h>
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_placement.h>
 
 #include "qxl_drv.h"
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 28cb8ced91b9..428c561a4e2c 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -75,7 +75,6 @@
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_execbuf_util.h>
 
 #include <drm/drm_gem.h>
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 0ca381b95d3d..2259d3811a45 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -46,7 +46,6 @@
 #include <drm/radeon_drm.h>
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_placement.h>
 
 #include "radeon_reg.h"
diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 03c86628e4ac..8f9fa4188897 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -32,7 +32,6 @@
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 #include <linux/agp_backend.h>
diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
index 2944fa0af493..144a4940b6b6 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
@@ -31,7 +31,6 @@
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 #include <drm/drm_vma_manager.h>
diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
index ea77919569a2..4c0c756c9124 100644
--- a/drivers/gpu/drm/ttm/ttm_range_manager.c
+++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
@@ -29,7 +29,6 @@
  * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
  */
 
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 #include <drm/drm_mm.h>
diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c
index 16077785ad47..0fe869d0fad1 100644
--- a/drivers/gpu/drm/vmwgfx/ttm_object.c
+++ b/drivers/gpu/drm/vmwgfx/ttm_object.c
@@ -59,7 +59,6 @@
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
-#include <drm/ttm/ttm_module.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 1310857879e7..e6de876a016a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -35,7 +35,6 @@
 #include <drm/drm_ioctl.h>
 #include <drm/drm_sysfs.h>
 #include <drm/ttm/ttm_bo_driver.h>
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_placement.h>
 
 #include "ttm_object.h"
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
index b45becbb00f8..5b9a28157dd3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
@@ -39,7 +39,6 @@
 
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_execbuf_util.h>
-#include <drm/ttm/ttm_module.h>
 
 #include "ttm_lock.h"
 #include "ttm_object.h"
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
index be325a62c178..8fe26e32f920 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
@@ -29,7 +29,6 @@
  */
 
 #include "vmwgfx_drv.h"
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 #include <linux/idr.h>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
index 155ca3a5c7e5..e8e79de255cf 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
@@ -5,7 +5,6 @@
  * Copyright (C) 2007-2019 Vmware, Inc. All rights reservedd.
  */
 #include "vmwgfx_drv.h"
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 54788a5160a0..fdf01c7f1f99 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -38,7 +38,6 @@
 #include <linux/dma-resv.h>
 
 #include "ttm_bo_api.h"
-#include "ttm_module.h"
 #include "ttm_placement.h"
 #include "ttm_tt.h"
 #include "ttm_pool.h"
-- 
2.25.1

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

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

* [PATCH 2/4] drm/ttm: replace sysfs with debugfs
  2020-11-17 16:33 [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Christian König
@ 2020-11-17 16:33 ` Christian König
  2020-11-17 16:33 ` [PATCH 3/4] drm/ttm: add a debugfs file for the global page pools Christian König
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2020-11-17 16:33 UTC (permalink / raw)
  To: dri-devel

As far as I can tell this has never been used by any
userspace application.

The number of BOs in the system is far better suited in
debugfs than sysfs and we now should be able to add other
information here as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c                  | 51 ++--------------
 drivers/gpu/drm/ttm/ttm_module.c              | 58 ++-----------------
 {include => drivers/gpu}/drm/ttm/ttm_module.h |  8 +--
 include/drm/ttm/ttm_bo_driver.h               |  1 -
 4 files changed, 13 insertions(+), 105 deletions(-)
 rename {include => drivers/gpu}/drm/ttm/ttm_module.h (94%)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 0a93df93dba4..cd1273c76c51 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -31,7 +31,6 @@
 
 #define pr_fmt(fmt) "[TTM] " fmt
 
-#include <drm/ttm/ttm_module.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 #include <linux/jiffies.h>
@@ -43,7 +42,7 @@
 #include <linux/atomic.h>
 #include <linux/dma-resv.h>
 
-static void ttm_bo_global_kobj_release(struct kobject *kobj);
+#include "ttm_module.h"
 
 /**
  * ttm_global_mutex - protecting the global BO state
@@ -53,11 +52,6 @@ unsigned ttm_bo_glob_use_count;
 struct ttm_bo_global ttm_bo_glob;
 EXPORT_SYMBOL(ttm_bo_glob);
 
-static struct attribute ttm_bo_count = {
-	.name = "bo_count",
-	.mode = S_IRUGO
-};
-
 /* default destructor */
 static void ttm_bo_default_destroy(struct ttm_buffer_object *bo)
 {
@@ -83,32 +77,6 @@ static void ttm_bo_mem_space_debug(struct ttm_buffer_object *bo,
 	}
 }
 
-static ssize_t ttm_bo_global_show(struct kobject *kobj,
-				  struct attribute *attr,
-				  char *buffer)
-{
-	struct ttm_bo_global *glob =
-		container_of(kobj, struct ttm_bo_global, kobj);
-
-	return snprintf(buffer, PAGE_SIZE, "%d\n",
-				atomic_read(&glob->bo_count));
-}
-
-static struct attribute *ttm_bo_global_attrs[] = {
-	&ttm_bo_count,
-	NULL
-};
-
-static const struct sysfs_ops ttm_bo_global_ops = {
-	.show = &ttm_bo_global_show
-};
-
-static struct kobj_type ttm_bo_glob_kobj_type  = {
-	.release = &ttm_bo_global_kobj_release,
-	.sysfs_ops = &ttm_bo_global_ops,
-	.default_attrs = ttm_bo_global_attrs
-};
-
 static void ttm_bo_add_mem_to_lru(struct ttm_buffer_object *bo,
 				  struct ttm_resource *mem)
 {
@@ -1216,14 +1184,6 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
 }
 EXPORT_SYMBOL(ttm_bo_init);
 
-static void ttm_bo_global_kobj_release(struct kobject *kobj)
-{
-	struct ttm_bo_global *glob =
-		container_of(kobj, struct ttm_bo_global, kobj);
-
-	__free_page(glob->dummy_read_page);
-}
-
 static void ttm_bo_global_release(void)
 {
 	struct ttm_bo_global *glob = &ttm_bo_glob;
@@ -1233,9 +1193,8 @@ static void ttm_bo_global_release(void)
 		goto out;
 
 	ttm_pool_mgr_fini();
+	__free_page(glob->dummy_read_page);
 
-	kobject_del(&glob->kobj);
-	kobject_put(&glob->kobj);
 	memset(glob, 0, sizeof(*glob));
 out:
 	mutex_unlock(&ttm_global_mutex);
@@ -1288,10 +1247,8 @@ static int ttm_bo_global_init(void)
 	INIT_LIST_HEAD(&glob->device_list);
 	atomic_set(&glob->bo_count, 0);
 
-	ret = kobject_init_and_add(
-		&glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects");
-	if (unlikely(ret != 0))
-		kobject_put(&glob->kobj);
+	debugfs_create_atomic_t("buffer_objects", 0444, ttm_debugfs_root,
+				&glob->bo_count);
 out:
 	mutex_unlock(&ttm_global_mutex);
 	return ret;
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c
index 6ff40c041d79..ac295861a688 100644
--- a/drivers/gpu/drm/ttm/ttm_module.c
+++ b/drivers/gpu/drm/ttm/ttm_module.c
@@ -30,69 +30,21 @@
  * 	    Jerome Glisse
  */
 #include <linux/module.h>
-#include <linux/device.h>
-#include <linux/sched.h>
-#include <drm/ttm/ttm_module.h>
-#include <drm/drm_sysfs.h>
+#include <linux/debugfs.h>
 
-static DECLARE_WAIT_QUEUE_HEAD(exit_q);
-static atomic_t device_released;
+#include "ttm_module.h"
 
-static struct device_type ttm_drm_class_type = {
-	.name = "ttm",
-	/**
-	 * Add pm ops here.
-	 */
-};
-
-static void ttm_drm_class_device_release(struct device *dev)
-{
-	atomic_set(&device_released, 1);
-	wake_up_all(&exit_q);
-}
-
-static struct device ttm_drm_class_device = {
-	.type = &ttm_drm_class_type,
-	.release = &ttm_drm_class_device_release
-};
-
-struct kobject *ttm_get_kobj(void)
-{
-	struct kobject *kobj = &ttm_drm_class_device.kobj;
-	BUG_ON(kobj == NULL);
-	return kobj;
-}
+struct dentry *ttm_debugfs_root;
 
 static int __init ttm_init(void)
 {
-	int ret;
-
-	ret = dev_set_name(&ttm_drm_class_device, "ttm");
-	if (unlikely(ret != 0))
-		return ret;
-
-	atomic_set(&device_released, 0);
-	ret = drm_class_device_register(&ttm_drm_class_device);
-	if (unlikely(ret != 0))
-		goto out_no_dev_reg;
-
+	ttm_debugfs_root = debugfs_create_dir("ttm", NULL);
 	return 0;
-out_no_dev_reg:
-	atomic_set(&device_released, 1);
-	wake_up_all(&exit_q);
-	return ret;
 }
 
 static void __exit ttm_exit(void)
 {
-	drm_class_device_unregister(&ttm_drm_class_device);
-
-	/**
-	 * Refuse to unload until the TTM device is released.
-	 * Not sure this is 100% needed.
-	 */
-
-	wait_event(exit_q, atomic_read(&device_released) == 1);
+	debugfs_remove(ttm_debugfs_root);
 }
 
 module_init(ttm_init);
diff --git a/include/drm/ttm/ttm_module.h b/drivers/gpu/drm/ttm/ttm_module.h
similarity index 94%
rename from include/drm/ttm/ttm_module.h
rename to drivers/gpu/drm/ttm/ttm_module.h
index 45fa318c1585..d7cac5d4b835 100644
--- a/include/drm/ttm/ttm_module.h
+++ b/drivers/gpu/drm/ttm/ttm_module.h
@@ -31,10 +31,10 @@
 #ifndef _TTM_MODULE_H_
 #define _TTM_MODULE_H_
 
-#include <linux/kernel.h>
-struct kobject;
-
 #define TTM_PFX "[TTM] "
-extern struct kobject *ttm_get_kobj(void);
+
+struct dentry;
+
+extern struct dentry *ttm_debugfs_root;
 
 #endif /* _TTM_MODULE_H_ */
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index fdf01c7f1f99..9b2d34303734 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -245,7 +245,6 @@ extern struct ttm_bo_global {
 	 * Constant after init.
 	 */
 
-	struct kobject kobj;
 	struct page *dummy_read_page;
 	spinlock_t lru_lock;
 
-- 
2.25.1

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

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

* [PATCH 3/4] drm/ttm: add a debugfs file for the global page pools
  2020-11-17 16:33 [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Christian König
  2020-11-17 16:33 ` [PATCH 2/4] drm/ttm: replace sysfs with debugfs Christian König
@ 2020-11-17 16:33 ` Christian König
  2020-11-17 16:33 ` [PATCH 4/4] drm/ttm: optimize ttm pool shrinker a bit Christian König
  2020-11-17 17:46 ` [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Daniel Vetter
  3 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2020-11-17 16:33 UTC (permalink / raw)
  To: dri-devel

Instead of printing this on the per device pool.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_pool.c | 70 ++++++++++++++++++++++++----------
 1 file changed, 50 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 24ae7c23cfd0..5daf812551ee 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -42,6 +42,8 @@
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_tt.h>
 
+#include "ttm_module.h"
+
 /**
  * struct ttm_pool_dma - Helper object for coherent DMA mappings
  *
@@ -533,6 +535,17 @@ EXPORT_SYMBOL(ttm_pool_fini);
 
 #ifdef CONFIG_DEBUG_FS
 
+/* Print a nice header for the order */
+static void ttm_pool_debugfs_header(struct seq_file *m)
+{
+	unsigned int i;
+
+	seq_puts(m, "\t ");
+	for (i = 0; i < MAX_ORDER; ++i)
+		seq_printf(m, " ---%2u---", i);
+	seq_puts(m, "\n");
+}
+
 /* Dump information about the different pool types */
 static void ttm_pool_debugfs_orders(struct ttm_pool_type *pt,
 				    struct seq_file *m)
@@ -544,6 +557,35 @@ static void ttm_pool_debugfs_orders(struct ttm_pool_type *pt,
 	seq_puts(m, "\n");
 }
 
+/* Dump the total amount of allocated pages */
+static void ttm_pool_debugfs_footer(struct seq_file *m)
+{
+	seq_printf(m, "\ntotal\t: %8lu of %8lu\n",
+		   atomic_long_read(&allocated_pages), page_pool_size);
+}
+
+/* Dump the information for the global pools */
+static int ttm_pool_debugfs_globals_show(struct seq_file *m, void *data)
+{
+	ttm_pool_debugfs_header(m);
+
+	spin_lock(&shrinker_lock);
+	seq_puts(m, "wc\t:");
+	ttm_pool_debugfs_orders(global_write_combined, m);
+	seq_puts(m, "uc\t:");
+	ttm_pool_debugfs_orders(global_uncached, m);
+	seq_puts(m, "wc 32\t:");
+	ttm_pool_debugfs_orders(global_dma32_write_combined, m);
+	seq_puts(m, "uc 32\t:");
+	ttm_pool_debugfs_orders(global_dma32_uncached, m);
+	spin_unlock(&shrinker_lock);
+
+	ttm_pool_debugfs_footer(m);
+
+	return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(ttm_pool_debugfs_globals);
+
 /**
  * ttm_pool_debugfs - Debugfs dump function for a pool
  *
@@ -556,23 +598,9 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m)
 {
 	unsigned int i;
 
-	spin_lock(&shrinker_lock);
-
-	seq_puts(m, "\t ");
-	for (i = 0; i < MAX_ORDER; ++i)
-		seq_printf(m, " ---%2u---", i);
-	seq_puts(m, "\n");
-
-	seq_puts(m, "wc\t:");
-	ttm_pool_debugfs_orders(global_write_combined, m);
-	seq_puts(m, "uc\t:");
-	ttm_pool_debugfs_orders(global_uncached, m);
-
-	seq_puts(m, "wc 32\t:");
-	ttm_pool_debugfs_orders(global_dma32_write_combined, m);
-	seq_puts(m, "uc 32\t:");
-	ttm_pool_debugfs_orders(global_dma32_uncached, m);
+	ttm_pool_debugfs_header(m);
 
+	spin_lock(&shrinker_lock);
 	for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i) {
 		seq_puts(m, "DMA ");
 		switch (i) {
@@ -588,12 +616,9 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m)
 		}
 		ttm_pool_debugfs_orders(pool->caching[i].orders, m);
 	}
-
-	seq_printf(m, "\ntotal\t: %8lu of %8lu\n",
-		   atomic_long_read(&allocated_pages), page_pool_size);
-
 	spin_unlock(&shrinker_lock);
 
+	ttm_pool_debugfs_footer(m);
 	return 0;
 }
 EXPORT_SYMBOL(ttm_pool_debugfs);
@@ -650,6 +675,11 @@ int ttm_pool_mgr_init(unsigned long num_pages)
 				   ttm_uncached, i);
 	}
 
+#ifdef CONFIG_DEBUG_FS
+	debugfs_create_file("page_pool", 0444, ttm_debugfs_root, NULL,
+			    &ttm_pool_debugfs_globals_fops);
+#endif
+
 	mm_shrinker.count_objects = ttm_pool_shrinker_count;
 	mm_shrinker.scan_objects = ttm_pool_shrinker_scan;
 	mm_shrinker.seeks = 1;
-- 
2.25.1

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

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

* [PATCH 4/4] drm/ttm: optimize ttm pool shrinker a bit
  2020-11-17 16:33 [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Christian König
  2020-11-17 16:33 ` [PATCH 2/4] drm/ttm: replace sysfs with debugfs Christian König
  2020-11-17 16:33 ` [PATCH 3/4] drm/ttm: add a debugfs file for the global page pools Christian König
@ 2020-11-17 16:33 ` Christian König
  2020-11-17 17:46 ` [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Daniel Vetter
  3 siblings, 0 replies; 7+ messages in thread
From: Christian König @ 2020-11-17 16:33 UTC (permalink / raw)
  To: dri-devel

Only initialize the DMA coherent pools if they are used.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_pool.c | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 5daf812551ee..54253aa09ffb 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -508,10 +508,12 @@ void ttm_pool_init(struct ttm_pool *pool, struct device *dev,
 	pool->use_dma_alloc = use_dma_alloc;
 	pool->use_dma32 = use_dma32;
 
-	for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
-		for (j = 0; j < MAX_ORDER; ++j)
-			ttm_pool_type_init(&pool->caching[i].orders[j],
-					   pool, i, j);
+	if (use_dma_alloc) {
+		for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
+			for (j = 0; j < MAX_ORDER; ++j)
+				ttm_pool_type_init(&pool->caching[i].orders[j],
+						   pool, i, j);
+	}
 }
 EXPORT_SYMBOL(ttm_pool_init);
 
@@ -527,9 +529,11 @@ void ttm_pool_fini(struct ttm_pool *pool)
 {
 	unsigned int i, j;
 
-	for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
-		for (j = 0; j < MAX_ORDER; ++j)
-			ttm_pool_type_fini(&pool->caching[i].orders[j]);
+	if (pool->use_dma_alloc) {
+		for (i = 0; i < TTM_NUM_CACHING_TYPES; ++i)
+			for (j = 0; j < MAX_ORDER; ++j)
+				ttm_pool_type_fini(&pool->caching[i].orders[j]);
+	}
 }
 EXPORT_SYMBOL(ttm_pool_fini);
 
@@ -598,6 +602,11 @@ int ttm_pool_debugfs(struct ttm_pool *pool, struct seq_file *m)
 {
 	unsigned int i;
 
+	if (!pool->use_dma_alloc) {
+		seq_puts(m, "unused\n");
+		return 0;
+	}
+
 	ttm_pool_debugfs_header(m);
 
 	spin_lock(&shrinker_lock);
-- 
2.25.1

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

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

* Re: [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include
  2020-11-17 16:33 [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Christian König
                   ` (2 preceding siblings ...)
  2020-11-17 16:33 ` [PATCH 4/4] drm/ttm: optimize ttm pool shrinker a bit Christian König
@ 2020-11-17 17:46 ` Daniel Vetter
  2020-11-18 12:49   ` Christian König
  3 siblings, 1 reply; 7+ messages in thread
From: Daniel Vetter @ 2020-11-17 17:46 UTC (permalink / raw)
  To: Christian König; +Cc: dri-devel

On Tue, Nov 17, 2020 at 05:33:35PM +0100, Christian König wrote:
> ttm_module.h deals with internals of TTM and should never
> be include outside of it.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>

Maybe also move it to drivers/gpu/drm/ttm/ttm_internal.h. We're using the
_interal.h suffix in a few other places for module internal functions
already. Perhaps in a follow-up?

Anyway this here is Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(I didn't bother compile testing it on everything, just to make that
clear).
-Daniel
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h           | 1 -
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       | 1 -
>  drivers/gpu/drm/nouveau/nouveau_drv.h         | 1 -
>  drivers/gpu/drm/qxl/qxl_drv.h                 | 1 -
>  drivers/gpu/drm/qxl/qxl_ttm.c                 | 1 -
>  drivers/gpu/drm/radeon/radeon.h               | 1 -
>  drivers/gpu/drm/radeon/radeon_ttm.c           | 1 -
>  drivers/gpu/drm/ttm/ttm_agp_backend.c         | 1 -
>  drivers/gpu/drm/ttm/ttm_bo_vm.c               | 1 -
>  drivers/gpu/drm/ttm/ttm_range_manager.c       | 1 -
>  drivers/gpu/drm/vmwgfx/ttm_object.c           | 1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           | 1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           | 1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_thp.c           | 1 -
>  include/drm/ttm/ttm_bo_driver.h               | 1 -
>  16 files changed, 16 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 183b09d71b64..6e042b4ed13d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -55,7 +55,6 @@
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_execbuf_util.h>
>  
>  #include <drm/amdgpu_drm.h>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index c438d290a6db..967859c6be3c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -46,7 +46,6 @@
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
> -#include <drm/ttm/ttm_module.h>
>  
>  #include <drm/drm_debugfs.h>
>  #include <drm/amdgpu_drm.h>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
> index 8e90b3e47bbe..700fa0979d14 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drv.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
> @@ -54,7 +54,6 @@
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
> -#include <drm/ttm/ttm_module.h>
>  
>  #include <drm/drm_audio_component.h>
>  
> diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
> index 8bd0f916dfbc..83b54f0dad61 100644
> --- a/drivers/gpu/drm/qxl/qxl_drv.h
> +++ b/drivers/gpu/drm/qxl/qxl_drv.h
> @@ -46,7 +46,6 @@
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_execbuf_util.h>
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_placement.h>
>  
>  #include "qxl_dev.h"
> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> index 128c38c8a837..0cc661df2258 100644
> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> @@ -31,7 +31,6 @@
>  #include <drm/qxl_drm.h>
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_placement.h>
>  
>  #include "qxl_drv.h"
> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> index 28cb8ced91b9..428c561a4e2c 100644
> --- a/drivers/gpu/drm/radeon/radeon.h
> +++ b/drivers/gpu/drm/radeon/radeon.h
> @@ -75,7 +75,6 @@
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_execbuf_util.h>
>  
>  #include <drm/drm_gem.h>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 0ca381b95d3d..2259d3811a45 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -46,7 +46,6 @@
>  #include <drm/radeon_drm.h>
>  #include <drm/ttm/ttm_bo_api.h>
>  #include <drm/ttm/ttm_bo_driver.h>
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_placement.h>
>  
>  #include "radeon_reg.h"
> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> index 03c86628e4ac..8f9fa4188897 100644
> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> @@ -32,7 +32,6 @@
>  
>  #define pr_fmt(fmt) "[TTM] " fmt
>  
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
>  #include <linux/agp_backend.h>
> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> index 2944fa0af493..144a4940b6b6 100644
> --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
> +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> @@ -31,7 +31,6 @@
>  
>  #define pr_fmt(fmt) "[TTM] " fmt
>  
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
>  #include <drm/drm_vma_manager.h>
> diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
> index ea77919569a2..4c0c756c9124 100644
> --- a/drivers/gpu/drm/ttm/ttm_range_manager.c
> +++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
> @@ -29,7 +29,6 @@
>   * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
>   */
>  
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
>  #include <drm/drm_mm.h>
> diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c
> index 16077785ad47..0fe869d0fad1 100644
> --- a/drivers/gpu/drm/vmwgfx/ttm_object.c
> +++ b/drivers/gpu/drm/vmwgfx/ttm_object.c
> @@ -59,7 +59,6 @@
>  
>  #define pr_fmt(fmt) "[TTM] " fmt
>  
> -#include <drm/ttm/ttm_module.h>
>  #include <linux/list.h>
>  #include <linux/spinlock.h>
>  #include <linux/slab.h>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index 1310857879e7..e6de876a016a 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -35,7 +35,6 @@
>  #include <drm/drm_ioctl.h>
>  #include <drm/drm_sysfs.h>
>  #include <drm/ttm/ttm_bo_driver.h>
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_placement.h>
>  
>  #include "ttm_object.h"
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> index b45becbb00f8..5b9a28157dd3 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> @@ -39,7 +39,6 @@
>  
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_execbuf_util.h>
> -#include <drm/ttm/ttm_module.h>
>  
>  #include "ttm_lock.h"
>  #include "ttm_object.h"
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
> index be325a62c178..8fe26e32f920 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
> @@ -29,7 +29,6 @@
>   */
>  
>  #include "vmwgfx_drv.h"
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
>  #include <linux/idr.h>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> index 155ca3a5c7e5..e8e79de255cf 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> @@ -5,7 +5,6 @@
>   * Copyright (C) 2007-2019 Vmware, Inc. All rights reservedd.
>   */
>  #include "vmwgfx_drv.h"
> -#include <drm/ttm/ttm_module.h>
>  #include <drm/ttm/ttm_bo_driver.h>
>  #include <drm/ttm/ttm_placement.h>
>  
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 54788a5160a0..fdf01c7f1f99 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -38,7 +38,6 @@
>  #include <linux/dma-resv.h>
>  
>  #include "ttm_bo_api.h"
> -#include "ttm_module.h"
>  #include "ttm_placement.h"
>  #include "ttm_tt.h"
>  #include "ttm_pool.h"
> -- 
> 2.25.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include
  2020-11-17 17:46 ` [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Daniel Vetter
@ 2020-11-18 12:49   ` Christian König
  2020-11-18 21:25     ` Daniel Vetter
  0 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2020-11-18 12:49 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: dri-devel

Am 17.11.20 um 18:46 schrieb Daniel Vetter:
> On Tue, Nov 17, 2020 at 05:33:35PM +0100, Christian König wrote:
>> ttm_module.h deals with internals of TTM and should never
>> be include outside of it.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
> Maybe also move it to drivers/gpu/drm/ttm/ttm_internal.h. We're using the
> _interal.h suffix in a few other places for module internal functions
> already. Perhaps in a follow-up?

I've thought I already moved the header into drivers/gpu/drm/ttm/, but 
it somehow got mangled into patch #2.

Going to fix that and resend.

> Anyway this here is Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

For this one or the whole series? Please note that #2 removes the TTM 
sysfs files. I think that nobody every used those, but who knows?

Regards,
Christian.

> (I didn't bother compile testing it on everything, just to make that
> clear).
> -Daniel
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu.h           | 1 -
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       | 1 -
>>   drivers/gpu/drm/nouveau/nouveau_drv.h         | 1 -
>>   drivers/gpu/drm/qxl/qxl_drv.h                 | 1 -
>>   drivers/gpu/drm/qxl/qxl_ttm.c                 | 1 -
>>   drivers/gpu/drm/radeon/radeon.h               | 1 -
>>   drivers/gpu/drm/radeon/radeon_ttm.c           | 1 -
>>   drivers/gpu/drm/ttm/ttm_agp_backend.c         | 1 -
>>   drivers/gpu/drm/ttm/ttm_bo_vm.c               | 1 -
>>   drivers/gpu/drm/ttm/ttm_range_manager.c       | 1 -
>>   drivers/gpu/drm/vmwgfx/ttm_object.c           | 1 -
>>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           | 1 -
>>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           | 1 -
>>   drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 1 -
>>   drivers/gpu/drm/vmwgfx/vmwgfx_thp.c           | 1 -
>>   include/drm/ttm/ttm_bo_driver.h               | 1 -
>>   16 files changed, 16 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> index 183b09d71b64..6e042b4ed13d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> @@ -55,7 +55,6 @@
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_execbuf_util.h>
>>   
>>   #include <drm/amdgpu_drm.h>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>> index c438d290a6db..967859c6be3c 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
>> @@ -46,7 +46,6 @@
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>> -#include <drm/ttm/ttm_module.h>
>>   
>>   #include <drm/drm_debugfs.h>
>>   #include <drm/amdgpu_drm.h>
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
>> index 8e90b3e47bbe..700fa0979d14 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_drv.h
>> +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
>> @@ -54,7 +54,6 @@
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>> -#include <drm/ttm/ttm_module.h>
>>   
>>   #include <drm/drm_audio_component.h>
>>   
>> diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
>> index 8bd0f916dfbc..83b54f0dad61 100644
>> --- a/drivers/gpu/drm/qxl/qxl_drv.h
>> +++ b/drivers/gpu/drm/qxl/qxl_drv.h
>> @@ -46,7 +46,6 @@
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_execbuf_util.h>
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   
>>   #include "qxl_dev.h"
>> diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
>> index 128c38c8a837..0cc661df2258 100644
>> --- a/drivers/gpu/drm/qxl/qxl_ttm.c
>> +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
>> @@ -31,7 +31,6 @@
>>   #include <drm/qxl_drm.h>
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   
>>   #include "qxl_drv.h"
>> diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
>> index 28cb8ced91b9..428c561a4e2c 100644
>> --- a/drivers/gpu/drm/radeon/radeon.h
>> +++ b/drivers/gpu/drm/radeon/radeon.h
>> @@ -75,7 +75,6 @@
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_execbuf_util.h>
>>   
>>   #include <drm/drm_gem.h>
>> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
>> index 0ca381b95d3d..2259d3811a45 100644
>> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
>> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
>> @@ -46,7 +46,6 @@
>>   #include <drm/radeon_drm.h>
>>   #include <drm/ttm/ttm_bo_api.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   
>>   #include "radeon_reg.h"
>> diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> index 03c86628e4ac..8f9fa4188897 100644
>> --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
>> @@ -32,7 +32,6 @@
>>   
>>   #define pr_fmt(fmt) "[TTM] " fmt
>>   
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   #include <linux/agp_backend.h>
>> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
>> index 2944fa0af493..144a4940b6b6 100644
>> --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
>> +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
>> @@ -31,7 +31,6 @@
>>   
>>   #define pr_fmt(fmt) "[TTM] " fmt
>>   
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   #include <drm/drm_vma_manager.h>
>> diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
>> index ea77919569a2..4c0c756c9124 100644
>> --- a/drivers/gpu/drm/ttm/ttm_range_manager.c
>> +++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
>> @@ -29,7 +29,6 @@
>>    * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
>>    */
>>   
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   #include <drm/drm_mm.h>
>> diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c
>> index 16077785ad47..0fe869d0fad1 100644
>> --- a/drivers/gpu/drm/vmwgfx/ttm_object.c
>> +++ b/drivers/gpu/drm/vmwgfx/ttm_object.c
>> @@ -59,7 +59,6 @@
>>   
>>   #define pr_fmt(fmt) "[TTM] " fmt
>>   
>> -#include <drm/ttm/ttm_module.h>
>>   #include <linux/list.h>
>>   #include <linux/spinlock.h>
>>   #include <linux/slab.h>
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> index 1310857879e7..e6de876a016a 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
>> @@ -35,7 +35,6 @@
>>   #include <drm/drm_ioctl.h>
>>   #include <drm/drm_sysfs.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   
>>   #include "ttm_object.h"
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
>> index b45becbb00f8..5b9a28157dd3 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
>> @@ -39,7 +39,6 @@
>>   
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_execbuf_util.h>
>> -#include <drm/ttm/ttm_module.h>
>>   
>>   #include "ttm_lock.h"
>>   #include "ttm_object.h"
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
>> index be325a62c178..8fe26e32f920 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
>> @@ -29,7 +29,6 @@
>>    */
>>   
>>   #include "vmwgfx_drv.h"
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   #include <linux/idr.h>
>> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
>> index 155ca3a5c7e5..e8e79de255cf 100644
>> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
>> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
>> @@ -5,7 +5,6 @@
>>    * Copyright (C) 2007-2019 Vmware, Inc. All rights reservedd.
>>    */
>>   #include "vmwgfx_drv.h"
>> -#include <drm/ttm/ttm_module.h>
>>   #include <drm/ttm/ttm_bo_driver.h>
>>   #include <drm/ttm/ttm_placement.h>
>>   
>> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
>> index 54788a5160a0..fdf01c7f1f99 100644
>> --- a/include/drm/ttm/ttm_bo_driver.h
>> +++ b/include/drm/ttm/ttm_bo_driver.h
>> @@ -38,7 +38,6 @@
>>   #include <linux/dma-resv.h>
>>   
>>   #include "ttm_bo_api.h"
>> -#include "ttm_module.h"
>>   #include "ttm_placement.h"
>>   #include "ttm_tt.h"
>>   #include "ttm_pool.h"
>> -- 
>> 2.25.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

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

* Re: [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include
  2020-11-18 12:49   ` Christian König
@ 2020-11-18 21:25     ` Daniel Vetter
  0 siblings, 0 replies; 7+ messages in thread
From: Daniel Vetter @ 2020-11-18 21:25 UTC (permalink / raw)
  To: christian.koenig; +Cc: dri-devel

On Wed, Nov 18, 2020 at 01:49:51PM +0100, Christian König wrote:
> Am 17.11.20 um 18:46 schrieb Daniel Vetter:
> > On Tue, Nov 17, 2020 at 05:33:35PM +0100, Christian König wrote:
> > > ttm_module.h deals with internals of TTM and should never
> > > be include outside of it.
> > > 
> > > Signed-off-by: Christian König <christian.koenig@amd.com>
> > Maybe also move it to drivers/gpu/drm/ttm/ttm_internal.h. We're using the
> > _interal.h suffix in a few other places for module internal functions
> > already. Perhaps in a follow-up?
> 
> I've thought I already moved the header into drivers/gpu/drm/ttm/, but it
> somehow got mangled into patch #2.
> 
> Going to fix that and resend.
> 
> > Anyway this here is Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> For this one or the whole series? Please note that #2 removes the TTM sysfs
> files. I think that nobody every used those, but who knows?

Just this patch here, courage left me for the remaining ones today ...
-Daniel

> 
> Regards,
> Christian.
> 
> > (I didn't bother compile testing it on everything, just to make that
> > clear).
> > -Daniel
> > > ---
> > >   drivers/gpu/drm/amd/amdgpu/amdgpu.h           | 1 -
> > >   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       | 1 -
> > >   drivers/gpu/drm/nouveau/nouveau_drv.h         | 1 -
> > >   drivers/gpu/drm/qxl/qxl_drv.h                 | 1 -
> > >   drivers/gpu/drm/qxl/qxl_ttm.c                 | 1 -
> > >   drivers/gpu/drm/radeon/radeon.h               | 1 -
> > >   drivers/gpu/drm/radeon/radeon_ttm.c           | 1 -
> > >   drivers/gpu/drm/ttm/ttm_agp_backend.c         | 1 -
> > >   drivers/gpu/drm/ttm/ttm_bo_vm.c               | 1 -
> > >   drivers/gpu/drm/ttm/ttm_range_manager.c       | 1 -
> > >   drivers/gpu/drm/vmwgfx/ttm_object.c           | 1 -
> > >   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           | 1 -
> > >   drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           | 1 -
> > >   drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c | 1 -
> > >   drivers/gpu/drm/vmwgfx/vmwgfx_thp.c           | 1 -
> > >   include/drm/ttm/ttm_bo_driver.h               | 1 -
> > >   16 files changed, 16 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > > index 183b09d71b64..6e042b4ed13d 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> > > @@ -55,7 +55,6 @@
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_execbuf_util.h>
> > >   #include <drm/amdgpu_drm.h>
> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> > > index c438d290a6db..967859c6be3c 100644
> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> > > @@ -46,7 +46,6 @@
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/drm_debugfs.h>
> > >   #include <drm/amdgpu_drm.h>
> > > diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
> > > index 8e90b3e47bbe..700fa0979d14 100644
> > > --- a/drivers/gpu/drm/nouveau/nouveau_drv.h
> > > +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
> > > @@ -54,7 +54,6 @@
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/drm_audio_component.h>
> > > diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h
> > > index 8bd0f916dfbc..83b54f0dad61 100644
> > > --- a/drivers/gpu/drm/qxl/qxl_drv.h
> > > +++ b/drivers/gpu/drm/qxl/qxl_drv.h
> > > @@ -46,7 +46,6 @@
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_execbuf_util.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include "qxl_dev.h"
> > > diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > index 128c38c8a837..0cc661df2258 100644
> > > --- a/drivers/gpu/drm/qxl/qxl_ttm.c
> > > +++ b/drivers/gpu/drm/qxl/qxl_ttm.c
> > > @@ -31,7 +31,6 @@
> > >   #include <drm/qxl_drm.h>
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include "qxl_drv.h"
> > > diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
> > > index 28cb8ced91b9..428c561a4e2c 100644
> > > --- a/drivers/gpu/drm/radeon/radeon.h
> > > +++ b/drivers/gpu/drm/radeon/radeon.h
> > > @@ -75,7 +75,6 @@
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_execbuf_util.h>
> > >   #include <drm/drm_gem.h>
> > > diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> > > index 0ca381b95d3d..2259d3811a45 100644
> > > --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> > > +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> > > @@ -46,7 +46,6 @@
> > >   #include <drm/radeon_drm.h>
> > >   #include <drm/ttm/ttm_bo_api.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include "radeon_reg.h"
> > > diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > index 03c86628e4ac..8f9fa4188897 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
> > > @@ -32,7 +32,6 @@
> > >   #define pr_fmt(fmt) "[TTM] " fmt
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include <linux/agp_backend.h>
> > > diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> > > index 2944fa0af493..144a4940b6b6 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> > > @@ -31,7 +31,6 @@
> > >   #define pr_fmt(fmt) "[TTM] " fmt
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include <drm/drm_vma_manager.h>
> > > diff --git a/drivers/gpu/drm/ttm/ttm_range_manager.c b/drivers/gpu/drm/ttm/ttm_range_manager.c
> > > index ea77919569a2..4c0c756c9124 100644
> > > --- a/drivers/gpu/drm/ttm/ttm_range_manager.c
> > > +++ b/drivers/gpu/drm/ttm/ttm_range_manager.c
> > > @@ -29,7 +29,6 @@
> > >    * Authors: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
> > >    */
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include <drm/drm_mm.h>
> > > diff --git a/drivers/gpu/drm/vmwgfx/ttm_object.c b/drivers/gpu/drm/vmwgfx/ttm_object.c
> > > index 16077785ad47..0fe869d0fad1 100644
> > > --- a/drivers/gpu/drm/vmwgfx/ttm_object.c
> > > +++ b/drivers/gpu/drm/vmwgfx/ttm_object.c
> > > @@ -59,7 +59,6 @@
> > >   #define pr_fmt(fmt) "[TTM] " fmt
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <linux/list.h>
> > >   #include <linux/spinlock.h>
> > >   #include <linux/slab.h>
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> > > index 1310857879e7..e6de876a016a 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> > > @@ -35,7 +35,6 @@
> > >   #include <drm/drm_ioctl.h>
> > >   #include <drm/drm_sysfs.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include "ttm_object.h"
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> > > index b45becbb00f8..5b9a28157dd3 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
> > > @@ -39,7 +39,6 @@
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_execbuf_util.h>
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include "ttm_lock.h"
> > >   #include "ttm_object.h"
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
> > > index be325a62c178..8fe26e32f920 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c
> > > @@ -29,7 +29,6 @@
> > >    */
> > >   #include "vmwgfx_drv.h"
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > >   #include <linux/idr.h>
> > > diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> > > index 155ca3a5c7e5..e8e79de255cf 100644
> > > --- a/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> > > +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_thp.c
> > > @@ -5,7 +5,6 @@
> > >    * Copyright (C) 2007-2019 Vmware, Inc. All rights reservedd.
> > >    */
> > >   #include "vmwgfx_drv.h"
> > > -#include <drm/ttm/ttm_module.h>
> > >   #include <drm/ttm/ttm_bo_driver.h>
> > >   #include <drm/ttm/ttm_placement.h>
> > > diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> > > index 54788a5160a0..fdf01c7f1f99 100644
> > > --- a/include/drm/ttm/ttm_bo_driver.h
> > > +++ b/include/drm/ttm/ttm_bo_driver.h
> > > @@ -38,7 +38,6 @@
> > >   #include <linux/dma-resv.h>
> > >   #include "ttm_bo_api.h"
> > > -#include "ttm_module.h"
> > >   #include "ttm_placement.h"
> > >   #include "ttm_tt.h"
> > >   #include "ttm_pool.h"
> > > -- 
> > > 2.25.1
> > > 
> > > _______________________________________________
> > > dri-devel mailing list
> > > dri-devel@lists.freedesktop.org
> > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2020-11-18 21:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 16:33 [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Christian König
2020-11-17 16:33 ` [PATCH 2/4] drm/ttm: replace sysfs with debugfs Christian König
2020-11-17 16:33 ` [PATCH 3/4] drm/ttm: add a debugfs file for the global page pools Christian König
2020-11-17 16:33 ` [PATCH 4/4] drm/ttm: optimize ttm pool shrinker a bit Christian König
2020-11-17 17:46 ` [PATCH 1/4] drm/ttm/drivers: remove unecessary ttm_module.h include Daniel Vetter
2020-11-18 12:49   ` Christian König
2020-11-18 21:25     ` Daniel Vetter

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.