From: Joseph Greathouse Date: Thu, 15 Apr 2021 06:02:46 +0000 (+0800) Subject: drm/amdgpu: Copy MEC FW version to MEC2 if we skipped loading MEC2 X-Git-Tag: accepted/tizen/unified/20230118.172025~6864^2~24^2~261 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=47e5d79a45225f788713895afecd99a5a17e6979;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: Copy MEC FW version to MEC2 if we skipped loading MEC2 If we skipped loading MEC2 firmware separately from MEC, then MEC2 will be running the same firmware image. Copy the MEC version and feature numbers into MEC2 version and feature numbers. This is needed for things like GWS support, where we rely on knowing what version of firmware is running on MEC2. Leaving these MEC2 entries blank breaks our ability to version-check enables and workarounds. Signed-off-by: Joseph Greathouse Reviewed-by: Hawking Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 06811a1..a078a38 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c @@ -1587,6 +1587,9 @@ static int gfx_v9_0_init_cp_compute_microcode(struct amdgpu_device *adev, err = 0; adev->gfx.mec2_fw = NULL; } + } else { + adev->gfx.mec2_fw_version = adev->gfx.mec_fw_version; + adev->gfx.mec2_feature_version = adev->gfx.mec_feature_version; } if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {