From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org> Cc: daniel.vetter@ffwll.ch, michel@daenzer.net, ckoenig.leichtzumerken@gmail.com Subject: [PATCH 1/6] drm/ttm: Add unampping of the entire device address space Date: Sat, 9 May 2020 14:51:45 -0400 [thread overview] Message-ID: <1589050310-19666-2-git-send-email-andrey.grodzovsky@amd.com> (raw) In-Reply-To: <1589050310-19666-1-git-send-email-andrey.grodzovsky@amd.com> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 22 +++++++++++++++++++++- include/drm/ttm/ttm_bo_driver.h | 2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c5b516f..eae61cc 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1750,9 +1750,29 @@ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo) ttm_bo_unmap_virtual_locked(bo); ttm_mem_io_unlock(man); } +EXPORT_SYMBOL(ttm_bo_unmap_virtual); +void ttm_bo_unmap_virtual_address_space(struct ttm_bo_device *bdev) +{ + struct ttm_mem_type_manager *man; + int i; -EXPORT_SYMBOL(ttm_bo_unmap_virtual); + for (i = 0; i < TTM_NUM_MEM_TYPES; i++) { + man = &bdev->man[i]; + if (man->has_type && man->use_type) + ttm_mem_io_lock(man, false); + } + + unmap_mapping_range(bdev->dev_mapping, 0, 0 , 1); + /*TODO What about ttm_mem_io_free_vm(bo) ? */ + + for (i = TTM_NUM_MEM_TYPES - 1; i >= 0; i--) { + man = &bdev->man[i]; + if (man->has_type && man->use_type) + ttm_mem_io_unlock(man); + } +} +EXPORT_SYMBOL(ttm_bo_unmap_virtual_address_space); int ttm_bo_wait(struct ttm_buffer_object *bo, bool interruptible, bool no_wait) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index c9e0fd0..3133463 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -600,6 +600,8 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev, */ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); +void ttm_bo_unmap_virtual_address_space(struct ttm_bo_device *bdev); + /** * ttm_bo_unmap_virtual * -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Andrey Grodzovsky <andrey.grodzovsky@amd.com> To: <amd-gfx@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org> Cc: alexdeucher@gmail.com, daniel.vetter@ffwll.ch, michel@daenzer.net, Andrey Grodzovsky <andrey.grodzovsky@amd.com>, ckoenig.leichtzumerken@gmail.com Subject: [PATCH 1/6] drm/ttm: Add unampping of the entire device address space Date: Sat, 9 May 2020 14:51:45 -0400 [thread overview] Message-ID: <1589050310-19666-2-git-send-email-andrey.grodzovsky@amd.com> (raw) In-Reply-To: <1589050310-19666-1-git-send-email-andrey.grodzovsky@amd.com> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 22 +++++++++++++++++++++- include/drm/ttm/ttm_bo_driver.h | 2 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index c5b516f..eae61cc 100644 --- a/drivers/gpu/drm/ttm/ttm_bo.c +++ b/drivers/gpu/drm/ttm/ttm_bo.c @@ -1750,9 +1750,29 @@ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo) ttm_bo_unmap_virtual_locked(bo); ttm_mem_io_unlock(man); } +EXPORT_SYMBOL(ttm_bo_unmap_virtual); +void ttm_bo_unmap_virtual_address_space(struct ttm_bo_device *bdev) +{ + struct ttm_mem_type_manager *man; + int i; -EXPORT_SYMBOL(ttm_bo_unmap_virtual); + for (i = 0; i < TTM_NUM_MEM_TYPES; i++) { + man = &bdev->man[i]; + if (man->has_type && man->use_type) + ttm_mem_io_lock(man, false); + } + + unmap_mapping_range(bdev->dev_mapping, 0, 0 , 1); + /*TODO What about ttm_mem_io_free_vm(bo) ? */ + + for (i = TTM_NUM_MEM_TYPES - 1; i >= 0; i--) { + man = &bdev->man[i]; + if (man->has_type && man->use_type) + ttm_mem_io_unlock(man); + } +} +EXPORT_SYMBOL(ttm_bo_unmap_virtual_address_space); int ttm_bo_wait(struct ttm_buffer_object *bo, bool interruptible, bool no_wait) diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index c9e0fd0..3133463 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -600,6 +600,8 @@ int ttm_bo_device_init(struct ttm_bo_device *bdev, */ void ttm_bo_unmap_virtual(struct ttm_buffer_object *bo); +void ttm_bo_unmap_virtual_address_space(struct ttm_bo_device *bdev); + /** * ttm_bo_unmap_virtual * -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2020-05-09 18:52 UTC|newest] Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-05-09 18:51 [PATCH 0/6] RFC Support hot device unplug in amdgpu Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky [this message] 2020-05-09 18:51 ` [PATCH 1/6] drm/ttm: Add unampping of the entire device address space Andrey Grodzovsky 2020-05-11 6:45 ` Christian König 2020-05-11 6:45 ` Christian König 2020-06-05 14:29 ` Andrey Grodzovsky 2020-06-05 14:29 ` Andrey Grodzovsky 2020-06-05 18:40 ` Christian König 2020-06-05 18:40 ` Christian König 2020-06-09 16:37 ` Andrey Grodzovsky 2020-06-09 16:37 ` Andrey Grodzovsky 2020-05-09 18:51 ` [PATCH 2/6] drm/amdgpu: Force unmap all user VMAs on device removal Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky 2020-05-11 6:47 ` Christian König 2020-05-11 6:47 ` Christian König 2020-05-09 18:51 ` [PATCH 3/6] drm/amdgpu: Wait for all user clients Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky 2020-05-11 6:57 ` Christian König 2020-05-11 6:57 ` Christian König 2020-05-09 18:51 ` [PATCH 4/6] drm/amdgpu: Wait for all clients importing out dma-bufs Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky 2020-05-09 18:51 ` [PATCH 5/6] drm/ttm: Add destroy flag in TTM BO eviction interface Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky 2020-05-11 7:05 ` Christian König 2020-05-11 7:05 ` Christian König 2020-06-10 10:25 ` Thomas Hellström (Intel) 2020-06-10 10:25 ` Thomas Hellström (Intel) 2020-06-10 13:56 ` Andrey Grodzovsky 2020-06-10 13:56 ` Andrey Grodzovsky 2020-05-09 18:51 ` [PATCH 6/6] drm/amdgpu: Use TTM MMs destroy interface Andrey Grodzovsky 2020-05-09 18:51 ` Andrey Grodzovsky 2020-05-11 9:26 ` [PATCH 0/6] RFC Support hot device unplug in amdgpu Pekka Paalanen 2020-05-11 9:26 ` Pekka Paalanen 2020-05-11 12:29 ` Christian König 2020-05-11 12:29 ` Christian König 2020-05-11 16:37 ` Andrey Grodzovsky 2020-05-11 16:37 ` Andrey Grodzovsky 2020-05-11 9:54 ` Daniel Vetter 2020-05-11 9:54 ` Daniel Vetter 2020-05-11 10:19 ` Chris Wilson 2020-05-11 10:19 ` Chris Wilson 2020-05-11 11:03 ` Daniel Vetter 2020-05-11 11:03 ` Daniel Vetter 2020-05-11 11:19 ` Daniel Vetter 2020-05-11 11:19 ` Daniel Vetter 2020-05-11 12:34 ` Christian König 2020-05-11 12:34 ` Christian König 2020-05-11 12:43 ` Daniel Vetter 2020-05-11 12:43 ` Daniel Vetter 2020-05-11 11:43 ` Lukas Wunner 2020-05-11 11:43 ` Lukas Wunner 2020-05-11 12:21 ` Daniel Vetter 2020-05-11 12:21 ` Daniel Vetter 2020-05-11 14:08 ` Lukas Wunner 2020-05-11 14:08 ` Lukas Wunner 2020-05-11 14:14 ` Daniel Vetter 2020-05-11 14:14 ` Daniel Vetter 2020-05-13 14:32 ` Andrey Grodzovsky 2020-05-13 14:32 ` Andrey Grodzovsky 2020-05-13 18:05 ` Daniel Vetter 2020-05-13 18:05 ` Daniel Vetter 2020-06-09 17:21 [PATCH 1/6] drm/ttm: Add unampping of the entire device address space Koenig, Christian 2020-06-09 17:21 ` Koenig, Christian 2020-06-10 10:15 ` Thomas Hellström (Intel) 2020-06-10 10:15 ` Thomas Hellström (Intel) 2020-06-10 13:54 ` Andrey Grodzovsky 2020-06-10 13:54 ` Andrey Grodzovsky 2020-06-10 14:05 ` Christian König 2020-06-10 14:05 ` Christian König 2020-06-10 15:30 ` Daniel Vetter 2020-06-10 15:30 ` Daniel Vetter 2020-06-10 20:30 ` Thomas Hellström (Intel) 2020-06-10 20:30 ` Thomas Hellström (Intel) 2020-06-10 21:16 ` Daniel Vetter 2020-06-10 21:16 ` Daniel Vetter 2020-06-11 6:12 ` Thomas Hellström (Intel) 2020-06-11 6:12 ` Thomas Hellström (Intel) 2020-06-11 8:24 ` Daniel Vetter 2020-06-11 8:24 ` Daniel Vetter 2020-06-11 15:15 ` Andrey Grodzovsky 2020-06-11 15:15 ` Andrey Grodzovsky 2020-06-12 6:52 ` Daniel Vetter 2020-06-12 6:52 ` Daniel Vetter 2020-06-10 21:19 ` Andrey Grodzovsky 2020-06-10 21:19 ` Andrey Grodzovsky 2020-06-11 6:35 ` Thomas Hellström (Intel) 2020-06-11 6:35 ` Thomas Hellström (Intel) 2020-06-11 15:06 ` Andrey Grodzovsky 2020-06-11 15:06 ` Andrey Grodzovsky 2020-06-12 6:54 ` Daniel Vetter 2020-06-12 6:54 ` Daniel Vetter 2020-06-10 14:07 ` Thomas Hellström (Intel) 2020-06-10 14:07 ` Thomas Hellström (Intel)
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1589050310-19666-2-git-send-email-andrey.grodzovsky@amd.com \ --to=andrey.grodzovsky@amd.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=ckoenig.leichtzumerken@gmail.com \ --cc=daniel.vetter@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=michel@daenzer.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.