Harkirat Gill
5e70f6804b
drm/amdgpu: cap GTT size to physical RAM on APUs
...
On APUs, the GTT pool is backed by system RAM, but its size is not bound
to the non-carveout memory that actually backs it. A user can end up
with GTT + VRAM exceeding total physical memory through the following
sequence:
- Have a large non-carveout memory space (~128GB) and accordingly set a
large GTT (~100GB) via the ttm module parameter.
- Lower the non-carveout memory space in BIOS by increasing the UMA
Frame Buffer Size (VRAM) to 64GB.
- The previously set GTT value (~100GB) persists, even though the new
non-carveout space (64GB) can no longer back it.
This leads to a case where kernel reports GTT (100GB) + VRAM (64GB)
despite the sum being greater than total physical memory (128GB).
Cap the GTT size to totalram_pages() on APUs. totalram_pages() already
excludes the VRAM carveout, so the resulting GTT can never exceed the
system RAM that actually backs it.
Signed-off-by: Harkirat Gill <harkirat.gill@amd.com >
Reviewed-by: David Francis <David.Francis@amd.com >
Assisted-by: Claude:claude-opus-4
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
(cherry picked from commit 5dafdd6492 )
Cc: stable@vger.kernel.org
2026-07-28 20:01:16 -04:00
..
2026-04-03 13:52:12 -04:00
2026-07-01 13:00:26 -04:00
2026-05-19 11:51:39 -04:00
2026-07-28 19:59:22 -04:00
2026-05-11 15:55:55 -04:00
2026-07-28 19:59:22 -04:00
2026-06-17 18:24:38 -04:00
2026-06-17 18:24:38 -04:00
2026-05-19 11:52:03 -04:00
2026-04-03 13:50:01 -04:00
2026-03-30 15:02:07 -04:00
2026-07-17 17:39:00 -04:00
2026-04-17 15:24:12 -04:00
2026-05-19 11:49:25 -04:00
2026-07-28 19:59:29 -04:00
2026-06-17 18:26:40 -04:00
2026-06-04 15:24:29 -04:00
2026-07-28 20:01:06 -04:00
2026-07-17 17:39:16 -04:00
2026-07-17 17:39:08 -04:00
2026-07-17 17:40:31 -04:00
2026-07-28 19:59:44 -04:00
2026-04-24 10:57:16 -04:00
2026-07-28 20:00:49 -04:00
2026-05-25 10:45:38 +02:00
2026-03-17 17:46:26 -04:00
2026-05-11 16:15:31 -04:00
2026-06-03 13:50:42 -04:00
2026-06-03 14:02:04 -04:00
2026-03-30 16:12:27 -04:00
2026-07-01 13:01:05 -04:00
2026-06-17 18:13:35 -04:00
2026-06-03 13:59:29 -04:00
2026-07-01 13:01:48 -04:00
2026-06-03 13:53:46 -04:00
2026-06-17 18:27:50 -04:00
2026-07-01 13:01:05 -04:00
2026-04-03 13:56:21 -04:00
2026-03-23 14:48:06 -04:00
2026-04-24 10:58:38 -04:00
2026-04-24 10:58:16 -04:00
2026-06-17 18:36:38 -04:00
2026-04-17 14:43:29 +02:00
2026-04-17 14:43:29 +02:00
2026-07-28 20:01:06 -04:00
2026-06-17 18:13:20 -04:00
2026-06-04 15:24:22 -04:00
2026-06-03 13:58:57 -04:00
2026-06-04 15:25:46 -04:00
2026-07-01 13:01:35 -04:00
2026-03-17 17:50:38 -04:00
2026-04-24 10:44:52 -04:00
2026-04-28 14:28:52 -04:00
2026-04-28 14:28:52 -04:00
2026-07-17 17:38:33 -04:00
2026-05-19 11:45:42 -04:00
2026-07-28 19:59:44 -04:00
2026-07-28 19:37:26 -04:00
2026-06-03 13:52:57 -04:00
2026-06-03 13:59:29 -04:00
2026-06-03 13:59:29 -04:00
2026-06-04 15:24:13 -04:00
2026-04-28 14:28:58 -04:00
2026-05-11 15:55:56 -04:00
2026-05-05 09:56:28 -04:00
2026-06-03 13:57:32 -04:00
2026-05-11 16:15:31 -04:00
2026-03-23 14:02:04 -04:00
2026-05-11 16:15:31 -04:00
2026-06-03 13:53:00 -04:00
2026-06-03 13:57:24 -04:00
2026-04-17 14:43:29 +02:00
2026-07-28 20:01:16 -04:00
2026-07-01 13:02:00 -04:00
2026-05-19 11:45:41 -04:00
2026-06-04 15:24:40 -04:00
2026-05-11 16:08:42 -04:00
2026-07-28 19:59:08 -04:00
2026-06-03 13:55:33 -04:00
2026-07-01 12:58:25 -04:00
2026-07-01 12:58:30 -04:00
2026-05-11 16:15:39 -04:00
2026-06-03 13:55:41 -04:00
2026-06-03 13:55:41 -04:00
2026-05-07 09:50:50 +10:00
2026-04-28 14:42:22 -04:00
2026-05-19 11:54:32 -04:00
2026-05-07 09:50:50 +10:00
2026-07-28 19:59:08 -04:00
2026-07-01 13:00:54 -04:00
2026-06-03 13:50:46 -04:00
2026-05-11 16:15:55 -04:00
2026-05-06 10:12:25 +10:00
2026-04-03 13:50:29 -04:00
2026-06-04 15:24:22 -04:00
2026-07-28 19:59:22 -04:00
2026-06-03 13:50:32 -04:00
2026-05-19 11:51:56 -04:00
2026-05-19 11:51:56 -04:00
2026-04-17 15:41:12 -04:00
2026-04-24 11:10:05 -04:00
2026-04-21 16:51:28 -04:00
2026-07-01 12:57:46 -04:00
2026-07-01 12:57:49 -04:00
2026-07-01 12:57:52 -04:00
2026-07-08 16:37:12 -04:00
2026-07-01 13:01:48 -04:00
2026-07-01 13:02:32 -04:00
2026-04-24 10:57:13 -04:00
2026-07-01 13:02:32 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:54:10 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-06-03 13:53:46 -04:00
2026-07-01 13:01:48 -04:00
2026-06-03 13:53:51 -04:00
2026-04-24 10:58:38 -04:00
2026-06-17 18:36:31 -04:00
2026-04-24 10:58:38 -04:00
2026-07-01 13:01:48 -04:00
2026-04-24 10:58:33 -04:00
2026-04-28 15:51:17 -04:00
2026-04-28 15:51:18 -04:00
2026-04-28 15:51:18 -04:00
2026-07-01 13:02:53 -04:00
2026-04-28 15:51:18 -04:00
2026-04-28 15:51:18 -04:00
2026-04-28 15:51:18 -04:00
2026-07-01 13:00:58 -04:00
2026-04-28 15:51:18 -04:00
2026-03-17 17:43:12 -04:00
2026-07-28 19:37:26 -04:00
2026-05-18 18:07:34 -04:00
2026-06-04 15:24:22 -04:00
2026-07-28 19:59:08 -04:00
2026-07-01 13:01:48 -04:00
2026-07-01 13:01:29 -04:00
2026-07-01 13:01:29 -04:00
2026-03-17 17:50:50 -04:00
2026-03-17 17:50:50 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:28 -04:00
2026-06-03 13:50:10 -04:00
2026-06-03 13:50:10 -04:00
2026-06-04 15:24:13 -04:00
2026-07-28 19:59:44 -04:00
2026-04-24 10:57:02 -04:00
2026-04-24 10:56:58 -04:00
2026-04-28 14:28:58 -04:00
2026-07-28 19:37:26 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-05-19 11:53:16 -04:00
2026-04-17 15:41:14 -04:00
2026-07-28 19:59:44 -04:00
2026-04-17 15:41:12 -04:00
2026-04-17 15:41:12 -04:00
2026-05-05 09:56:51 -04:00
2026-07-01 12:58:01 -04:00
2026-07-01 12:58:03 -04:00
2026-07-01 12:58:05 -04:00
2026-07-01 12:58:07 -04:00
2026-07-01 12:58:09 -04:00
2026-07-01 12:58:11 -04:00
2026-04-17 15:41:12 -04:00
2026-04-28 14:28:58 -04:00
2026-07-28 19:59:59 -04:00
2026-07-01 12:57:39 -04:00
2026-04-28 14:28:58 -04:00
2026-05-27 10:50:11 -04:00
2026-04-24 11:09:58 -04:00
2026-03-30 16:49:12 -04:00
2026-05-18 18:17:54 -04:00
2026-05-18 18:18:01 -04:00
2026-05-18 18:19:05 -04:00
2026-04-28 15:51:17 -04:00
2026-04-28 15:51:17 -04:00
2026-04-28 15:51:18 -04:00
2026-05-11 16:15:31 -04:00
2026-04-28 15:51:17 -04:00
2026-07-01 12:58:28 -04:00
2026-07-28 19:37:26 -04:00
2026-05-11 16:15:31 -04:00
2026-04-28 15:51:17 -04:00
2026-03-17 17:43:00 -04:00
2026-06-03 13:50:46 -04:00
2026-05-11 16:15:55 -04:00