<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpu/drm/amd/amdgpu/amdgpu_sdma.h, branch v7.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=v7.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v7.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-12-10T22:38:26Z</updated>
<entry>
<title>drm/amdgpu/sdma: add query for CSA size and alignment</title>
<updated>2025-12-10T22:38:26Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2025-10-10T19:54:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c28a1142766f9d80880c556fde4b94c3ad00ac96'/>
<id>urn:sha1:c28a1142766f9d80880c556fde4b94c3ad00ac96</id>
<content type='text'>
Needed to query the CSA size and alignment for SDMA
user queues.

Reviewed-by: Prike Liang &lt;Prike.Liang@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Add sdma v7_1_0 support</title>
<updated>2025-12-08T18:56:38Z</updated>
<author>
<name>Likun Gao</name>
<email>Likun.Gao@amd.com</email>
</author>
<published>2025-01-07T02:15:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4ed5116aacf6126ef9c7bc8cd7367ed6797e5c8f'/>
<id>urn:sha1:4ed5116aacf6126ef9c7bc8cd7367ed6797e5c8f</id>
<content type='text'>
Add SDMA ip block for SDMA v7_1_0.

v2: squash in queue reset changes (Alex)
v3: squash in version fix (Hawking)
v4: squash in various fixes

Signed-off-by: Likun Gao &lt;Likun.Gao@amd.com&gt;
Acked-by: Le Ma &lt;le.ma@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu/sdma: allow caller to handle kernel rings in engine reset</title>
<updated>2025-07-07T17:48:25Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2025-06-26T12:58:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c3c2e334c4fd00ed7a8ddb9c163a8c1138af1f1'/>
<id>urn:sha1:0c3c2e334c4fd00ed7a8ddb9c163a8c1138af1f1</id>
<content type='text'>
Add a parameter to amdgpu_sdma_reset_engine() to let the
caller handle the kernel rings.  This allows the kernel
rings to back up their unprocessed state if the reset comes in
via the drm scheduler rather than KFD.

Reviewed-by: Jesse Zhang &lt;Jesse.Zhang@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Add userq fence support to SDMAv6.0</title>
<updated>2025-05-29T14:56:58Z</updated>
<author>
<name>Arunpravin Paneer Selvam</name>
<email>Arunpravin.PaneerSelvam@amd.com</email>
</author>
<published>2024-12-30T16:54:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ae9de5867dbf23e53d244dfd62216bec95234a8'/>
<id>urn:sha1:5ae9de5867dbf23e53d244dfd62216bec95234a8</id>
<content type='text'>
Add userq fence support to SDMAv6.0

Signed-off-by: Arunpravin Paneer Selvam &lt;Arunpravin.PaneerSelvam@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>drm/amdgpu:remove old sdma reset callback mechanism</title>
<updated>2025-04-21T14:57:22Z</updated>
<author>
<name>Jesse.zhang@amd.com</name>
<email>Jesse.zhang@amd.com</email>
</author>
<published>2025-04-11T07:30:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2200b41428ee8d2298ec9d3fd2a22ba2d006096a'/>
<id>urn:sha1:2200b41428ee8d2298ec9d3fd2a22ba2d006096a</id>
<content type='text'>
This patch removes the deprecated SDMA reset callback mechanism, which was previously used to register pre-reset and post-reset callbacks for SDMA engine resets.
 The callback mechanism has been replaced with a more direct and efficient approach using `stop_queue` and `start_queue` functions in the ring's function table.

The SDMA reset callback mechanism allowed KFD and AMDGPU to register pre-reset and post-reset functions for handling SDMA engine resets.
However, this approach added unnecessary complexity and was no longer needed after the introduction of the `stop_queue` and `start_queue` functions in the ring's function table.

1. **Remove Callback Mechanism**:
   - Removed the `amdgpu_sdma_register_on_reset_callbacks` function and its associated data structures (`sdma_on_reset_funcs`).
   - Removed the callback registration logic from the SDMA v4.4.2 initialization code.

2. **Clean Up Related Code**:
   - Removed the `sdma_v4_4_2_set_engine_reset_funcs` function, which was used to register the callbacks.
   - Removed the `sdma_v4_4_2_engine_reset_funcs` structure, which contained the pre-reset and post-reset callback functions.

Signed-off-by: Jesse Zhang &lt;jesse.zhang@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu/userq: rework driver parameter</title>
<updated>2025-04-21T14:55:47Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2025-04-14T18:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb20954c9717d1d07d8b8b8f34ac2a2755aec5ff'/>
<id>urn:sha1:fb20954c9717d1d07d8b8b8f34ac2a2755aec5ff</id>
<content type='text'>
Replace disable_kq parameter with user_queue parameter.
The parameter has the following logic:
 -1 = auto (ASIC specific default)
  0 = user queues disabled
  1 = user queues enabled and kernel queues enabled (if supported)
  2 = user queues enabled and kernel queues disabled

The default behavior (-1) is currently the same as 0 for current
ASICs.  To enable user queues (in addition to kernel queues) set
user_queue=1. To enable user queues and disable kernel queues
(to make all resources available to user queues), set user_queue=2.

Reviewed-by: Sunil Khatri &lt;sunil.khatri@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Add the new sdma function pointers for amdgpu_sdma.h</title>
<updated>2025-04-21T14:49:36Z</updated>
<author>
<name>Jesse.zhang@amd.com</name>
<email>Jesse.zhang@amd.com</email>
</author>
<published>2025-04-11T05:01:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=29891842154d7ebca97a94b0d5aaae94e560f61c'/>
<id>urn:sha1:29891842154d7ebca97a94b0d5aaae94e560f61c</id>
<content type='text'>
This patch introduces new function pointers in the amdgpu_sdma structure
to handle queue stop, start and soft reset operations. These will replace
the older callback mechanism.

The new functions are:
- stop_kernel_queue: Stops a specific SDMA queue
- start_kernel_queue: Starts/Restores a specific SDMA queue
- soft_reset_kernel_queue: Performs soft reset on a specific SDMA queue

v2: Update stop_queue/start_queue function paramters to use ring pointer instead of device/instance(Chritian)
v3: move stop_queue/start_queue to struct amdgpu_sdma_instance and rename them. (Alex)
v4: rework the ordering a bit (Alex)

Suggested-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Jesse Zhang &lt;Jesse.Zhang@amd.com&gt;
Reviewed-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu/sdma: add flag for tracking disable_kq</title>
<updated>2025-04-08T20:48:23Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2025-02-18T18:09:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d65006fc14e9ad13f53f604f5969090dedf7dbd'/>
<id>urn:sha1:1d65006fc14e9ad13f53f604f5969090dedf7dbd</id>
<content type='text'>
For SDMA, we still need kernel queues for paging so
they need to be initialized, but we no not want to
accept submissions from userspace when disable_kq
is set.

Reviewed-by: Sunil Khatri &lt;sunil.khatri@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu: Optimize VM invalidation engine allocation and synchronize GPU TLB flush</title>
<updated>2025-03-21T16:16:35Z</updated>
<author>
<name>Jesse.zhang@amd.com</name>
<email>Jesse.zhang@amd.com</email>
</author>
<published>2025-02-25T07:25:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b09cdeb4d38872b84c6d59878915eae2adbe9d2b'/>
<id>urn:sha1:b09cdeb4d38872b84c6d59878915eae2adbe9d2b</id>
<content type='text'>
- Modify the VM invalidation engine allocation logic to handle SDMA page rings.
  SDMA page rings now share the VM invalidation engine with SDMA gfx rings instead of
  allocating a separate engine. This change ensures efficient resource management and
  avoids the issue of insufficient VM invalidation engines.

- Add synchronization for GPU TLB flush operations in gmc_v9_0.c.
  Use spin_lock and spin_unlock to ensure thread safety and prevent race conditions
  during TLB flush operations. This improves the stability and reliability of the driver,
  especially in multi-threaded environments.

 v2: replace the sdma ring check with a function `amdgpu_sdma_is_page_queue`
 to check if a ring is an SDMA page queue.(Lijo)

 v3: Add GC version check, only enabled on GC9.4.3/9.4.4/9.5.0
 v4: Fix code style and add more detailed description (Christian)
 v5: Remove dependency on vm_inv_eng loop order, explicitly lookup shared inv_eng(Christian/Lijo)
 v6: Added search shared ring function amdgpu_sdma_get_shared_ring (Lijo)

Suggested-by: Lijo Lazar &lt;lijo.lazar@amd.com&gt;
Signed-off-by: Jesse Zhang &lt;jesse.zhang@amd.com&gt;
Reviewed-by: Lijo Lazar &lt;lijo.lazar@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/amdgpu/sdma: guilty tracking is per instance</title>
<updated>2025-03-21T16:16:34Z</updated>
<author>
<name>Alex Deucher</name>
<email>alexander.deucher@amd.com</email>
</author>
<published>2025-03-17T13:45:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3bae7916e7ac3464dcc56b773f832e468cd2946d'/>
<id>urn:sha1:3bae7916e7ac3464dcc56b773f832e468cd2946d</id>
<content type='text'>
The gfx and page queues are per instance, so track them
per instance.

v2: drop extra parameter (Lijo)

Fixes: fdbfaaaae06b ("drm/amdgpu: Improve SDMA reset logic with guilty queue tracking")
Reviewed-by: Lijo Lazar &lt;lijo.lazar@amd.com&gt;
Signed-off-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
</content>
</entry>
</feed>
