]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/amdgpu: Don't reallocate ucode bo when suspend
authorRex Zhu <Rex.Zhu@amd.com>
Sat, 29 Sep 2018 07:30:11 +0000 (15:30 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Oct 2018 22:07:57 +0000 (17:07 -0500)
driver don't release the ucode memory when suspend. so don't
need to allocate bo when resume back.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c

index 987821232c420289f8f201c319e33534a8e93a9d..adfeb93c612e38a52a6c277be742414534a0c3db 100644 (file)
@@ -434,7 +434,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
                return 0;
        }
 
-       if (!adev->in_gpu_reset) {
+       if (!adev->in_gpu_reset && !adev->in_suspend) {
                err = amdgpu_bo_create_kernel(adev, adev->firmware.fw_size, PAGE_SIZE,
                                        amdgpu_sriov_vf(adev) ? AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
                                        &adev->firmware.fw_buf,