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

Commit a8a04c99 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: fix firmware info version checks



Some of the checks didn't handle frev 2 tables properly.
amdgpu doesn't support any tables pre-frev 2, so drop
the checks.

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 3edc38a0
Loading
Loading
Loading
Loading
+8 −17
Original line number Diff line number Diff line
@@ -551,16 +551,11 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev)
		    le16_to_cpu(firmware_info->info.usReferenceClock);
		ppll->reference_div = 0;

		if (crev < 2)
			ppll->pll_out_min =
				le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
		else
		ppll->pll_out_min =
			le32_to_cpu(firmware_info->info_12.ulMinPixelClockPLL_Output);
		ppll->pll_out_max =
		    le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output);

		if (crev >= 4) {
		ppll->lcd_pll_out_min =
			le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100;
		if (ppll->lcd_pll_out_min == 0)
@@ -569,10 +564,6 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev)
			le16_to_cpu(firmware_info->info_14.usLcdMaxPixelClockPLL_Output) * 100;
		if (ppll->lcd_pll_out_max == 0)
			ppll->lcd_pll_out_max = ppll->pll_out_max;
		} else {
			ppll->lcd_pll_out_min = ppll->pll_out_min;
			ppll->lcd_pll_out_max = ppll->pll_out_max;
		}

		if (ppll->pll_out_min == 0)
			ppll->pll_out_min = 64800;