drm/amdgpu/sriov:fix memory leak after gpu reset
authorMonk Liu <Monk.Liu@amd.com>
Fri, 15 Sep 2017 06:35:09 +0000 (14:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 19:14:13 +0000 (15:14 -0400)
commitd59c026b7be1dd9ae00b54d1916a90775fe3bdda
tree20d3703306567c9bdf7685bb80868038b3491b30
parenteb01abc7c4fd1faa26d0787f410894d9c704eb60
drm/amdgpu/sriov:fix memory leak after gpu reset

GPU reset will require all hw doing hw_init thus
ucode_init_bo will be invoked again, which lead to
memory leak

skip the fw_buf allocation during sriov gpu reset to avoid
memory leak.

Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c