Commit 1d8b86fd authored by Alex Deucher's avatar Alex Deucher Committed by Ben Hutchings

drm/radeon: fix firmware info version checks

commit 3edc38a0 upstream.

Some of the checks didn't handle frev 2 tables properly.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 4aacac4c
...@@ -1128,7 +1128,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) ...@@ -1128,7 +1128,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
le16_to_cpu(firmware_info->info.usReferenceClock); le16_to_cpu(firmware_info->info.usReferenceClock);
p1pll->reference_div = 0; p1pll->reference_div = 0;
if (crev < 2) if ((frev < 2) && (crev < 2))
p1pll->pll_out_min = p1pll->pll_out_min =
le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output); le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
else else
...@@ -1137,7 +1137,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev) ...@@ -1137,7 +1137,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
p1pll->pll_out_max = p1pll->pll_out_max =
le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output); le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output);
if (crev >= 4) { if (((frev < 2) && (crev >= 4)) || (frev >= 2)) {
p1pll->lcd_pll_out_min = p1pll->lcd_pll_out_min =
le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100; le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100;
if (p1pll->lcd_pll_out_min == 0) if (p1pll->lcd_pll_out_min == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment