drm/amd/amdgpu: fix gmc bo pin count leak in SRIOV
authorJingwen Chen <Jingwen.Chen2@amd.com>
Tue, 14 Dec 2021 03:50:39 +0000 (11:50 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 14 Dec 2021 21:10:00 +0000 (16:10 -0500)
commit948e7ce01413b71395723aaf846015062aea3a43
treef8e5fbde1b28f1d3b9eb194eb198afc29d373d77
parent85dfc1d692c9434c37842e610be37cd4ae4e0081
drm/amd/amdgpu: fix gmc bo pin count leak in SRIOV

[Why]
gmc bo will be pinned during loading amdgpu and reset in SRIOV while
only unpinned in unload amdgpu

[How]
add amdgpu_in_reset and sriov judgement to skip pin bo

v2: fix wrong judgement

Signed-off-by: Jingwen Chen <Jingwen.Chen2@amd.com>
Reviewed-by: Horace Chen <horace.chen@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c