summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorYo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>2025-12-12 15:59:17 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-01-05 16:59:58 -0500
commit5946dbe1c802efef3b12a4eecab1471f725f4ca9 (patch)
tree7b8e7d4ac03d34885ff46a0b4e1ff895ab2a1738 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parent19ba61ac06d2a4f1e58f92879b54a998ab23b4b1 (diff)
downloadlinux-next-5946dbe1c802efef3b12a4eecab1471f725f4ca9.tar.gz
linux-next-5946dbe1c802efef3b12a4eecab1471f725f4ca9.zip
Documentation/amdgpu: Add UMA carveout details
Add documentation for the uma/carveout_options and uma/carveout attributes in sysfs Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Yo-Jung Leo Lin (AMD) <Leo.Lin@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 96842b041372..6378926f1aeb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -382,6 +382,24 @@ static const struct attribute_group amdgpu_board_attrs_group = {
.is_visible = amdgpu_board_attrs_is_visible
};
+/**
+ * DOC: uma/carveout_options
+ *
+ * This is a read-only file that lists all available UMA allocation
+ * options and their corresponding indices. Example output::
+ *
+ * $ cat uma/carveout_options
+ * 0: Minimum (512 MB)
+ * 1: (1 GB)
+ * 2: (2 GB)
+ * 3: (4 GB)
+ * 4: (6 GB)
+ * 5: (8 GB)
+ * 6: (12 GB)
+ * 7: Medium (16 GB)
+ * 8: (24 GB)
+ * 9: High (32 GB)
+ */
static ssize_t carveout_options_show(struct device *dev,
struct device_attribute *attr,
char *buf)
@@ -414,6 +432,17 @@ static ssize_t carveout_options_show(struct device *dev,
}
static DEVICE_ATTR_RO(carveout_options);
+/**
+ * DOC: uma/carveout
+ *
+ * This file is both readable and writable. When read, it shows the
+ * index of the current setting. Writing a valid index to this file
+ * allows users to change the UMA carveout size to the selected option
+ * on the next boot.
+ *
+ * The available options and their corresponding indices can be read
+ * from the uma/carveout_options file.
+ */
static ssize_t carveout_show(struct device *dev,
struct device_attribute *attr,
char *buf)