diff options
author | Dave Airlie <airlied@redhat.com> | 2020-10-06 03:06:40 +0300 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-10-07 08:41:44 +0300 |
commit | 881c4117957bc39390930f8344c600858a72179b (patch) | |
tree | 609fac934484300cad5379ff55ef7177df79676b /drivers/gpu/drm | |
parent | 8117713d7804d168f91edebcb498067664c38e6e (diff) | |
download | linux-881c4117957bc39390930f8344c600858a72179b.tar.xz |
drm/qxl: drop unused code (v2)
v2: drop the wrapper struct
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201006000644.1005758-2-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ttm.c | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 2c35ca4270c6..669bceb58205 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -98,19 +98,11 @@ int qxl_ttm_io_mem_reserve(struct ttm_bo_device *bdev, /* * TTM backend functions. */ -struct qxl_ttm_tt { - struct ttm_tt ttm; - struct qxl_device *qdev; - u64 offset; -}; static int qxl_ttm_backend_bind(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_resource *bo_mem) { - struct qxl_ttm_tt *gtt = (void *)ttm; - - gtt->offset = (unsigned long)(bo_mem->start << PAGE_SHIFT); if (!ttm->num_pages) { WARN(1, "nothing to bind %lu pages for mreg %p back %p!\n", ttm->num_pages, bo_mem, ttm); @@ -128,29 +120,24 @@ static void qxl_ttm_backend_unbind(struct ttm_bo_device *bdev, static void qxl_ttm_backend_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm) { - struct qxl_ttm_tt *gtt = (void *)ttm; - ttm_tt_destroy_common(bdev, ttm); - ttm_tt_fini(>t->ttm); - kfree(gtt); + ttm_tt_fini(ttm); + kfree(ttm); } static struct ttm_tt *qxl_ttm_tt_create(struct ttm_buffer_object *bo, uint32_t page_flags) { - struct qxl_device *qdev; - struct qxl_ttm_tt *gtt; + struct ttm_tt *ttm; - qdev = qxl_get_qdev(bo->bdev); - gtt = kzalloc(sizeof(struct qxl_ttm_tt), GFP_KERNEL); - if (gtt == NULL) + ttm = kzalloc(sizeof(struct ttm_tt), GFP_KERNEL); + if (ttm == NULL) return NULL; - gtt->qdev = qdev; - if (ttm_tt_init(>t->ttm, bo, page_flags)) { - kfree(gtt); + if (ttm_tt_init(ttm, bo, page_flags)) { + kfree(ttm); return NULL; } - return >t->ttm; + return ttm; } static int qxl_bo_move(struct ttm_buffer_object *bo, bool evict, |