diff options
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index d7b0feb7d47f..6cac0651d0f1 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -1006,6 +1006,7 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct | |||
1006 | struct _ATOM_SPREAD_SPECTRUM_INFO *ss_info; | 1006 | struct _ATOM_SPREAD_SPECTRUM_INFO *ss_info; |
1007 | uint8_t frev, crev; | 1007 | uint8_t frev, crev; |
1008 | struct radeon_atom_ss *ss = NULL; | 1008 | struct radeon_atom_ss *ss = NULL; |
1009 | int i; | ||
1009 | 1010 | ||
1010 | if (id > ATOM_MAX_SS_ENTRY) | 1011 | if (id > ATOM_MAX_SS_ENTRY) |
1011 | return NULL; | 1012 | return NULL; |
@@ -1023,12 +1024,17 @@ static struct radeon_atom_ss *radeon_atombios_get_ss_info(struct | |||
1023 | if (!ss) | 1024 | if (!ss) |
1024 | return NULL; | 1025 | return NULL; |
1025 | 1026 | ||
1026 | ss->percentage = le16_to_cpu(ss_info->asSS_Info[id].usSpreadSpectrumPercentage); | 1027 | for (i = 0; i < ATOM_MAX_SS_ENTRY; i++) { |
1027 | ss->type = ss_info->asSS_Info[id].ucSpreadSpectrumType; | 1028 | if (ss_info->asSS_Info[i].ucSS_Id == id) { |
1028 | ss->step = ss_info->asSS_Info[id].ucSS_Step; | 1029 | ss->percentage = |
1029 | ss->delay = ss_info->asSS_Info[id].ucSS_Delay; | 1030 | le16_to_cpu(ss_info->asSS_Info[i].usSpreadSpectrumPercentage); |
1030 | ss->range = ss_info->asSS_Info[id].ucSS_Range; | 1031 | ss->type = ss_info->asSS_Info[i].ucSpreadSpectrumType; |
1031 | ss->refdiv = ss_info->asSS_Info[id].ucRecommendedRef_Div; | 1032 | ss->step = ss_info->asSS_Info[i].ucSS_Step; |
1033 | ss->delay = ss_info->asSS_Info[i].ucSS_Delay; | ||
1034 | ss->range = ss_info->asSS_Info[i].ucSS_Range; | ||
1035 | ss->refdiv = ss_info->asSS_Info[i].ucRecommendedRef_Div; | ||
1036 | } | ||
1037 | } | ||
1032 | } | 1038 | } |
1033 | return ss; | 1039 | return ss; |
1034 | } | 1040 | } |