Merge pull request #484 from kwilczynski/fix/drm-ttm-swapout-bulk-move

Add fix for swapped-out TTM resources never leaving their bulk_move range
This commit is contained in:
Krzysztof Wilczyński authored and GitHub committed 2026-09-17 09:01:20 +09:00
commit 1f65553df3
6 files changed
+34

No files matched your search

@@ -0,0 +1,12 @@
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1343,7 +1343,7 @@ ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
if (ttm_tt_is_populated(tt)) {
ret = ttm_tt_swapout(bdev, tt, swapout_walk->gfp_flags);
- if (!ret) {
+ if (ret > 0) {
spin_lock(&bdev->lru_lock);
ttm_resource_del_bulk_move_unevictable(bo->resource, bo);
ttm_resource_move_to_lru_tail(bo->resource);
+5
View File
@@ -83,6 +83,7 @@ source=(
0313-fuse-background-wakeup.patch{,.sig}
0350-drm-edid-populate-monitor-range-from-displayid-adaptive-sync.patch{,.sig}
0360-gpu-mem-cgroup.patch{,.sig}
0361-drm-ttm-swapped-out-resource-leaves-bulk-move.patch{,.sig}
0400-drm-i915-alpm-limit-pr-alpm-to-panel-replay.patch{,.sig}
0401-drm-i915-psr-exit-panel-replay-for-alpm-lag.patch{,.sig}
0402-psr2-early-transport-panels.patch{,.sig}
@@ -219,6 +220,8 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a
'SKIP'
'1124c5c3fd5104c886c841ead1ae9afb42683388b640b1a86523dad9919c6bd59a1f78b07ee5a213e0dca77c636a29676af0592d4ed1735ea35f282f6f23e46f'
'SKIP'
'15855e9c28cb0abaab7ab606904dfc84d426ccab44edae59f0e1f092202b80525929f8d394d04ca1513d1d5dfc2cfc108a66a9c1cb42b9966c6417562ef20689'
'SKIP'
'505bf01a9d6b0926b557b673bb686d1a4ff73ee70539991e52272fbf58aad3ea25cf5ffc5c2d094a2d5e78b18a1a134f2ab530f595073a2d3eba9ff2c1418e1e'
'SKIP'
'b33b46c37f12f7650a67c3731b87ff84add1ac8623cc96b52223a1ef9946bcaa990ed7c7036674e228335f57ec9ed421ea4d6c1dd72d19b516215d9ac2c7c3ee'
@@ -408,6 +411,8 @@ sha256sums=('55ddf0df8325d9dad96fcff7bd93977d22e3f50af06527572af59b77c7632b78'
'SKIP'
'e303da14a3c8a15fd1cb45394138f03dd16e66d2ac0d1ebcd933977df937d771'
'SKIP'
'503eba8d7a80b978fccdaac798f57cbb6cd2b2b04fd04c46399daa004b6646dc'
'SKIP'
'1f0c958b64ba48b8dc8b5548e1ad1934b8d4903fc16fec15014759e3681ea275'
'SKIP'
'47994d576008a377de612ed77e6b2e7bc6b24ad3a30a6d157646d380ae323142'
@@ -0,0 +1,12 @@
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1343,7 +1343,7 @@ ttm_bo_swapout_cb(struct ttm_lru_walk *walk, struct ttm_buffer_object *bo)
if (ttm_tt_is_populated(tt)) {
ret = ttm_tt_swapout(bdev, tt, swapout_walk->gfp_flags);
- if (!ret) {
+ if (ret > 0) {
spin_lock(&bdev->lru_lock);
ttm_resource_del_bulk_move_unevictable(bo->resource, bo);
ttm_resource_move_to_lru_tail(bo->resource);
+5
View File
@@ -82,6 +82,7 @@ source=(
0313-fuse-background-wakeup.patch{,.sig}
0350-drm-edid-populate-monitor-range-from-displayid-adaptive-sync.patch{,.sig}
0360-gpu-mem-cgroup.patch{,.sig}
0361-drm-ttm-swapped-out-resource-leaves-bulk-move.patch{,.sig}
0400-drm-i915-alpm-limit-pr-alpm-to-panel-replay.patch{,.sig}
0401-drm-i915-psr-exit-panel-replay-for-alpm-lag.patch{,.sig}
0402-psr2-early-transport-panels.patch{,.sig}
@@ -216,6 +217,8 @@ b2sums=('48551bee71cd02815136fb8abe7da4464c2e17c89ef35cb0c0530c8b969fe12127ca97a
'SKIP'
'1124c5c3fd5104c886c841ead1ae9afb42683388b640b1a86523dad9919c6bd59a1f78b07ee5a213e0dca77c636a29676af0592d4ed1735ea35f282f6f23e46f'
'SKIP'
'15855e9c28cb0abaab7ab606904dfc84d426ccab44edae59f0e1f092202b80525929f8d394d04ca1513d1d5dfc2cfc108a66a9c1cb42b9966c6417562ef20689'
'SKIP'
'505bf01a9d6b0926b557b673bb686d1a4ff73ee70539991e52272fbf58aad3ea25cf5ffc5c2d094a2d5e78b18a1a134f2ab530f595073a2d3eba9ff2c1418e1e'
'SKIP'
'b33b46c37f12f7650a67c3731b87ff84add1ac8623cc96b52223a1ef9946bcaa990ed7c7036674e228335f57ec9ed421ea4d6c1dd72d19b516215d9ac2c7c3ee'
@@ -403,6 +406,8 @@ sha256sums=('55ddf0df8325d9dad96fcff7bd93977d22e3f50af06527572af59b77c7632b78'
'SKIP'
'e303da14a3c8a15fd1cb45394138f03dd16e66d2ac0d1ebcd933977df937d771'
'SKIP'
'503eba8d7a80b978fccdaac798f57cbb6cd2b2b04fd04c46399daa004b6646dc'
'SKIP'
'1f0c958b64ba48b8dc8b5548e1ad1934b8d4903fc16fec15014759e3681ea275'
'SKIP'
'47994d576008a377de612ed77e6b2e7bc6b24ad3a30a6d157646d380ae323142'