diff options
Diffstat (limited to 'include/drm/ttm/ttm_tt.h')
-rw-r--r-- | include/drm/ttm/ttm_tt.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 241cc40839ed..6bda88f8da46 100644 --- a/include/drm/ttm/ttm_tt.h +++ b/include/drm/ttm/ttm_tt.h @@ -60,7 +60,7 @@ struct ttm_backend_func { * indicated by @bo_mem. This function should be able to handle * differences between aperture and system page sizes. */ - int (*bind) (struct ttm_tt *ttm, struct ttm_resource *bo_mem); + int (*bind) (struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_resource *bo_mem); /** * struct ttm_backend_func member unbind @@ -70,7 +70,7 @@ struct ttm_backend_func { * Unbind previously bound backend pages. This function should be * able to handle differences between aperture and system page sizes. */ - void (*unbind) (struct ttm_tt *ttm); + void (*unbind) (struct ttm_bo_device *bdev, struct ttm_tt *ttm); /** * struct ttm_backend_func member destroy @@ -80,13 +80,12 @@ struct ttm_backend_func { * Destroy the backend. This will be call back from ttm_tt_destroy so * don't call ttm_tt_destroy from the callback or infinite loop. */ - void (*destroy) (struct ttm_tt *ttm); + void (*destroy) (struct ttm_bo_device *bdev, struct ttm_tt *ttm); }; /** * struct ttm_tt * - * @bdev: Pointer to a struct ttm_bo_device. * @func: Pointer to a struct ttm_backend_func that describes * the backend methods. * pointer. @@ -103,7 +102,6 @@ struct ttm_backend_func { * memory. */ struct ttm_tt { - struct ttm_bo_device *bdev; struct ttm_backend_func *func; struct page **pages; uint32_t page_flags; @@ -183,7 +181,8 @@ void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma); * * Bind the pages of @ttm to an aperture location identified by @bo_mem */ -int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_resource *bo_mem, +int ttm_tt_bind(struct ttm_bo_device *bdev, + struct ttm_tt *ttm, struct ttm_resource *bo_mem, struct ttm_operation_ctx *ctx); /** @@ -193,7 +192,7 @@ int ttm_tt_bind(struct ttm_tt *ttm, struct ttm_resource *bo_mem, * * Unbind, unpopulate and destroy common struct ttm_tt. */ -void ttm_tt_destroy(struct ttm_tt *ttm); +void ttm_tt_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm); /** * ttm_ttm_unbind: @@ -202,7 +201,7 @@ void ttm_tt_destroy(struct ttm_tt *ttm); * * Unbind a struct ttm_tt. */ -void ttm_tt_unbind(struct ttm_tt *ttm); +void ttm_tt_unbind(struct ttm_bo_device *bdev, struct ttm_tt *ttm); /** * ttm_tt_swapin: @@ -227,7 +226,7 @@ int ttm_tt_swapin(struct ttm_tt *ttm); * and cache flushes and potential page splitting / combining. */ int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); -int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage); +int ttm_tt_swapout(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct file *persistent_swap_storage); /** * ttm_tt_populate - allocate pages for a ttm @@ -236,7 +235,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage); * * Calls the driver method to allocate pages for a ttm */ -int ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx); +int ttm_tt_populate(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_operation_ctx *ctx); /** * ttm_tt_unpopulate - free pages from a ttm @@ -245,7 +244,7 @@ int ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx); * * Calls the driver method to free all pages from a ttm */ -void ttm_tt_unpopulate(struct ttm_tt *ttm); +void ttm_tt_unpopulate(struct ttm_bo_device *bdev, struct ttm_tt *ttm); #if IS_ENABLED(CONFIG_AGP) #include <linux/agp_backend.h> @@ -265,8 +264,8 @@ void ttm_tt_unpopulate(struct ttm_tt *ttm); struct ttm_tt *ttm_agp_tt_create(struct ttm_buffer_object *bo, struct agp_bridge_data *bridge, uint32_t page_flags); -int ttm_agp_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx); -void ttm_agp_tt_unpopulate(struct ttm_tt *ttm); +int ttm_agp_tt_populate(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_operation_ctx *ctx); +void ttm_agp_tt_unpopulate(struct ttm_bo_device *bdev, struct ttm_tt *ttm); #endif #endif |