drm/ttm/drivers: remove unecessary ttm_module.h include
Subsystems (7)
PATCH 1/4 drm/ttm/drivers: remove unecessary ttm_module.h include
ttm_module.h deals with internals of TTM and should never be include outside of it.
--- 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(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +0 -1
@@ -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>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -1
@@ -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>
drivers/gpu/drm/nouveau/nouveau_drv.h +0 -1
@@ -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>
drivers/gpu/drm/qxl/qxl_drv.h +0 -1
@@ -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"
drivers/gpu/drm/qxl/qxl_ttm.c +0 -1
@@ -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"
drivers/gpu/drm/radeon/radeon.h +0 -1
@@ -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>
drivers/gpu/drm/radeon/radeon_ttm.c +0 -1
@@ -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"
drivers/gpu/drm/ttm/ttm_agp_backend.c +0 -1
@@ -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>
drivers/gpu/drm/ttm/ttm_bo_vm.c +0 -1
@@ -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>
drivers/gpu/drm/ttm/ttm_range_manager.c +0 -1
@@ -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>
drivers/gpu/drm/vmwgfx/ttm_object.c +0 -1
@@ -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>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +0 -1
@@ -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"
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +0 -1
@@ -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"
drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +0 -1
@@ -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>
drivers/gpu/drm/vmwgfx/vmwgfx_thp.c +0 -1
@@ -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>
include/drm/ttm/ttm_bo_driver.h +0 -1
@@ -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"
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm/ttm: replace sysfs with debugfs
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.
---
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%)drivers/gpu/drm/ttm/ttm_bo.c +4 -47
@@ -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;
drivers/gpu/drm/ttm/ttm_module.c +5 -53
74 lines not on this page · raw message
drivers/gpu/drm/ttm/ttm_module.h renamed from include/drm/ttm/ttm_module.h +4 -4
@@ -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_ */
include/drm/ttm/ttm_bo_driver.h +0 -1
@@ -245,7 +245,6 @@ extern struct ttm_bo_global {* Constant after init. */ -struct kobject kobj;struct page *dummy_read_page;spinlock_t lru_lock;
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm/ttm: add a debugfs file for the global page pools
In reply to Christian KönigInstead of printing this on the per device pool.
--- drivers/gpu/drm/ttm/ttm_pool.c | 70 ++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 20 deletions(-)
drivers/gpu/drm/ttm/ttm_pool.c +50 -20
@@ -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 ;
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 drm/ttm: optimize ttm pool shrinker a bit
In reply to Christian KönigOnly initialize the DMA coherent pools if they are used.
--- drivers/gpu/drm/ttm/ttm_pool.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-)
drivers/gpu/drm/ttm/ttm_pool.c +16 -7
@@ -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);
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Christian König
ttm_module.hdeals with internals of TTM and should never be include outside of it.Signed-off-by Christian König <[email protected]>
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 <[email protected]> (I didn't bother compile testing it on everything, just to make that clear).
-Daniel
Quoted 218 lines
--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +0
-1@@ -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> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-1@@ -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> drivers/gpu/drm/nouveau/nouveau_drv.h +0
-1@@ -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> drivers/gpu/drm/qxl/qxl_drv.h +0
-1@@ -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" drivers/gpu/drm/qxl/qxl_ttm.c +0
-1@@ -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" drivers/gpu/drm/radeon/radeon.h +0
-1@@ -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> drivers/gpu/drm/radeon/radeon_ttm.c +0
-1@@ -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" drivers/gpu/drm/ttm/ttm_agp_backend.c +0
-1@@ -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> drivers/gpu/drm/ttm/ttm_bo_vm.c +0
-1@@ -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> drivers/gpu/drm/ttm/ttm_range_manager.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/ttm_object.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +0
-1@@ -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" drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +0
-1@@ -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" drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/vmwgfx_thp.c +0
-1@@ -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> include/drm/ttm/ttm_bo_driver.h +0
-1@@ -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" Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 17.11.20 um 18:46 schrieb Daniel Vetter:
Quoted 8 lines · Christian König
Quoted 4 lines
ttm_module.hdeals with internals of TTM and should never be include outside of it.Signed-off-by Christian König <[email protected]>Maybe also move it to
drivers/gpu/drm/ttm/ttm_internal.h. We're using the_interal.hsuffix 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.
Quoted 1 line
Anyway this here is Acked-by: Daniel Vetter <[email protected]>
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.
Quoted 217 lines
(I didn't bother compile testing it on everything, just to make that clear).
-DanielQuoted 214 lines
--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +0
-1@@ -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> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-1@@ -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> drivers/gpu/drm/nouveau/nouveau_drv.h +0
-1@@ -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> drivers/gpu/drm/qxl/qxl_drv.h +0
-1@@ -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" drivers/gpu/drm/qxl/qxl_ttm.c +0
-1@@ -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" drivers/gpu/drm/radeon/radeon.h +0
-1@@ -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> drivers/gpu/drm/radeon/radeon_ttm.c +0
-1@@ -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" drivers/gpu/drm/ttm/ttm_agp_backend.c +0
-1@@ -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> drivers/gpu/drm/ttm/ttm_bo_vm.c +0
-1@@ -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> drivers/gpu/drm/ttm/ttm_range_manager.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/ttm_object.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +0
-1@@ -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" drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +0
-1@@ -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" drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/vmwgfx_thp.c +0
-1@@ -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> include/drm/ttm/ttm_bo_driver.h +0
-1@@ -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" Signature · 1 line
2.25.1
Quoted 4 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 13 lines · Christian König
Am 17.11.20 um 18:46 schrieb Daniel Vetter:
Quoted 8 lines · Christian König
Quoted 4 lines
ttm_module.hdeals with internals of TTM and should never be include outside of it.Signed-off-by Christian König <[email protected]>Maybe also move it to
drivers/gpu/drm/ttm/ttm_internal.h. We're using the_interal.hsuffix 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.
Quoted 6 lines
Going to fix that and resend.
Quoted 1 line
Anyway this here is Acked-by: Daniel Vetter <[email protected]>
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
Quoted 205 lines
Regards,
Christian.Quoted 200 lines
(I didn't bother compile testing it on everything, just to make that clear).
-DanielQuoted 197 lines
--- 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(-)drivers/gpu/drm/amd/amdgpu/amdgpu.h +0
-1@@ -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> drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-1@@ -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> drivers/gpu/drm/nouveau/nouveau_drv.h +0
-1@@ -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> drivers/gpu/drm/qxl/qxl_drv.h +0
-1@@ -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" drivers/gpu/drm/qxl/qxl_ttm.c +0
-1@@ -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" drivers/gpu/drm/radeon/radeon.h +0
-1@@ -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> drivers/gpu/drm/radeon/radeon_ttm.c +0
-1@@ -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" drivers/gpu/drm/ttm/ttm_agp_backend.c +0
-1@@ -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> drivers/gpu/drm/ttm/ttm_bo_vm.c +0
-1@@ -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> drivers/gpu/drm/ttm/ttm_range_manager.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/ttm_object.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +0
-1@@ -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" drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +0
-1@@ -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" drivers/gpu/drm/vmwgfx/vmwgfx_gmrid_manager.c +0
-1@@ -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> drivers/gpu/drm/vmwgfx/vmwgfx_thp.c +0
-1@@ -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> include/drm/ttm/ttm_bo_driver.h +0
-1@@ -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" Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel