From: Hawking Zhang <Hawking.Zhang@amd.com>
Date: Tue, 23 May 2017 18:26:14 +0800
Subject: drm/amd/powerplay: using MinFClock/MaxFclock to report Min/Max memory
clock limits
Git-commit: f0846b24b678920e242e5c22f406719e203e2eb5
Patch-mainline: v4.13-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
@@ -782,6 +782,7 @@ static int rv_get_performance_level(stru
struct rv_hwmgr *data;
uint32_t level_index;
uint32_t i;
+ uint32_t vol_dep_record_index = 0;
if (level == NULL || hwmgr == NULL || state == NULL)
return -EINVAL;
@@ -801,6 +802,13 @@ static int rv_get_performance_level(stru
}
}
+ if (level_index == 0) {
+ vol_dep_record_index = data->clock_vol_info.vdd_dep_on_fclk->count - 1;
+ level->memory_clock =
+ data->clock_vol_info.vdd_dep_on_fclk->entries[vol_dep_record_index].clk;
+ } else
+ level->memory_clock = data->clock_vol_info.vdd_dep_on_fclk->entries[0].clk;
+
level->nonLocalMemoryFreq = 0;
level->nonLocalMemoryWidth = 0;