drm/amdgpu: Query and report boot status
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 19 Oct 2023 06:47:53 +0000 (14:47 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Nov 2023 16:18:33 +0000 (12:18 -0400)
Query boot status and report boot errors. A follow
up change is needed to stop GPU initialization if boot
fails.

v2: only invoke the call for dGPU (Le/Lijo)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 920f52fc91f0ab1c83d25d0fe88d50dbb04f0b1e..fd8cd8e2d3f245570be8d4d199096b54052e2bee 100644 (file)
@@ -1074,6 +1074,8 @@ static int amdgpu_device_asic_init(struct amdgpu_device *adev)
            amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(11, 0, 0)) {
                amdgpu_psp_wait_for_bootloader(adev);
                ret = amdgpu_atomfirmware_asic_init(adev, true);
+               /* TODO: check the return val and stop device initialization if boot fails */
+               amdgpu_psp_query_boot_status(adev);
                return ret;
        } else {
                return amdgpu_atom_asic_init(adev->mode_info.atom_context);