diff options
author | Christian König <christian.koenig@amd.com> | 2020-10-01 15:51:40 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-01-21 16:51:45 +0300 |
commit | 8af8a109b34fa88b8b91f25d11485b37d37549c3 (patch) | |
tree | b0a0e3585d54f35d6bf6e263ce1d443511097df2 /drivers/gpu/drm/qxl | |
parent | b99c2c95412c0b85accdafe9e32ba1e84d240f55 (diff) | |
download | linux-8af8a109b34fa88b8b91f25d11485b37d37549c3.tar.xz |
drm/ttm: device naming cleanup
Rename ttm_bo_device to ttm_device.
Rename ttm_bo_driver to ttm_device_funcs.
Rename ttm_bo_global to ttm_global.
Move global and device related functions to ttm_device.[ch].
No functional change.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/415222/
Diffstat (limited to 'drivers/gpu/drm/qxl')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_drv.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_release.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ttm.c | 19 |
3 files changed, 14 insertions, 15 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 83b54f0dad61..01354b43c413 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -125,7 +125,7 @@ struct qxl_output { #define drm_encoder_to_qxl_output(x) container_of(x, struct qxl_output, enc) struct qxl_mman { - struct ttm_bo_device bdev; + struct ttm_device bdev; }; struct qxl_memslot { @@ -335,7 +335,7 @@ int qxl_mode_dumb_mmap(struct drm_file *filp, /* qxl ttm */ int qxl_ttm_init(struct qxl_device *qdev); void qxl_ttm_fini(struct qxl_device *qdev); -int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, +int qxl_ttm_io_mem_reserve(struct ttm_device *bdev, struct ttm_resource *mem); /* qxl image */ diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index 0fcfc952d5e9..c52412724c26 100644 --- a/drivers/gpu/drm/qxl/qxl_release.c +++ b/drivers/gpu/drm/qxl/qxl_release.c @@ -429,7 +429,7 @@ void qxl_release_unmap(struct qxl_device *qdev, void qxl_release_fence_buffer_objects(struct qxl_release *release) { struct ttm_buffer_object *bo; - struct ttm_bo_device *bdev; + struct ttm_device *bdev; struct ttm_validate_buffer *entry; struct qxl_device *qdev; @@ -450,7 +450,7 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release) release->id | 0xf0000000, release->base.seqno); trace_dma_fence_emit(&release->base); - spin_lock(&ttm_bo_glob.lru_lock); + spin_lock(&ttm_glob.lru_lock); list_for_each_entry(entry, &release->bos, head) { bo = entry->bo; @@ -459,7 +459,7 @@ void qxl_release_fence_buffer_objects(struct qxl_release *release) ttm_bo_move_to_lru_tail(bo, &bo->mem, NULL); dma_resv_unlock(bo->base.resv); } - spin_unlock(&ttm_bo_glob.lru_lock); + spin_unlock(&ttm_glob.lru_lock); ww_acquire_fini(&release->ticket); } diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 33c09dc94f8b..b7f77eb685cb 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -36,7 +36,7 @@ #include "qxl_drv.h" #include "qxl_object.h" -static struct qxl_device *qxl_get_qdev(struct ttm_bo_device *bdev) +static struct qxl_device *qxl_get_qdev(struct ttm_device *bdev) { struct qxl_mman *mman; struct qxl_device *qdev; @@ -69,7 +69,7 @@ static void qxl_evict_flags(struct ttm_buffer_object *bo, *placement = qbo->placement; } -int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, +int qxl_ttm_io_mem_reserve(struct ttm_device *bdev, struct ttm_resource *mem) { struct qxl_device *qdev = qxl_get_qdev(bdev); @@ -98,8 +98,7 @@ int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, /* * TTM backend functions. */ -static void qxl_ttm_backend_destroy(struct ttm_bo_device *bdev, - struct ttm_tt *ttm) +static void qxl_ttm_backend_destroy(struct ttm_device *bdev, struct ttm_tt *ttm) { ttm_tt_destroy_common(bdev, ttm); ttm_tt_fini(ttm); @@ -170,7 +169,7 @@ static void qxl_bo_delete_mem_notify(struct ttm_buffer_object *bo) qxl_bo_move_notify(bo, false, NULL); } -static struct ttm_bo_driver qxl_bo_driver = { +static struct ttm_device_funcs qxl_bo_driver = { .ttm_tt_create = &qxl_ttm_tt_create, .ttm_tt_destroy = &qxl_ttm_backend_destroy, .eviction_valuable = ttm_bo_eviction_valuable, @@ -193,10 +192,10 @@ int qxl_ttm_init(struct qxl_device *qdev) int num_io_pages; /* != rom->num_io_pages, we include surface0 */ /* No others user of address space so set it to 0 */ - r = ttm_bo_device_init(&qdev->mman.bdev, &qxl_bo_driver, NULL, - qdev->ddev.anon_inode->i_mapping, - qdev->ddev.vma_offset_manager, - false, false); + r = ttm_device_init(&qdev->mman.bdev, &qxl_bo_driver, NULL, + qdev->ddev.anon_inode->i_mapping, + qdev->ddev.vma_offset_manager, + false, false); if (r) { DRM_ERROR("failed initializing buffer object driver(%d).\n", r); return r; @@ -227,7 +226,7 @@ void qxl_ttm_fini(struct qxl_device *qdev) { ttm_range_man_fini(&qdev->mman.bdev, TTM_PL_VRAM); ttm_range_man_fini(&qdev->mman.bdev, TTM_PL_PRIV); - ttm_bo_device_release(&qdev->mman.bdev); + ttm_device_fini(&qdev->mman.bdev); DRM_INFO("qxl: ttm finalized\n"); } |