]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
drm/amdgpu: Bypass asd if display hw is not available
authorHawking Zhang <Hawking.Zhang@amd.com>
Sun, 31 Mar 2024 04:59:17 +0000 (12:59 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2024 02:08:05 +0000 (22:08 -0400)
ASD is not needed by headless GPU.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 94b310fdb719d4c09717e0829b2c40adeae1b8d4..83bf86352267d2df7d919d4b5d3ebce48f013a3a 100644 (file)
@@ -1053,6 +1053,11 @@ static int psp_asd_initialize(struct psp_context *psp)
        if (amdgpu_sriov_vf(psp->adev) || !psp->asd_context.bin_desc.size_bytes)
                return 0;
 
+       /* bypass asd if display hardware is not available */
+       if (!amdgpu_device_has_display_hardware(psp->adev) &&
+           amdgpu_ip_version(psp->adev, MP0_HWIP, 0) >= IP_VERSION(13, 0, 10))
+               return 0;
+
        psp->asd_context.mem_context.shared_mc_addr  = 0;
        psp->asd_context.mem_context.shared_mem_size = PSP_ASD_SHARED_MEM_SIZE;
        psp->asd_context.ta_load_type                = GFX_CMD_ID_LOAD_ASD;