drm/ttm: nuke invalidate_caches callback
Subsystems (7)
PATCH 1/1 drm/ttm: nuke invalidate_caches callback
Another completely unused feature.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ------ drivers/gpu/drm/nouveau/nouveau_bo.c | 8 -------- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------ drivers/gpu/drm/radeon/radeon_ttm.c | 6 ------ drivers/gpu/drm/ttm/ttm_bo.c | 9 +-------- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 ------ include/drm/ttm/ttm_bo_driver.h | 15 --------------- 7 files changed, 1 insertion(+), 55 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0 -6
@@ -68,11 +68,6 @@ static int amdgpu_map_buffer(struct ttm_buffer_object *bo,static int amdgpu_ttm_debugfs_init (struct amdgpu_device *adev);static void amdgpu_ttm_debugfs_fini (struct amdgpu_device *adev); -static int amdgpu_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -/** * amdgpu_init_mem_type - Initialize a memory manager for a specific type of * memory request.
@@ -1637,7 +1632,6 @@ static struct ttm_bo_driver amdgpu_bo_driver = { .ttm_tt_create = &amdgpu_ttm_tt_create, .ttm_tt_populate = &amdgpu_ttm_tt_populate, .ttm_tt_unpopulate = &amdgpu_ttm_tt_unpopulate, - .invalidate_caches = &amdgpu_invalidate_caches, .init_mem_type = &amdgpu_init_mem_type, .eviction_valuable = amdgpu_ttm_bo_eviction_valuable, .evict_flags = &amdgpu_evict_flags,
drivers/gpu/drm/nouveau/nouveau_bo.c +0 -8
@@ -646,13 +646,6 @@ nouveau_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags)return nouveau_sgdma_create_ttm (bo, page_flags); } -static int -nouveau_bo_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -/* We'll do this from user space. */ -return 0 ; -} -static int nouveau_bo_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man)
@@ -1696,7 +1689,6 @@ struct ttm_bo_driver nouveau_bo_driver = { .ttm_tt_create = &nouveau_ttm_tt_create, .ttm_tt_populate = &nouveau_ttm_tt_populate, .ttm_tt_unpopulate = &nouveau_ttm_tt_unpopulate, - .invalidate_caches = nouveau_bo_invalidate_caches, .init_mem_type = nouveau_bo_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = nouveau_bo_evict_flags,
drivers/gpu/drm/qxl/qxl_ttm.c +0 -6
@@ -48,11 +48,6 @@ static struct qxl_device *qxl_get_qdev(struct ttm_bo_device *bdev)return qdev; } -static int qxl_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int qxl_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {
@@ -256,7 +251,6 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,static struct ttm_bo_driver qxl_bo_driver = { .ttm_tt_create = &qxl_ttm_tt_create, - .invalidate_caches = &qxl_invalidate_caches, .init_mem_type = &qxl_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &qxl_evict_flags,
drivers/gpu/drm/radeon/radeon_ttm.c +0 -6
@@ -66,11 +66,6 @@ static struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev)return rdev; } -static int radeon_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int radeon_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {
@@ -774,7 +769,6 @@ static struct ttm_bo_driver radeon_bo_driver = { .ttm_tt_create = &radeon_ttm_tt_create, .ttm_tt_populate = &radeon_ttm_tt_populate, .ttm_tt_unpopulate = &radeon_ttm_tt_unpopulate, - .invalidate_caches = &radeon_invalidate_caches, .init_mem_type = &radeon_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &radeon_evict_flags,
drivers/gpu/drm/ttm/ttm_bo.c +1 -8
@@ -372,14 +372,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, } moved: -if (bo->evicted) { -if (bdev->driver->invalidate_caches) { - ret = bdev->driver->invalidate_caches (bdev, bo->mem.placement); -if (ret) -pr_err ("Can not flush read caches\n" ); - } - bo->evicted = false; - } + bo->evicted = false;if (bo->mem.mm_node) bo->offset = (bo->mem.start << PAGE_SHIFT) +
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0 -6
@@ -736,11 +736,6 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,return NULL ; } -static int vmw_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int vmw_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {
@@ -866,7 +861,6 @@ struct ttm_bo_driver vmw_bo_driver = { .ttm_tt_create = &vmw_ttm_tt_create, .ttm_tt_populate = &vmw_ttm_populate, .ttm_tt_unpopulate = &vmw_ttm_unpopulate, - .invalidate_caches = vmw_invalidate_caches, .init_mem_type = vmw_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = vmw_evict_flags,
include/drm/ttm/ttm_bo_driver.h +0 -15
@@ -210,8 +210,6 @@ struct ttm_mem_type_manager {* struct ttm_bo_driver * * @create_ttm_backend_entry: Callback to create a struct ttm_backend. -* @invalidate_caches: Callback to invalidate read caches when a buffer object -* has been evicted. * @init_mem_type: Callback to initialize a struct ttm_mem_type_manager * structure. * @evict_flags: Callback to obtain placement flags when a buffer is evicted.
@@ -256,19 +254,6 @@ struct ttm_bo_driver {*/ void (*ttm_tt_unpopulate)(struct ttm_tt *ttm); -/** -* struct ttm_bo_driver member invalidate_caches -* -* @bdev: the buffer object device. -* @flags: new placement of the rebound buffer object. -* -* A previosly evicted buffer has been rebound in a -* potentially new location. Tell the driver that it might -* consider invalidating read (texture) caches on the next command -* submission as a consequence. -*/ - -int (*invalidate_caches)(struct ttm_bo_device *bdev,uint32_t flags);int (*init_mem_type)(struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man);
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
IIRC this was used by the old i915 implementation.
/Thomas
Quoted 178 lines · Christian König
Another completely unused feature.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ------ drivers/gpu/drm/nouveau/nouveau_bo.c | 8 -------- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------ drivers/gpu/drm/radeon/radeon_ttm.c | 6 ------ drivers/gpu/drm/ttm/ttm_bo.c | 9 +-------- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 ------ include/drm/ttm/ttm_bo_driver.h | 15 --------------- 7 files changed, 1 insertion(+), 55 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-6@@ -68,11 +68,6 @@ static int amdgpu_map_buffer(struct ttm_buffer_object *bo,static int amdgpu_ttm_debugfs_init (struct amdgpu_device *adev);static void amdgpu_ttm_debugfs_fini (struct amdgpu_device *adev); -static int amdgpu_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -/** * amdgpu_init_mem_type - Initialize a memory manager for a specific type of * memory request. @@ -1637,7 +1632,6 @@ static struct ttm_bo_driver amdgpu_bo_driver = { .ttm_tt_create = &amdgpu_ttm_tt_create, .ttm_tt_populate = &amdgpu_ttm_tt_populate, .ttm_tt_unpopulate = &amdgpu_ttm_tt_unpopulate, - .invalidate_caches = &amdgpu_invalidate_caches, .init_mem_type = &amdgpu_init_mem_type, .eviction_valuable = amdgpu_ttm_bo_eviction_valuable, .evict_flags = &amdgpu_evict_flags,drivers/gpu/drm/nouveau/nouveau_bo.c +0
-8@@ -646,13 +646,6 @@ nouveau_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags)return nouveau_sgdma_create_ttm (bo, page_flags); } -static int -nouveau_bo_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -/* We'll do this from user space. */ -return 0 ; -} -static int nouveau_bo_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man)@@ -1696,7 +1689,6 @@ struct ttm_bo_driver nouveau_bo_driver = { .ttm_tt_create = &nouveau_ttm_tt_create, .ttm_tt_populate = &nouveau_ttm_tt_populate, .ttm_tt_unpopulate = &nouveau_ttm_tt_unpopulate, - .invalidate_caches = nouveau_bo_invalidate_caches, .init_mem_type = nouveau_bo_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = nouveau_bo_evict_flags,drivers/gpu/drm/qxl/qxl_ttm.c +0
-6@@ -48,11 +48,6 @@ static struct qxl_device *qxl_get_qdev(struct ttm_bo_device *bdev)return qdev; } -static int qxl_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int qxl_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -256,7 +251,6 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,static struct ttm_bo_driver qxl_bo_driver = { .ttm_tt_create = &qxl_ttm_tt_create, - .invalidate_caches = &qxl_invalidate_caches, .init_mem_type = &qxl_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &qxl_evict_flags,drivers/gpu/drm/radeon/radeon_ttm.c +0
-6@@ -66,11 +66,6 @@ static struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev)return rdev; } -static int radeon_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int radeon_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -774,7 +769,6 @@ static struct ttm_bo_driver radeon_bo_driver = { .ttm_tt_create = &radeon_ttm_tt_create, .ttm_tt_populate = &radeon_ttm_tt_populate, .ttm_tt_unpopulate = &radeon_ttm_tt_unpopulate, - .invalidate_caches = &radeon_invalidate_caches, .init_mem_type = &radeon_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &radeon_evict_flags,drivers/gpu/drm/ttm/ttm_bo.c +1
-8@@ -372,14 +372,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, } moved: -if (bo->evicted) { -if (bdev->driver->invalidate_caches) { - ret = bdev->driver->invalidate_caches (bdev, bo->mem.placement); -if (ret) -pr_err ("Can not flush read caches\n" ); - } - bo->evicted = false; - } + bo->evicted = false;if (bo->mem.mm_node) bo->offset = (bo->mem.start << PAGE_SHIFT) +drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0
-6@@ -736,11 +736,6 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,return NULL ; } -static int vmw_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int vmw_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -866,7 +861,6 @@ struct ttm_bo_driver vmw_bo_driver = { .ttm_tt_create = &vmw_ttm_tt_create, .ttm_tt_populate = &vmw_ttm_populate, .ttm_tt_unpopulate = &vmw_ttm_unpopulate, - .invalidate_caches = vmw_invalidate_caches, .init_mem_type = vmw_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = vmw_evict_flags,include/drm/ttm/ttm_bo_driver.h +0
-8@@ -210,8 +210,6 @@ struct ttm_mem_type_manager {* struct ttm_bo_driver * * @create_ttm_backend_entry: Callback to create a struct ttm_backend. -* @invalidate_caches: Callback to invalidate read caches when a buffer object -* has been evicted. * @init_mem_type: Callback to initialize a struct ttm_mem_type_manager * structure. * @evict_flags: Callback to obtain placement flags when a buffer is evicted. @@ -256,19 +254,6 @@ struct ttm_bo_driver {*/ void (*ttm_tt_unpopulate)(struct ttm_tt *ttm); -/** -* struct ttm_bo_driver member invalidate_caches -* -* @bdev: the buffer object device. -* @flags: new placement of the rebound buffer object. -*
include/drm/ttm/ttm_bo_driver.h struct ttm_bo_driver { · line 259
Quoted 10 lines
include/drm/ttm/ttm_bo_driver.h +0
-7-* A previosly evicted buffer has been rebound in a -* potentially new location. Tell the driver that it might -* consider invalidating read (texture) caches on the next command -* submission as a consequence. -*/ - -int (*invalidate_caches)(struct ttm_bo_device *bdev,uint32_t flags);int (*init_mem_type)(struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Ping? Just a trivial cleanup.
Am 10.01.20 um 16:09 schrieb Christian König:
Quoted 178 lines
Another completely unused feature.
Signed-off-by Christian König <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ------ drivers/gpu/drm/nouveau/nouveau_bo.c | 8 -------- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------ drivers/gpu/drm/radeon/radeon_ttm.c | 6 ------ drivers/gpu/drm/ttm/ttm_bo.c | 9 +-------- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 ------ include/drm/ttm/ttm_bo_driver.h | 15 --------------- 7 files changed, 1 insertion(+), 55 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-6@@ -68,11 +68,6 @@ static int amdgpu_map_buffer(struct ttm_buffer_object *bo,static int amdgpu_ttm_debugfs_init (struct amdgpu_device *adev);static void amdgpu_ttm_debugfs_fini (struct amdgpu_device *adev); -static int amdgpu_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -/** * amdgpu_init_mem_type - Initialize a memory manager for a specific type of * memory request. @@ -1637,7 +1632,6 @@ static struct ttm_bo_driver amdgpu_bo_driver = { .ttm_tt_create = &amdgpu_ttm_tt_create, .ttm_tt_populate = &amdgpu_ttm_tt_populate, .ttm_tt_unpopulate = &amdgpu_ttm_tt_unpopulate, - .invalidate_caches = &amdgpu_invalidate_caches, .init_mem_type = &amdgpu_init_mem_type, .eviction_valuable = amdgpu_ttm_bo_eviction_valuable, .evict_flags = &amdgpu_evict_flags,drivers/gpu/drm/nouveau/nouveau_bo.c +0
-8@@ -646,13 +646,6 @@ nouveau_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags)return nouveau_sgdma_create_ttm (bo, page_flags); } -static int -nouveau_bo_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -/* We'll do this from user space. */ -return 0 ; -} -static int nouveau_bo_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man)@@ -1696,7 +1689,6 @@ struct ttm_bo_driver nouveau_bo_driver = { .ttm_tt_create = &nouveau_ttm_tt_create, .ttm_tt_populate = &nouveau_ttm_tt_populate, .ttm_tt_unpopulate = &nouveau_ttm_tt_unpopulate, - .invalidate_caches = nouveau_bo_invalidate_caches, .init_mem_type = nouveau_bo_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = nouveau_bo_evict_flags,drivers/gpu/drm/qxl/qxl_ttm.c +0
-6@@ -48,11 +48,6 @@ static struct qxl_device *qxl_get_qdev(struct ttm_bo_device *bdev)return qdev; } -static int qxl_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int qxl_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -256,7 +251,6 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,static struct ttm_bo_driver qxl_bo_driver = { .ttm_tt_create = &qxl_ttm_tt_create, - .invalidate_caches = &qxl_invalidate_caches, .init_mem_type = &qxl_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &qxl_evict_flags,drivers/gpu/drm/radeon/radeon_ttm.c +0
-6@@ -66,11 +66,6 @@ static struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev)return rdev; } -static int radeon_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int radeon_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -774,7 +769,6 @@ static struct ttm_bo_driver radeon_bo_driver = { .ttm_tt_create = &radeon_ttm_tt_create, .ttm_tt_populate = &radeon_ttm_tt_populate, .ttm_tt_unpopulate = &radeon_ttm_tt_unpopulate, - .invalidate_caches = &radeon_invalidate_caches, .init_mem_type = &radeon_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &radeon_evict_flags,drivers/gpu/drm/ttm/ttm_bo.c +1
-8@@ -372,14 +372,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, } moved: -if (bo->evicted) { -if (bdev->driver->invalidate_caches) { - ret = bdev->driver->invalidate_caches (bdev, bo->mem.placement); -if (ret) -pr_err ("Can not flush read caches\n" ); - } - bo->evicted = false; - } + bo->evicted = false;if (bo->mem.mm_node) bo->offset = (bo->mem.start << PAGE_SHIFT) +drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0
-6@@ -736,11 +736,6 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,return NULL ; } -static int vmw_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int vmw_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -866,7 +861,6 @@ struct ttm_bo_driver vmw_bo_driver = { .ttm_tt_create = &vmw_ttm_tt_create, .ttm_tt_populate = &vmw_ttm_populate, .ttm_tt_unpopulate = &vmw_ttm_unpopulate, - .invalidate_caches = vmw_invalidate_caches, .init_mem_type = vmw_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = vmw_evict_flags,include/drm/ttm/ttm_bo_driver.h +0
-8@@ -210,8 +210,6 @@ struct ttm_mem_type_manager {* struct ttm_bo_driver * * @create_ttm_backend_entry: Callback to create a struct ttm_backend. -* @invalidate_caches: Callback to invalidate read caches when a buffer object -* has been evicted. * @init_mem_type: Callback to initialize a struct ttm_mem_type_manager * structure. * @evict_flags: Callback to obtain placement flags when a buffer is evicted. @@ -256,19 +254,6 @@ struct ttm_bo_driver {*/ void (*ttm_tt_unpopulate)(struct ttm_tt *ttm); -/** -* struct ttm_bo_driver member invalidate_caches -* -* @bdev: the buffer object device. -* @flags: new placement of the rebound buffer object. -*
include/drm/ttm/ttm_bo_driver.h struct ttm_bo_driver { · line 259
Quoted 10 lines
include/drm/ttm/ttm_bo_driver.h +0
-7-* A previosly evicted buffer has been rebound in a -* potentially new location. Tell the driver that it might -* consider invalidating read (texture) caches on the next command -* submission as a consequence. -*/ - -int (*invalidate_caches)(struct ttm_bo_device *bdev,uint32_t flags);int (*init_mem_type)(struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Huang Rui
Reviewed-byQuoted 6 lines · Christian König
Ping? Just a trivial cleanup.
Am 10.01.20 um 16:09 schrieb Christian König:
Quoted 3 lines
Another completely unused feature.
Signed-off-by Christian König <[email protected]>
Quoted 169 lines
Quoted 169 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 ------ drivers/gpu/drm/nouveau/nouveau_bo.c | 8 -------- drivers/gpu/drm/qxl/qxl_ttm.c | 6 ------ drivers/gpu/drm/radeon/radeon_ttm.c | 6 ------ drivers/gpu/drm/ttm/ttm_bo.c | 9 +-------- drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c | 6 ------ include/drm/ttm/ttm_bo_driver.h | 15 --------------- 7 files changed, 1 insertion(+), 55 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-6@@ -68,11 +68,6 @@ static int amdgpu_map_buffer(struct ttm_buffer_object *bo,static int amdgpu_ttm_debugfs_init (struct amdgpu_device *adev);static void amdgpu_ttm_debugfs_fini (struct amdgpu_device *adev); -static int amdgpu_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -/** * amdgpu_init_mem_type - Initialize a memory manager for a specific type of * memory request. @@ -1637,7 +1632,6 @@ static struct ttm_bo_driver amdgpu_bo_driver = { .ttm_tt_create = &amdgpu_ttm_tt_create, .ttm_tt_populate = &amdgpu_ttm_tt_populate, .ttm_tt_unpopulate = &amdgpu_ttm_tt_unpopulate, - .invalidate_caches = &amdgpu_invalidate_caches, .init_mem_type = &amdgpu_init_mem_type, .eviction_valuable = amdgpu_ttm_bo_eviction_valuable, .evict_flags = &amdgpu_evict_flags,drivers/gpu/drm/nouveau/nouveau_bo.c +0
-8@@ -646,13 +646,6 @@ nouveau_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags)return nouveau_sgdma_create_ttm (bo, page_flags); } -static int -nouveau_bo_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -/* We'll do this from user space. */ -return 0 ; -} -static int nouveau_bo_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man)@@ -1696,7 +1689,6 @@ struct ttm_bo_driver nouveau_bo_driver = { .ttm_tt_create = &nouveau_ttm_tt_create, .ttm_tt_populate = &nouveau_ttm_tt_populate, .ttm_tt_unpopulate = &nouveau_ttm_tt_unpopulate, - .invalidate_caches = nouveau_bo_invalidate_caches, .init_mem_type = nouveau_bo_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = nouveau_bo_evict_flags,drivers/gpu/drm/qxl/qxl_ttm.c +0
-6@@ -48,11 +48,6 @@ static struct qxl_device *qxl_get_qdev(struct ttm_bo_device *bdev)return qdev; } -static int qxl_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int qxl_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -256,7 +251,6 @@ static void qxl_bo_move_notify(struct ttm_buffer_object *bo,static struct ttm_bo_driver qxl_bo_driver = { .ttm_tt_create = &qxl_ttm_tt_create, - .invalidate_caches = &qxl_invalidate_caches, .init_mem_type = &qxl_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &qxl_evict_flags,drivers/gpu/drm/radeon/radeon_ttm.c +0
-6@@ -66,11 +66,6 @@ static struct radeon_device *radeon_get_rdev(struct ttm_bo_device *bdev)return rdev; } -static int radeon_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int radeon_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -774,7 +769,6 @@ static struct ttm_bo_driver radeon_bo_driver = { .ttm_tt_create = &radeon_ttm_tt_create, .ttm_tt_populate = &radeon_ttm_tt_populate, .ttm_tt_unpopulate = &radeon_ttm_tt_unpopulate, - .invalidate_caches = &radeon_invalidate_caches, .init_mem_type = &radeon_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = &radeon_evict_flags,drivers/gpu/drm/ttm/ttm_bo.c +1
-8@@ -372,14 +372,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo, } moved: -if (bo->evicted) { -if (bdev->driver->invalidate_caches) { - ret = bdev->driver->invalidate_caches (bdev, bo->mem.placement); -if (ret) -pr_err ("Can not flush read caches\n" ); - } - bo->evicted = false; - } + bo->evicted = false;if (bo->mem.mm_node) bo->offset = (bo->mem.start << PAGE_SHIFT) +drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c +0
-6@@ -736,11 +736,6 @@ static struct ttm_tt *vmw_ttm_tt_create(struct ttm_buffer_object *bo,return NULL ; } -static int vmw_invalidate_caches (struct ttm_bo_device *bdev,uint32_t flags) -{ -return 0 ; -} -static int vmw_init_mem_type (struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man) {@@ -866,7 +861,6 @@ struct ttm_bo_driver vmw_bo_driver = { .ttm_tt_create = &vmw_ttm_tt_create, .ttm_tt_populate = &vmw_ttm_populate, .ttm_tt_unpopulate = &vmw_ttm_unpopulate, - .invalidate_caches = vmw_invalidate_caches, .init_mem_type = vmw_init_mem_type, .eviction_valuable = ttm_bo_eviction_valuable, .evict_flags = vmw_evict_flags,include/drm/ttm/ttm_bo_driver.h +0
-2@@ -210,8 +210,6 @@ struct ttm_mem_type_manager {* struct ttm_bo_driver * * @create_ttm_backend_entry: Callback to create a struct ttm_backend. -* @invalidate_caches: Callback to invalidate read caches when a buffer object -* has been evicted. * @init_mem_type: Callback to initialize a struct ttm_mem_type_manager * structure. * @evict_flags: Callback to obtain placement flags when a buffer is evicted. @@ -256,19 +254,6 @@ struct ttm_bo_driver {*/ void (*ttm_tt_unpopulate)(struct ttm_tt *ttm);
Quoted 17 lines
Quoted 6 lines
include/drm/ttm/ttm_bo_driver.h +0
-6-/** -* struct ttm_bo_driver member invalidate_caches -* -* @bdev: the buffer object device. -* @flags: new placement of the rebound buffer object. -* include/drm/ttm/ttm_bo_driver.h struct ttm_bo_driver { · line 259
Quoted 10 lines
include/drm/ttm/ttm_bo_driver.h +0
-7-* A previosly evicted buffer has been rebound in a -* potentially new location. Tell the driver that it might -* consider invalidating read (texture) caches on the next command -* submission as a consequence. -*/ - -int (*invalidate_caches)(struct ttm_bo_device *bdev,uint32_t flags);int (*init_mem_type)(struct ttm_bo_device *bdev,uint32_t type,struct ttm_mem_type_manager *man);
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel