Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3edc38a0 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/radeon: fix firmware info version checks



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

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 162b20d2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1155,7 +1155,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
		    le16_to_cpu(firmware_info->info.usReferenceClock);
		p1pll->reference_div = 0;

		if (crev < 2)
		if ((frev < 2) && (crev < 2))
			p1pll->pll_out_min =
				le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
		else
@@ -1164,7 +1164,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
		p1pll->pll_out_max =
		    le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output);

		if (crev >= 4) {
		if (((frev < 2) && (crev >= 4)) || (frev >= 2)) {
			p1pll->lcd_pll_out_min =
				le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100;
			if (p1pll->lcd_pll_out_min == 0)