** Tags removed: verification-needed-noble-linux-oem-6.17
** Tags added: verification-done-noble-linux-oem-6.17
--
You received this bug notification because you are subscribed to linux
in Ubuntu.
Matching subscriptions: Bgg, Bmail, Nb
https://bugs.launchpad.net/bugs/2143873
Title:
drm/amdgpu: add UMA carveout tuning interfaces
Status in HWE Next:
New
Status in linux package in Ubuntu:
Fix Released
Status in linux-oem-6.17 package in Ubuntu:
Invalid
Status in linux source package in Noble:
Invalid
Status in linux-oem-6.17 source package in Noble:
Fix Committed
Status in linux source package in Resolute:
Fix Released
Status in linux-oem-6.17 source package in Resolute:
Invalid
Bug description:
[Impact]
On AMD APU systems with BIOS configured to "Auto Mode" for GPU VRAM allocation,
users have no way to inspect or tune the UMA (Unified Memory Architecture) carveout size from the OS. This is a feature gap for Dell systems that use AMD APU platforms(CY26 AMD Modularity platforms with GPT APU).
The UMA carveout size determines how much system memory is dedicated
to the integrated GPU. With the BIOS "Auto Mode" change, the OS-level
interface to read and set this value was missing entirely — the
/sys/.../uma/ sysfs directory was not enumerated, leaving users and
system management tools (such as fwupd) unable to inspect or change
the GPU memory allocation without rebooting into BIOS.
[Fix]
Add UMA carveout tuning interfaces to the amdgpu driver via a new sysfs directory
`uma/` exposed under the GPU device's sysfs path. This includes:
- Parse the ATCS mask to detect UMA size get/set capability
(upstream: 6f3b631e395b971c7320830920185a7a2b44090f)
- Add helper to read UMA carveout configuration from the integrated system
information table in atomfirmware
(upstream: 685b7113e0a8087f683d61dad1dc1be78e6c57aa)
- Add helper functions to set UMA carveout size via ATCS methods
(upstream: 379a3160633a469da240f40948464f20582c11e9)
- Add helpers to set/get unique IDs per device type (prerequisite refactor)
(upstream: 589ea8a1fd6cc4d194f5472f358dbdcee954a2dc)
- Reorganize sysfs init/fini calls (no functional change, prerequisite cleanup)
(upstream: aa6674f2da055da0629a62eb8debe774515645df)
- Add `uma/carveout` (r/w) and `uma/carveout_options` (r/o) sysfs interfaces
(upstream: 19ba61ac06d2a4f1e58f92879b54a998ab23b4b1)
- Fix GCC-14 -Wflex-array-member-not-at-end warnings in amdkfd (build hygiene)
(upstream: 1e6d36e15b8873fc3ade8b714d35d69efd5e1427)
- Add documentation for the new sysfs interfaces
(upstream: 5946dbe1c802efef3b12a4eecab1471f725f4ca9)
All upstream commits are targeted for mainline kernel v7.0. The patch series is
available at:
https://lore.kernel.org/amd-gfx/20251212-vram-carveout-tuning-for-upstream-v6-0-50c02fd180c9@amd.com/
[Test Plan]
On an AMD APU system (Dell systems with CY26 AMD Modularity / GPT APU), verify
that the UMA sysfs interface is exposed and functional:
1. Check that the uma/ directory is present:
$ ls /sys/devices/pci0000:00/*/0000:*/uma/
Expected: carveout carveout_options
2. Read the available carveout options:
$ cat /sys/devices/pci0000:00/*/0000:*/uma/carveout_options
Expected: A list of indexed size options (e.g. 0: Minimum (512 MB), 8: Medium (8 GB), 16: High (16 GB))
3. Read the current setting:
$ cat /sys/devices/pci0000:00/*/0000:*/uma/carveout
Expected: A numeric index (e.g. 0)
4. Change the carveout size (takes effect on next boot):
$ echo 6 > /sys/devices/pci0000:00/*/0000:*/uma/carveout
$ cat /sys/devices/pci0000:00/*/0000:*/uma/carveout
Expected: 6
5. Reboot and verify in BIOS that Memory Available has changed to match the
selected option (e.g. index 6 = 6 GB GPU memory).
Without the patch: The uma/ sysfs directory does not exist.
With the patch: The uma/ directory is present, options are readable, and setting
a new value causes BIOS to reflect the updated GPU memory allocation on next boot.
[Where problems could occur]
It may break AMD APU systems that use the ATCS ACPI interface.
The new ATCS parsing code reads capability bits from the ATCS mask to determine
whether UMA size get/set is supported. If the capability detection logic incorrectly identifies a platform as supporting UMA carveout tuning when it does not, attempting to call the ATCS set method could result in ACPI errors or system instability.
Conversely, if the atomfirmware parsing of the integrated system information table fails on certain BIOS versions, the uma/ sysfs directory may be silently absent or expose incorrect carveout option values, misleading users about available GPU memory configurations.
The reorganized sysfs init/fini calls (no functional change commit) could also
introduce issues if the ordering of sysfs group registration/deregistration is subtly different from the original — a mis-ordered teardown could cause use-after-free or sysfs removal failures on driver unload or GPU reset.
To manage notifications about this bug go to:
https://bugs.launchpad.net/hwe-next/+bug/2143873/+subscriptions
Комментариев нет:
Отправить комментарий