<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/drm/ttm/ttm_resource.h, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-11-26T12:12:23Z</updated>
<entry>
<title>drm/ttm: rework pipelined eviction fence handling</title>
<updated>2025-11-26T12:12:23Z</updated>
<author>
<name>Pierre-Eric Pelloux-Prayer</name>
</author>
<published>2025-11-21T10:12:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ddf055b80a544d6f36f77be5f0c6d3c80177d57c'/>
<id>urn:sha1:ddf055b80a544d6f36f77be5f0c6d3c80177d57c</id>
<content type='text'>
Until now ttm stored a single pipelined eviction fence which means
drivers had to use a single entity for these evictions.

To lift this requirement, this commit allows up to 8 entities to
be used.

Ideally a dma_resv object would have been used as a container of
the eviction fences, but the locking rules makes it complex.
dma_resv all have the same ww_class, which means "Attempting to
lock more mutexes after ww_acquire_done." is an error.

One alternative considered was to introduced a 2nd ww_class for
specific resv to hold a single "transient" lock (= the resv lock
would only be held for a short period, without taking any other
locks).

The other option, is to statically reserve a fence array, and
extend the existing code to deal with N fences, instead of 1.

The driver is still responsible to reserve the correct number
of fence slots.

Signed-off-by: Pierre-Eric Pelloux-Prayer &lt;pierre-eric.pelloux-prayer@amd.com&gt;
Link: https://lore.kernel.org/r/20251121101315.3585-20-pierre-eric.pelloux-prayer@amd.com
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: replace drm_print.h include with a forward declaration</title>
<updated>2025-10-31T08:34:56Z</updated>
<author>
<name>Jani Nikula</name>
</author>
<published>2025-10-29T10:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7a849d126d0a75b2c5101f82d0c9693e04a43fd'/>
<id>urn:sha1:d7a849d126d0a75b2c5101f82d0c9693e04a43fd</id>
<content type='text'>
The ttm/ttm_resource.h header does not really need anything from
drm_print.h. A simple forward declaration for struct drm_printer is
sufficient.

An explicit drm_print.h include has previously been added to all the
files that indirectly depended on this include.

v3: Only remove the include here (Thomas)

Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://lore.kernel.org/r/cfdb1095033112c2a7e58767481c98929984a33c.1761734313.git.jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/ttm: Bump TTM_NUM_MEM_TYPES to 9 (Prep for AMDGPU_PL_MMIO_REMAP)</title>
<updated>2025-09-09T20:17:48Z</updated>
<author>
<name>Srinivasan Shanmugam</name>
</author>
<published>2025-08-26T10:19:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=60df8a5d8f6505974784f7290fdfa94e2aa4e255'/>
<id>urn:sha1:60df8a5d8f6505974784f7290fdfa94e2aa4e255</id>
<content type='text'>
Increase TTM_NUM_MEM_TYPES from 8 to 9 to accommodate the upcoming
AMDGPU_PL_MMIO_REMAP placement.

Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Suggested-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Srinivasan Shanmugam &lt;srinivasan.shanmugam@amd.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@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>Merge drm/drm-next into drm-misc-next</title>
<updated>2025-02-06T12:47:32Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2025-02-06T12:47:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=93c7dd1b39444ebd5a6a98e56a363d7a4e646775'/>
<id>urn:sha1:93c7dd1b39444ebd5a6a98e56a363d7a4e646775</id>
<content type='text'>
Bring rc1 to start the new release dev.

Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Balance ttm_resource_cursor_init() and ttm_resource_cursor_fini()</title>
<updated>2025-01-13T11:58:10Z</updated>
<author>
<name>Thomas Hellström</name>
</author>
<published>2024-12-17T14:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f463794097dcdf4c64fffd31de2177681525e35'/>
<id>urn:sha1:1f463794097dcdf4c64fffd31de2177681525e35</id>
<content type='text'>
Make the interface more symmetric by providing and using a
ttm_resource_cursor_init().

v10:
- Fix a stray newline (Matthew Brost)
- Update kerneldoc (Matthew Brost)

Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241217145852.37342-2-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Handle cgroup based eviction in TTM</title>
<updated>2025-01-10T08:54:49Z</updated>
<author>
<name>Maarten Lankhorst</name>
</author>
<published>2024-12-04T13:44:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b624a2c18656ea32e0849e7bc0018ba3c97ca64'/>
<id>urn:sha1:2b624a2c18656ea32e0849e7bc0018ba3c97ca64</id>
<content type='text'>
cgroup resource allocation has to be handled in TTM, so -EAGAIN from
cgroups can be converted into -ENOSPC, and the limitcg can be properly
evicted in ttm code.

When hitting a resource limit through -EAGAIN, the cgroup for which the
limit is hit is also returned. This allows eviction to delete only from
cgroups which are a subgroup of the current cgroup.

The returned CSS is used to determine if eviction is valuable for a
given resource, and allows TTM to only target specific resources to
lower memory usage.

Co-developed-by: Friedrich Vock &lt;friedrich.vock@gmx.de&gt;
Signed-off-by: Friedrich Vock &lt;friedrich.vock@gmx.de&gt;
Co-developed-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Maarten Lankhorst &lt;dev@lankhorst.se&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Link: https://lore.kernel.org/r/20241204134410.1161769-4-dev@lankhorst.se
Signed-off-by: Maxime Ripard &lt;mripard@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Use the LRU walker helper for swapping</title>
<updated>2024-07-09T10:41:46Z</updated>
<author>
<name>Thomas Hellström</name>
</author>
<published>2024-07-05T15:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10efe34dae798c652053d4363871914c478f1475'/>
<id>urn:sha1:10efe34dae798c652053d4363871914c478f1475</id>
<content type='text'>
Rework the TTM swapping to use the LRU walker helper.
This helps fixing up the ttm_bo_swapout() interface
to be consistent about not requiring any locking.

For now mimic the current behaviour of using trylock
only. We could be using ticket-locks here but defer
that until it's deemed necessary. The TTM swapout
functionality is a bit weird anyway since it
alternates between memory types without exhausting
TTM_PL_SYSTEM first.

Intentionally keep pages as the unit of progress since
changing that to bytes is an unrelated change that can
be done later.

v6:
- Improve on error code translation in the swapout callback
  (Matthew Brost).
v7:
- Use s64 rather than long.
- Remove ttm_resource_cursor_fini() since it's no longer used.
- Rename ttm_resource_cursor_fini_locked() to
  ttm_resource_cursor_fini().
- Don't swap out pinned bos.

Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Somalapuram Amaranath &lt;Amaranath.Somalapuram@amd.com&gt;
Cc: Matthew Brost &lt;matthew.brost@intel.com&gt;
Cc: &lt;dri-devel@lists.freedesktop.org&gt;
Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt; #v6
Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-7-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm, drm/amdgpu, drm/xe: Consider hitch moves within bulk sublist moves</title>
<updated>2024-07-09T10:39:33Z</updated>
<author>
<name>Thomas Hellström</name>
</author>
<published>2024-07-05T15:32:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4c44f89c5daee9540cb7428de5d835bd00951350'/>
<id>urn:sha1:4c44f89c5daee9540cb7428de5d835bd00951350</id>
<content type='text'>
To address the problem with hitches moving when bulk move
sublists are lru-bumped, register the list cursors with the
ttm_lru_bulk_move structure when traversing its list, and
when lru-bumping the list, move the cursor hitch to the tail.
This also means it's mandatory for drivers to call
ttm_lru_bulk_move_init() and ttm_lru_bulk_move_fini() when
initializing and finalizing the bulk move structure, so add
those calls to the amdgpu- and xe driver.

Compared to v1 this is slightly more code but less fragile
and hopefully easier to understand.

Changes in previous series:
- Completely rework the functionality
- Avoid a NULL pointer dereference assigning manager-&gt;mem_type
- Remove some leftover code causing build problems
v2:
- For hitch bulk tail moves, store the mem_type in the cursor
  instead of with the manager.
v3:
- Remove leftover mem_type member from change in v2.
v6:
- Add some lockdep asserts (Matthew Brost)
- Avoid NULL pointer dereference (Matthew Brost)
- No need to check bo-&gt;resource before dereferencing
  bo-&gt;bulk_move (Matthew Brost)

Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Somalapuram Amaranath &lt;Amaranath.Somalapuram@amd.com&gt;
Cc: Matthew Brost &lt;matthew.brost@intel.com&gt;
Cc: &lt;dri-devel@lists.freedesktop.org&gt;
Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-5-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Use LRU hitches</title>
<updated>2024-07-09T10:38:23Z</updated>
<author>
<name>Thomas Hellström</name>
</author>
<published>2024-07-05T15:32:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e9bf0fb10a79aaed37474600948cd33d14aa606'/>
<id>urn:sha1:8e9bf0fb10a79aaed37474600948cd33d14aa606</id>
<content type='text'>
Have iterators insert themselves into the list they are iterating
over using hitch list nodes. Since only the iterator owner
can remove these list nodes from the list, it's safe to unlock
the list and when continuing, use them as a starting point. Due to
the way LRU bumping works in TTM, newly added items will not be
missed, and bumped items will be iterated over a second time before
reaching the end of the list.

The exception is list with bulk move sublists. When bumping a
sublist, a hitch that is part of that sublist will also be moved
and we might miss items if restarting from it. This will be
addressed in a later patch.

Changes in previous series:
- Updated ttm_resource_cursor_fini() documentation.
v2:
- Don't reorder ttm_resource_manager_first() and _next().
  (Christian König).
- Use list_add instead of list_move
  (Christian König)
v3:
- Split into two patches, one cleanup, one new functionality
  (Christian König)
- use ttm_resource_cursor_fini_locked() instead of open-coding
  (Matthew Brost)

Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Somalapuram Amaranath &lt;Amaranath.Somalapuram@amd.com&gt;
Cc: Matthew Brost &lt;matthew.brost@intel.com&gt;
Cc: &lt;dri-devel@lists.freedesktop.org&gt;
Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-4-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
<entry>
<title>drm/ttm: Slightly clean up LRU list iteration</title>
<updated>2024-07-09T10:37:58Z</updated>
<author>
<name>Thomas Hellström</name>
</author>
<published>2024-07-05T15:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c62fb62c9f0761eeda8f2a9517e007ff2cdbe9a'/>
<id>urn:sha1:9c62fb62c9f0761eeda8f2a9517e007ff2cdbe9a</id>
<content type='text'>
To make the transition to using lru hitches easier,
simplify the ttm_resource_manager_next() interface to only take
the cursor and reuse ttm_resource_manager_next() functionality
from ttm_resource_manager_first().

Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Somalapuram Amaranath &lt;Amaranath.Somalapuram@amd.com&gt;
Cc: Matthew Brost &lt;matthew.brost@intel.com&gt;
Cc: &lt;dri-devel@lists.freedesktop.org&gt;
Signed-off-by: Thomas Hellström &lt;thomas.hellstrom@linux.intel.com&gt;
Reviewed-by: Matthew Brost &lt;matthew.brost@intel.com&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20240705153206.68526-3-thomas.hellstrom@linux.intel.com
Signed-off-by: Christian König &lt;christian.koenig@amd.com&gt;
</content>
</entry>
</feed>
