summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/powerplay/hwmgr
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2017-05-23 13:26:14 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-05-25 23:11:58 +0300
commitf0846b24b678920e242e5c22f406719e203e2eb5 (patch)
tree6cf16a07996701166260d7e6f67542cf94945472 /drivers/gpu/drm/amd/powerplay/hwmgr
parent98990faef16ea3109d850f5bf49977897e509e54 (diff)
downloadlinux-f0846b24b678920e242e5c22f406719e203e2eb5.tar.xz
drm/amd/powerplay: using MinFClock/MaxFclock to report Min/Max memory clock limits
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>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/rv_hwmgr.c
index 75cede8bd8d5..8bbccd49290b 100644
--- 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(struct pp_hwmgr *hwmgr, const struct pp_hw_p
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(struct pp_hwmgr *hwmgr, const struct pp_hw_p
}
}
+ 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;