diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-04 12:55:44 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-06 12:16:47 +1000 |
commit | 00c2f6b3e8414ebea45f994dd81166a16670d231 (patch) | |
tree | df0296a8faf9c6c0908bb3263e72bc22964c6eb8 /drivers/gpu/drm/qxl/qxl_ttm.c | |
parent | a0bb77cb77e290c3d5862435a36ee9ea92cc3be1 (diff) | |
download | linux-00c2f6b3e8414ebea45f994dd81166a16670d231.tar.bz2 |
drm/qxl/ttm: call ttm manager debug (v2)
v2: use the new exported interface.
This code was poking inside a struct and assuming it was a drm_mm
at the start. Call the proper API.
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-12-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/qxl/qxl_ttm.c')
-rw-r--r-- | drivers/gpu/drm/qxl/qxl_ttm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 32069e4799f3..10109a3a168a 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -280,12 +280,10 @@ void qxl_ttm_fini(struct qxl_device *qdev) static int qxl_mm_dump_table(struct seq_file *m, void *data) { struct drm_info_node *node = (struct drm_info_node *)m->private; - struct drm_mm *mm = (struct drm_mm *)node->info_ent->data; + struct ttm_mem_type_manager *man = (struct ttm_mem_type_manager *)node->info_ent->data; struct drm_printer p = drm_seq_file_printer(m); - spin_lock(&ttm_bo_glob.lru_lock); - drm_mm_print(mm, &p); - spin_unlock(&ttm_bo_glob.lru_lock); + ttm_mem_type_manager_debug(man, &p); return 0; } #endif @@ -306,9 +304,9 @@ void qxl_ttm_debugfs_init(struct qxl_device *qdev) qxl_mem_types_list[i].show = &qxl_mm_dump_table; qxl_mem_types_list[i].driver_features = 0; if (i == 0) - qxl_mem_types_list[i].data = qdev->mman.bdev.man[TTM_PL_VRAM].priv; + qxl_mem_types_list[i].data = &qdev->mman.bdev.man[TTM_PL_VRAM]; else - qxl_mem_types_list[i].data = qdev->mman.bdev.man[TTM_PL_PRIV].priv; + qxl_mem_types_list[i].data = &qdev->mman.bdev.man[TTM_PL_PRIV]; } qxl_debugfs_add_files(qdev, qxl_mem_types_list, i); |