summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/inc
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-07-11 10:23:17 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-07-18 14:18:07 -0500
commit7e01a2ec96bf8a149c5e83d0352cf6ea286275cf (patch)
tree1c3056f2bb447a3137b5af65cc0f9cdccd81721a /drivers/gpu/drm/amd/powerplay/inc
parenta08a4dae7a11d6665c8d2a49a2c01e8a71a18955 (diff)
drm/amd/powerplay: correct SW SMU valid mapping check
Current implementation is not actually able to detect invalid message/table/workload mapping. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/inc')
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h b/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h
index 2fff4b16cb4e..fcb58012170f 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h
@@ -43,19 +43,24 @@
#define SMU11_TOOL_SIZE 0x19000
#define CLK_MAP(clk, index) \
- [SMU_##clk] = index
+ [SMU_##clk] = {1, (index)}
#define FEA_MAP(fea) \
- [SMU_FEATURE_##fea##_BIT] = FEATURE_##fea##_BIT
+ [SMU_FEATURE_##fea##_BIT] = {1, FEATURE_##fea##_BIT}
#define TAB_MAP(tab) \
- [SMU_TABLE_##tab] = TABLE_##tab
+ [SMU_TABLE_##tab] = {1, TABLE_##tab}
#define PWR_MAP(tab) \
- [SMU_POWER_SOURCE_##tab] = POWER_SOURCE_##tab
+ [SMU_POWER_SOURCE_##tab] = {1, POWER_SOURCE_##tab}
#define WORKLOAD_MAP(profile, workload) \
- [profile] = workload
+ [profile] = {1, (workload)}
+
+struct smu_11_0_cmn2aisc_mapping {
+ int valid_mapping;
+ int map_to;
+};
struct smu_11_0_max_sustainable_clocks {
uint32_t display_clock;