<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c, branch v6.0</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.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2022-04-07T10:53:54Z</updated>
<entry>
<title>dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3</title>
<updated>2022-04-07T10:53:54Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-11-09T10:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0cc848a75b742c3f9800e643cd2c03b9cfdc3d69'/>
<id>urn:sha1:0cc848a75b742c3f9800e643cd2c03b9cfdc3d69</id>
<content type='text'>
Add an usage for submissions independent of implicit sync but still
interesting for memory management.

v2: cleanup the kerneldoc a bit
v3: separate amdgpu changes from this

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-10-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>dma-buf: add enum dma_resv_usage v4</title>
<updated>2022-04-07T10:53:53Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-11-09T10:08:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bc80a5462c37eab58a9ea386064307c0f447fd1'/>
<id>urn:sha1:7bc80a5462c37eab58a9ea386064307c0f447fd1</id>
<content type='text'>
This change adds the dma_resv_usage enum and allows us to specify why a
dma_resv object is queried for its containing fences.

Additional to that a dma_resv_usage_rw() helper function is added to aid
retrieving the fences for a read or write userspace submission.

This is then deployed to the different query functions of the dma_resv
object and all of their users. When the write paratermer was previously
true we now use DMA_RESV_USAGE_WRITE and DMA_RESV_USAGE_READ otherwise.

v2: add KERNEL/OTHER in separate patch
v3: some kerneldoc suggestions by Daniel
v4: some more kerneldoc suggestions by Daniel, fix missing cases lost in
    the rebase pointed out by Bas.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220407085946.744568-2-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/amdkfd: add owner ref param to get hmm pages</title>
<updated>2021-07-01T04:05:41Z</updated>
<author>
<name>Alex Sierra</name>
<email>alex.sierra@amd.com</email>
</author>
<published>2021-05-06T17:23:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8c21fc49a8e637bee5c868dafbd7e3c885a926bd'/>
<id>urn:sha1:8c21fc49a8e637bee5c868dafbd7e3c885a926bd</id>
<content type='text'>
The parameter is used in the dev_private_owner to decide if device
pages in the range require to be migrated back to system memory, based
if they are or not in the same memory domain.
In this case, this reference could come from the same memory domain
with devices connected to the same hive.

Signed-off-by: Alex Sierra &lt;alex.sierra@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>dma-buf: drop the _rcu postfix on function names v3</title>
<updated>2021-06-06T09:19:51Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2021-06-02T11:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3fae3b3daac09961ab871a25093b0ae404282d5'/>
<id>urn:sha1:d3fae3b3daac09961ab871a25093b0ae404282d5</id>
<content type='text'>
The functions can be called both in _rcu context as well
as while holding the lock.

v2: add some kerneldoc as suggested by Daniel
v3: fix indentation

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210602111714.212426-7-christian.koenig@amd.com
</content>
</entry>
<entry>
<title>drm/amdkfd: support larger svm range allocation</title>
<updated>2021-04-21T01:46:50Z</updated>
<author>
<name>Philip Yang</name>
<email>Philip.Yang@amd.com</email>
</author>
<published>2021-03-30T18:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d8a3c1c80ceb656de00b45fe1595a040e5535202'/>
<id>urn:sha1:d8a3c1c80ceb656de00b45fe1595a040e5535202</id>
<content type='text'>
For larger range allocation, if hmm_range_fault return -EBUSY, set retry
timeout based on 1 second for every 512MB, this is safe timeout value.

Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-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 common HMM get pages function</title>
<updated>2021-04-21T01:46:43Z</updated>
<author>
<name>Philip Yang</name>
<email>Philip.Yang@amd.com</email>
</author>
<published>2020-02-25T02:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04d8d73dbcbe645a378fca6adc6f0e7111e46c17'/>
<id>urn:sha1:04d8d73dbcbe645a378fca6adc6f0e7111e46c17</id>
<content type='text'>
Move the HMM get pages function from amdgpu_ttm and to amdgpu_mn. This
common function will be used by new svm APIs.

Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Reviewed-by: Felix Kuehling &lt;Felix.Kuehling@amd.com&gt;
Signed-off-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: Use mmu_interval_notifier instead of hmm_mirror</title>
<updated>2019-11-23T23:56:45Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@mellanox.com</email>
</author>
<published>2019-11-12T20:22:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81fa1af31b5d79047821def6abdcb97a735d8a52'/>
<id>urn:sha1:81fa1af31b5d79047821def6abdcb97a735d8a52</id>
<content type='text'>
Convert the collision-retry lock around hmm_range_fault to use the one now
provided by the mmu_interval notifier.

Although this driver does not seem to use the collision retry lock that
hmm provides correctly, it can still be converted over to use the
mmu_interval_notifier api instead of hmm_mirror without too much trouble.

This also deletes another place where a driver is associating additional
data (struct amdgpu_mn) with a mmu_struct.

Link: https://lore.kernel.org/r/20191112202231.3856-13-jgg@ziepe.ca
Signed-off-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Reviewed-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Tested-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Use mmu_interval_insert instead of hmm_mirror</title>
<updated>2019-11-23T23:56:45Z</updated>
<author>
<name>Jason Gunthorpe</name>
<email>jgg@mellanox.com</email>
</author>
<published>2019-11-12T20:22:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62914a99dee5ac51253a84e7d4a05c18f0c77535'/>
<id>urn:sha1:62914a99dee5ac51253a84e7d4a05c18f0c77535</id>
<content type='text'>
Remove the interval tree in the driver and rely on the tree maintained by
the mmu_notifier for delivering mmu_notifier invalidation callbacks.

For some reason amdgpu has a very complicated arrangement where it tries
to prevent duplicate entries in the interval_tree, this is not necessary,
each amdgpu_bo can be its own stand alone entry. interval_tree already
allows duplicates and overlaps in the tree.

Also, there is no need to remove entries upon a release callback, the
mmu_interval API safely allows objects to remain registered beyond the
lifetime of the mm. The driver only has to stop touching the pages during
release.

Link: https://lore.kernel.org/r/20191112202231.3856-12-jgg@ziepe.ca
Reviewed-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Tested-by: Philip Yang &lt;Philip.Yang@amd.com&gt;
Signed-off-by: Jason Gunthorpe &lt;jgg@mellanox.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma</title>
<updated>2019-09-21T17:07:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-09-21T17:07:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84da111de0b4be15bd500deff773f5116f39f7be'/>
<id>urn:sha1:84da111de0b4be15bd500deff773f5116f39f7be</id>
<content type='text'>
Pull hmm updates from Jason Gunthorpe:
 "This is more cleanup and consolidation of the hmm APIs and the very
  strongly related mmu_notifier interfaces. Many places across the tree
  using these interfaces are touched in the process. Beyond that a
  cleanup to the page walker API and a few memremap related changes
  round out the series:

   - General improvement of hmm_range_fault() and related APIs, more
     documentation, bug fixes from testing, API simplification &amp;
     consolidation, and unused API removal

   - Simplify the hmm related kconfigs to HMM_MIRROR and DEVICE_PRIVATE,
     and make them internal kconfig selects

   - Hoist a lot of code related to mmu notifier attachment out of
     drivers by using a refcount get/put attachment idiom and remove the
     convoluted mmu_notifier_unregister_no_release() and related APIs.

   - General API improvement for the migrate_vma API and revision of its
     only user in nouveau

   - Annotate mmu_notifiers with lockdep and sleeping region debugging

  Two series unrelated to HMM or mmu_notifiers came along due to
  dependencies:

   - Allow pagemap's memremap_pages family of APIs to work without
     providing a struct device

   - Make walk_page_range() and related use a constant structure for
     function pointers"

* tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (75 commits)
  libnvdimm: Enable unit test infrastructure compile checks
  mm, notifier: Catch sleeping/blocking for !blockable
  kernel.h: Add non_block_start/end()
  drm/radeon: guard against calling an unpaired radeon_mn_unregister()
  csky: add missing brackets in a macro for tlb.h
  pagewalk: use lockdep_assert_held for locking validation
  pagewalk: separate function pointers from iterator data
  mm: split out a new pagewalk.h header from mm.h
  mm/mmu_notifiers: annotate with might_sleep()
  mm/mmu_notifiers: prime lockdep
  mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end
  mm/mmu_notifiers: remove the __mmu_notifier_invalidate_range_start/end exports
  mm/hmm: hmm_range_fault() infinite loop
  mm/hmm: hmm_range_fault() NULL pointer bug
  mm/hmm: fix hmm_range_fault()'s handling of swapped out pages
  mm/mmu_notifiers: remove unregister_no_release
  RDMA/odp: remove ib_ucontext from ib_umem
  RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm'
  RDMA/mlx5: Use odp instead of mr-&gt;umem in pagefault_mr
  RDMA/mlx5: Use ib_umem_start instead of umem.address
  ...
</content>
</entry>
<entry>
<title>dma-buf: rename reservation_object to dma_resv</title>
<updated>2019-08-13T07:09:30Z</updated>
<author>
<name>Christian König</name>
<email>christian.koenig@amd.com</email>
</author>
<published>2019-08-11T08:06:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=52791eeec1d9f4a7e7fe08aaba0b1553149d93bc'/>
<id>urn:sha1:52791eeec1d9f4a7e7fe08aaba0b1553149d93bc</id>
<content type='text'>
Be more consistent with the naming of the other DMA-buf objects.

Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
Reviewed-by: Chris Wilson &lt;chris@chris-wilson.co.uk&gt;
Link: https://patchwork.freedesktop.org/patch/323401/
</content>
</entry>
</feed>
