<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c, branch v6.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-04-11T22:03:44Z</updated>
<entry>
<title>drm/amdgpu: DROP redundant drm_prime_sg_to_dma_addr_array</title>
<updated>2023-04-11T22:03:44Z</updated>
<author>
<name>Shane Xiao</name>
<email>shane.xiao@amd.com</email>
</author>
<published>2023-04-05T15:09:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=edd48e6d8f341dcaf1c0a45f4822172d33e75129'/>
<id>urn:sha1:edd48e6d8f341dcaf1c0a45f4822172d33e75129</id>
<content type='text'>
For DMA-MAP userptr on other GPUs, the dma address array
will be populated in amdgpu_ttm_backend_bind.

Remove the redundant call from the driver.

v2:
  update the comment

Signed-off-by: Shane Xiao &lt;shane.xiao@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>amd/amdgpu: Inherit coherence flags base on original BO flags</title>
<updated>2023-04-11T22:03:44Z</updated>
<author>
<name>Shane Xiao</name>
<email>shane.xiao@amd.com</email>
</author>
<published>2023-04-06T04:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af152c2120587b02e03dfe370b52ba75c40f8952'/>
<id>urn:sha1:af152c2120587b02e03dfe370b52ba75c40f8952</id>
<content type='text'>
For SG BO to DMA-map userptrs on other GPUs, the SG BO
need inherit MTYPEs in PTEs from original BO.

If we set the flags, the device can be coherent with
the CPUs and other GPUs.

v2:
  1. Drop unnecessary flags check
  2. Remove local variable align

Signed-off-by: Shane Xiao &lt;shane.xiao@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Add userptr bo support for mGPUs when iommu is on</title>
<updated>2023-04-11T22:03:44Z</updated>
<author>
<name>Shane Xiao</name>
<email>shane.xiao@amd.com</email>
</author>
<published>2023-04-05T14:33:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=207bbfb63dc0eb491f71e96baa5db9c25626a247'/>
<id>urn:sha1:207bbfb63dc0eb491f71e96baa5db9c25626a247</id>
<content type='text'>
For userptr bo with iommu on, multiple GPUs use same system
memory dma mapping address when both adev and bo_adev are in
identity mode or in the same iommu group.

If RAM direct map to one GPU, other GPUs can share the original
BO in order to reduce dma address array usage when RAM can
direct map to these GPUs. However, we should explicit check
whether RAM can direct map to all these GPUs.

This patch fixes a potential issue that where RAM is
direct mapped on some but not all GPUs.

v2:
  1. Update comment
  2. Add helper function reuse_dmamap

Signed-off-by: Shane Xiao &lt;shane.xiao@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>amdkfd: Memory availability can never be negative</title>
<updated>2023-03-07T19:21:56Z</updated>
<author>
<name>Daniel Phillips</name>
<email>daniel.phillips@amd.com</email>
</author>
<published>2023-03-01T22:28:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7cb3cfc030640bf860bf8299aa00cdffff92a40c'/>
<id>urn:sha1:7cb3cfc030640bf860bf8299aa00cdffff92a40c</id>
<content type='text'>
Our assumptions about how much KFD memory is currently available for
allocation may be violated by various complexities so we define the
reported value as advisory, however we should never report negative
availability.

Signed-off-by: Daniel Phillips &lt;daniel.phillips@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Implement DMA buf fd export from KFD</title>
<updated>2023-02-28T19:30:00Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2021-11-17T04:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd234e7581162573742dfb8cc4dc0af3d3148138'/>
<id>urn:sha1:fd234e7581162573742dfb8cc4dc0af3d3148138</id>
<content type='text'>
Exports a DMA buf fd of a given KFD buffer handle. This is intended for
being able to import KFD BOs into GEM contexts to leverage the
amdgpu_bo_va API for more flexible virtual address mappings. It will
also be used for the new upstreamable RDMA solution coming to UCX and
RCCL.

The corresponding user mode change (Thunk API and kfdtest) is here:
https://github.com/fxkamd/ROCT-Thunk-Interface/commits/fxkamd/dmabuf

Signed-off-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Xiaogang Chen &lt;Xiaogang.Chen@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Generalize KFD dmabuf import</title>
<updated>2023-02-28T19:30:00Z</updated>
<author>
<name>Felix Kuehling</name>
<email>Felix.Kuehling@amd.com</email>
</author>
<published>2021-11-17T02:03:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d81c4cd78477e473dbdedd1dbfb67460fa53c58'/>
<id>urn:sha1:2d81c4cd78477e473dbdedd1dbfb67460fa53c58</id>
<content type='text'>
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 &lt;Felix.Kuehling@amd.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'amd-drm-next-6.3-2023-01-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-next</title>
<updated>2023-01-16T05:04:13Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2023-01-16T05:04:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f1c24dee225fc82472627986997ba6aef309fc2'/>
<id>urn:sha1:1f1c24dee225fc82472627986997ba6aef309fc2</id>
<content type='text'>
amd-drm-next-6.3-2023-01-13:

amdgpu:
- Fix possible segfault in failure case
- Rework FW requests to happen in early_init for all IPs so
  that we don't lose the sbios console if FW is missing
- PSR fixes
- Misc cleanups
- Unload fix
- SMU13 fixes

amdkfd:
- Fix for cleared VRAM BOs
- Fix cleanup if GPUVM creation fails
- Memory accounting fix
- Use resource_size rather than open codeing it
- GC11 mGPU fix

radeon:
- Fix memory leak on shutdown

Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
From: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230113225911.7776-1-alexander.deucher@amd.com
</content>
</entry>
<entry>
<title>drm/amdkfd: Page aligned memory reserve size</title>
<updated>2023-01-11T21:41:03Z</updated>
<author>
<name>Philip Yang</name>
<email>Philip.Yang@amd.com</email>
</author>
<published>2023-01-09T23:08:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c2dece8fb541ab07b68c3312a1065fa9c927a81'/>
<id>urn:sha1:0c2dece8fb541ab07b68c3312a1065fa9c927a81</id>
<content type='text'>
Use page aligned size to reserve memory usage because page aligned TTM
BO size is used to unreserve memory usage, otherwise no page aligned
size causes memory usage accounting unbalanced.

Change vram_used definition type to int64_t to be able to trigger
WARN_ONCE(adev &amp;&amp; adev-&gt;kfd.vram_used &lt; 0, "..."), to help debug the
accounting issue with warning and backtrace.

Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Cleanup vm process info if init vm failed</title>
<updated>2023-01-11T21:40:45Z</updated>
<author>
<name>Philip Yang</name>
<email>Philip.Yang@amd.com</email>
</author>
<published>2022-12-20T19:55:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23b02b0e4678d9d30931eecd5e5dbb06db7f957f'/>
<id>urn:sha1:23b02b0e4678d9d30931eecd5e5dbb06db7f957f</id>
<content type='text'>
If acquire_vm failed when initializing KFD vm, set vm-&gt;process_info to
NULL and free process info, otherwise, the future acquire_vm will
always fail as vm-&gt;process_info is not NULL.

Pass avm as parameter to remove the duplicate code.

Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdkfd: Fix NULL pointer error for GC 11.0.1 on mGPU</title>
<updated>2023-01-10T23:05:03Z</updated>
<author>
<name>Eric Huang</name>
<email>jinhuieric.huang@amd.com</email>
</author>
<published>2023-01-05T19:01:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f347e3f821743a02c249abe50e467a333fabcfe'/>
<id>urn:sha1:7f347e3f821743a02c249abe50e467a333fabcfe</id>
<content type='text'>
The point bo-&gt;kfd_bo is NULL for queue's write pointer BO
when creating queue on mGPU. To avoid using the pointer
fixes the error.

Signed-off-by: Eric Huang &lt;jinhuieric.huang@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
