]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: Split amdgpu_ucode_init/fini_bo into two functions
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 9 Oct 2018 05:55:49 +0000 (13:55 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Oct 2018 19:48:52 +0000 (14:48 -0500)
commit62873ce7d1196f6d63e6f68262ffb4257e06dc12
tree09cafe09785721ceba14450917a6461daeb5e5bf
parent6ff2292d2f3f6383c788e061f687ea2d1fe647fd
drm/amdgpu: Split amdgpu_ucode_init/fini_bo into two functions

1. one is for create/free bo when init/fini
2. one is for fill the bo before fw loading

the ucode bo only need to be created when load driver
and free when driver unload.

when resume/reset, driver only need to re-fill the bo
if the bo is allocated in vram.

Suggested by Christian.

v2: Return error when bo create failed.

Reviewed-by: Alex Deucher <alexander.deucher@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_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h