Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-02-16 Thread Daniel Vetter
On Tue, Jan 17, 2023 at 04:06:05AM +0300, Dmitry Osipenko wrote: > 16.01.2023 18:11, Christian König пишет: > > > > > >> mmapping the memory with that new offset should still work. The > >> imported BO is created with ttm_bo_type_sg, and AFAICT ttm_bo_vm.c > >> supports mapping of

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-16 Thread Dmitry Osipenko
16.01.2023 18:11, Christian König пишет: > > >> mmapping the memory with that new offset should still work. The >> imported BO is created with ttm_bo_type_sg, and AFAICT ttm_bo_vm.c >> supports mapping of SG BOs. > > Actually it shouldn't. This can go boom really easily. >>

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-16 Thread Felix Kuehling
-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Cc: Chen, Xiaogang ; Koenig, Christian Subject: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Use proper

RE: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-16 Thread Errabolu, Ramesh
Cc: Chen, Xiaogang ; Koenig, Christian Subject: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Use proper amdgpu_gem_prime_import function to handle all

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-16 Thread Christian König
Am 16.01.23 um 15:52 schrieb Felix Kuehling: Am 2023-01-16 um 06:42 schrieb Christian König: [SNIP] When the BO is imported into the same GPU, you get a reference to the same BO, so the imported BO has the same mmap_offset as the original BO. When the BO is imported into a different GPU, it

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-16 Thread Felix Kuehling
Am 2023-01-16 um 06:42 schrieb Christian König: [SNIP] When the BO is imported into the same GPU, you get a reference to the same BO, so the imported BO has the same mmap_offset as the original BO. When the BO is imported into a different GPU, it is a new BO with a new mmap_offset. That wo

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-16 Thread Christian König
[SNIP] When the BO is imported into the same GPU, you get a reference to the same BO, so the imported BO has the same mmap_offset as the original BO. When the BO is imported into a different GPU, it is a new BO with a new mmap_offset. That won't work. I don't think this is incorrect. No

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-15 Thread Felix Kuehling
Am 2023-01-15 um 11:43 schrieb Christian König: Am 14.01.23 um 00:15 schrieb Felix Kuehling: On 2023-01-13 18:00, Chen, Xiaogang wrote: On 1/13/2023 4:26 PM, Felix Kuehling wrote: On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-15 Thread Christian König
Am 14.01.23 um 00:15 schrieb Felix Kuehling: On 2023-01-13 18:00, Chen, Xiaogang wrote: On 1/13/2023 4:26 PM, Felix Kuehling wrote: On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem_prime_import function to handle all kinds of im

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-13 Thread Felix Kuehling
On 2023-01-13 18:00, Chen, Xiaogang wrote: On 1/13/2023 4:26 PM, Felix Kuehling wrote: On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable pr

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-13 Thread Chen, Xiaogang
On 1/13/2023 4:26 PM, Felix Kuehling wrote: On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs w

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-13 Thread Felix Kuehling
On 2023-01-12 17:41, Chen, Xiaogang wrote: On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying

Re: [PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-12 Thread Chen, Xiaogang
On 1/11/2023 7:31 PM, Felix Kuehling wrote: Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying BO multiple times. Signed-off-by: Felix Ku

[PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2023-01-11 Thread Felix Kuehling
Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying BO multiple times. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkf

[PATCH 1/6] drm/amdgpu: Generalize KFD dmabuf import

2022-11-18 Thread Felix Kuehling
Use proper amdgpu_gem_prime_import function to handle all kinds of imports. Remember the dmabuf reference to enable proper multi-GPU attachment to multiple VMs without erroneously re-exporting the underlying BO multiple times. Signed-off-by: Felix Kuehling --- .../gpu/drm/amd/amdgpu/amdgpu_amdkf