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

Commit 19aede77 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: move firmware loading type setup to common code



No need to replicate it in several places.

Reviewed-by: default avatarRex Zhu <rezhu@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a9f36360
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -856,6 +856,8 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)
		dev_warn(adev->dev, "lockup_timeout msut be > 0, adjusting to 10000\n");
		amdgpu_lockup_timeout = 10000;
	}

	adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
}

/**
+0 −2
Original line number Diff line number Diff line
@@ -1887,8 +1887,6 @@ static int cik_common_early_init(void *handle)
		return -EINVAL;
	}

	adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);

	amdgpu_device_get_pcie_info(adev);

	return 0;
+0 −2
Original line number Diff line number Diff line
@@ -692,8 +692,6 @@ static int soc15_common_early_init(void *handle)
		xgpu_ai_mailbox_set_irq_funcs(adev);
	}

	adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);

	amdgpu_device_get_pcie_info(adev);

	return 0;
+0 −3
Original line number Diff line number Diff line
@@ -1097,9 +1097,6 @@ static int vi_common_early_init(void *handle)
		xgpu_vi_mailbox_set_irq_funcs(adev);
	}

	/* vi use smc load by default */
	adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);

	amdgpu_device_get_pcie_info(adev);

	return 0;