]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: parse UMA size-getting/setting bits in ATCS mask
authorYo-Jung Leo Lin (AMD) <Leo.Lin@amd.com>
Fri, 12 Dec 2025 07:59:13 +0000 (15:59 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Jan 2026 21:59:58 +0000 (16:59 -0500)
The capabilities of getting and setting VRAM carveout size are exposed
in the ATCS mask. Parse and store these capabilities for future use.

Co-developed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-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>
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
drivers/gpu/drm/amd/include/amd_acpi.h

index a00346cb55f13dff86d89ccaa04b843d00078c55..0f23525300cd179f46ac0e51d15fd9496f2c01d3 100644 (file)
@@ -116,7 +116,9 @@ struct amdgpu_atcs_functions {
        bool pcie_perf_req;
        bool pcie_dev_rdy;
        bool pcie_bus_width;
+       bool get_uma_size;
        bool power_shift_control;
+       bool set_uma_allocation_size;
 };
 
 struct amdgpu_atcs {
@@ -590,7 +592,9 @@ static void amdgpu_atcs_parse_functions(struct amdgpu_atcs_functions *f, u32 mas
        f->pcie_perf_req = mask & ATCS_PCIE_PERFORMANCE_REQUEST_SUPPORTED;
        f->pcie_dev_rdy = mask & ATCS_PCIE_DEVICE_READY_NOTIFICATION_SUPPORTED;
        f->pcie_bus_width = mask & ATCS_SET_PCIE_BUS_WIDTH_SUPPORTED;
+       f->get_uma_size = mask & ACPI_ATCS_GET_UMA_SIZE_SUPPORTED;
        f->power_shift_control = mask & ATCS_SET_POWER_SHIFT_CONTROL_SUPPORTED;
+       f->set_uma_allocation_size = mask & ACPI_ATCS_SET_UMA_ALLOCATION_SIZE_SUPPORTED;
 }
 
 /**
index 06badbf0c5b9e67b6e077246db0369c8486cfad8..e582339e8e8e25cab510c87bdc19ec30c62d061a 100644 (file)
@@ -427,7 +427,9 @@ struct atcs_pwr_shift_input {
 #       define ATCS_PCIE_PERFORMANCE_REQUEST_SUPPORTED             (1 << 1)
 #       define ATCS_PCIE_DEVICE_READY_NOTIFICATION_SUPPORTED       (1 << 2)
 #       define ATCS_SET_PCIE_BUS_WIDTH_SUPPORTED                   (1 << 3)
-#       define ATCS_SET_POWER_SHIFT_CONTROL_SUPPORTED             (1 << 7)
+#       define ACPI_ATCS_GET_UMA_SIZE_SUPPORTED                    (1 << 5)
+#       define ATCS_SET_POWER_SHIFT_CONTROL_SUPPORTED              (1 << 7)
+#       define ACPI_ATCS_SET_UMA_ALLOCATION_SIZE_SUPPORTED         (1 << 9)
 #define ATCS_FUNCTION_GET_EXTERNAL_STATE                           0x1
 /* ARG0: ATCS_FUNCTION_GET_EXTERNAL_STATE
  * ARG1: none