Commit 429a1118 authored by James Zhu's avatar James Zhu Committed by Alex Deucher

drm/amdgpu/vcn: update ucode setup

Use common amdgpu_vcn_setup_ucode for ucode setup.
Signed-off-by: default avatarJames Zhu <James.Zhu@amd.com>
Acked-by: default avatarLeo Liu <leo.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 53054e9a
...@@ -87,16 +87,7 @@ static int vcn_v4_0_3_sw_init(void *handle) ...@@ -87,16 +87,7 @@ static int vcn_v4_0_3_sw_init(void *handle)
if (r) if (r)
return r; return r;
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { amdgpu_vcn_setup_ucode(adev);
const struct common_firmware_header *hdr;
hdr = (const struct common_firmware_header *)adev->vcn.fw->data;
adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].ucode_id = AMDGPU_UCODE_ID_VCN;
adev->firmware.ucode[AMDGPU_UCODE_ID_VCN].fw = adev->vcn.fw;
adev->firmware.fw_size +=
ALIGN(le32_to_cpu(hdr->ucode_size_bytes), PAGE_SIZE);
DRM_DEV_INFO(adev->dev, "Will use PSP to load VCN firmware\n");
}
r = amdgpu_vcn_resume(adev); r = amdgpu_vcn_resume(adev);
if (r) if (r)
......
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