1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-30 00:56:33 +00:00

make ttm_device_prepare_hibernation() return early

kettenis reports the ttm_tm_swapout() change is not enough to fix
hibernate with amdgpu when X is running.

The call to ttm_device_prepare_hibernation()/ttm_tm_swapout() in the
hibernate path was added in a linux commit from 2025:
924dda024f3bea64be5f3ac067a075e466739dc9
drm/amdgpu: move GTT to shmem after eviction for hibernation

The linux reason for doing this (server cards with lots of VRAM) isn't
something that concerns us.

ok kettenis@
This commit is contained in:
jsg
2026-03-16 03:57:39 +00:00
parent 33e95a9203
commit 15ef65f283

View File

@@ -130,6 +130,8 @@ out:
*/
int ttm_device_prepare_hibernation(struct ttm_device *bdev)
{
return 0;
#ifdef notyet
struct ttm_operation_ctx ctx = {
.interruptible = false,
.no_wait_gpu = false,
@@ -140,6 +142,7 @@ int ttm_device_prepare_hibernation(struct ttm_device *bdev)
ret = ttm_device_swapout(bdev, &ctx, GFP_KERNEL);
} while (ret > 0);
return ret;
#endif
}
EXPORT_SYMBOL(ttm_device_prepare_hibernation);