From: Rex Zhu Date: Sat, 29 Sep 2018 07:30:11 +0000 (+0800) Subject: drm/amdgpu: Don't reallocate ucode bo when suspend X-Git-Tag: v5.4-rc1~2273^2~6^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07da6aa47f84150ec6476e670b48e3e7158a4b15;p=platform%2Fkernel%2Flinux-rpi.git drm/amdgpu: Don't reallocate ucode bo when suspend driver don't release the ucode memory when suspend. so don't need to allocate bo when resume back. Reviewed-by: Evan Quan Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c index 9878212..adfeb93 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c @@ -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,