]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: Use GEM obj reference for KFD BOs
authorFelix Kuehling <Felix.Kuehling@amd.com>
Tue, 5 May 2020 18:02:43 +0000 (14:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:23:04 +0000 (08:23 +0200)
commit17967784281ff66fe6bc9072c314b82f6b27a59d
tree8a19e6d548ec5ca7f255a130064e6c1fd7c77744
parentcc9a3dad01bde25dc1d0731daf9769075884f4e0
drm/amdgpu: Use GEM obj reference for KFD BOs

[ Upstream commit 39b3128d7ffd44e400e581e6f49e88cb42bef9a1 ]

Releasing the AMDGPU BO ref directly leads to problems when BOs were
exported as DMA bufs. Releasing the GEM reference makes sure that the
AMDGPU/TTM BO is not freed too early.

Also take a GEM reference when importing BOs from DMABufs to keep
references to imported BOs balances properly.

Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Tested-by: Alex Sierra <alex.sierra@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c