Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/radeon: fix firmware info version checks

Some of the checks didn't handle frev 2 tables properly.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

+2 -2
+2 -2
drivers/gpu/drm/radeon/radeon_atombios.c
··· 1155 1155 le16_to_cpu(firmware_info->info.usReferenceClock); 1156 1156 p1pll->reference_div = 0; 1157 1157 1158 - if (crev < 2) 1158 + if ((frev < 2) && (crev < 2)) 1159 1159 p1pll->pll_out_min = 1160 1160 le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output); 1161 1161 else ··· 1164 1164 p1pll->pll_out_max = 1165 1165 le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output); 1166 1166 1167 - if (crev >= 4) { 1167 + if (((frev < 2) && (crev >= 4)) || (frev >= 2)) { 1168 1168 p1pll->lcd_pll_out_min = 1169 1169 le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100; 1170 1170 if (p1pll->lcd_pll_out_min == 0)