summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
diff options
context:
space:
mode:
authorKevin Wang2018-12-17 09:47:49 +0100
committerAlex Deucher2019-03-19 21:03:56 +0100
commit0b51d9937845fb6e0639be2cbd31557c4a36e073 (patch)
treed8e12e93a7e1d5300b1c9feed0f94921c3a0d770 /drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
parentdrm/amd/powerplay: implement get_clk_info_from_vbios function for smu11 (v2) (diff)
downloadkernel-qcow2-linux-0b51d9937845fb6e0639be2cbd31557c4a36e073.tar.gz
kernel-qcow2-linux-0b51d9937845fb6e0639be2cbd31557c4a36e073.tar.xz
kernel-qcow2-linux-0b51d9937845fb6e0639be2cbd31557c4a36e073.zip
drm/amd/powerplay: implement smu_alloc[free]_memory pool function
This patch implements smu_alloc[free]_memory pool function to reserve the memory pool bo. Signed-off-by: Kevin Wang <Kevin1.Wang@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
index 57572ff4d496..dab1011373aa 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h
@@ -24,6 +24,15 @@
#include "amdgpu.h"
+enum smu_memory_pool_size
+{
+ SMU_MEMORY_POOL_SIZE_ZERO = 0,
+ SMU_MEMORY_POOL_SIZE_256_MB = 0x10000000,
+ SMU_MEMORY_POOL_SIZE_512_MB = 0x20000000,
+ SMU_MEMORY_POOL_SIZE_1_GB = 0x40000000,
+ SMU_MEMORY_POOL_SIZE_2_GB = 0x80000000,
+};
+
#define SMU_TABLE_INIT(tables, table_id, s, a, d) \
do { \
tables[table_id].size = s; \
@@ -63,6 +72,7 @@ struct smu_table_context
struct smu_bios_boot_up_values boot_values;
struct smu_table *tables;
uint32_t table_count;
+ struct smu_table memory_pool;
};
struct smu_dpm_context {
@@ -81,6 +91,7 @@ struct smu_context
const struct smu_funcs *funcs;
struct mutex mutex;
+ uint64_t pool_size;
struct smu_table_context smu_table;
struct smu_dpm_context smu_dpm;