drm/amdgpu: finalizing mem_partitions at the end of GMC v9 sw_fini
authorLe Ma <le.ma@amd.com>
Mon, 13 Nov 2023 10:05:34 +0000 (18:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:45:00 +0000 (18:45 +0100)
commita8f5cd042305f18f67db0be7732c6702798073e6
tree50374af18ed17ce8fdc57006f15b5d6b7dedad69
parent3a56e61b57791f2e4db66a80b723b8515ea5880f
drm/amdgpu: finalizing mem_partitions at the end of GMC v9 sw_fini

[ Upstream commit bdb72185d310fc8049c7ea95221d640e9e7165e5 ]

The valid num_mem_partitions is required during ttm pool fini,
thus move the cleanup at the end of the function.

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c