summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/include/amd_acpi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/include/amd_acpi.h')
-rw-r--r--drivers/gpu/drm/amd/include/amd_acpi.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/include/amd_acpi.h b/drivers/gpu/drm/amd/include/amd_acpi.h
index 06badbf0c5b9..84933c07f720 100644
--- a/drivers/gpu/drm/amd/include/amd_acpi.h
+++ b/drivers/gpu/drm/amd/include/amd_acpi.h
@@ -24,6 +24,8 @@
#ifndef AMD_ACPI_H
#define AMD_ACPI_H
+#include <linux/types.h>
+
#define ACPI_AC_CLASS "ac_adapter"
struct atif_verify_interface {
@@ -112,6 +114,17 @@ struct atcs_pwr_shift_input {
u8 drv_state; /* 0 = operational, 1 = not operational */
} __packed;
+struct atcs_get_uma_size_output {
+ u16 size; /* structure size in bytes (includes size field) */
+ u32 uma_size_mb; /* allocated UMA size in MB */
+} __packed;
+
+struct atcs_set_uma_allocation_size_input {
+ u16 size; /* structure size in bytes (includes size field) */
+ u8 uma_size_index; /* UMA size index */
+ u8 uma_size_type; /* UMA size type */
+} __packed;
+
/* AMD hw uses four ACPI control methods:
* 1. ATIF
* ARG0: (ACPI_INTEGER) function code
@@ -427,7 +440,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
@@ -492,4 +507,21 @@ struct atcs_pwr_shift_input {
* OUTPUT: none
*/
+#define ATCS_FUNCTION_GET_UMA_SIZE 0x6
+/* ARG0: ATCS_FUNCTION_GET_UMA_SIZE
+ * ARG1: none
+ * OUTPUT:
+ * WORD - structure size in bytes (includes size field)
+ * DWORD - allocated UMA size in MB
+ */
+
+#define ATCS_FUNCTION_SET_UMA_ALLOCATION_SIZE 0xA
+/* ARG0: ATCS_FUNCTION_SET_UMA_ALLOCATION_SIZE
+ * ARG1:
+ * WORD - structure size in bytes (includes size field)
+ * BYTE - UMA size index
+ * BYTE - UMA size type
+ * OUTPUT: none
+ */
+
#endif