summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2018-03-09 14:42:54 +0100
committerAlex Deucher <alexander.deucher@amd.com>2018-03-14 15:08:39 -0500
commit7f8fb919655ef3011b01bb114fef42107957860a (patch)
tree7a30ceb62fcc5c866d5b295f2cd09f92af301065 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
parenteab3de23a1639ec9419c1f9239ce651d3c82e7d6 (diff)
downloadop-kernel-dev-7f8fb919655ef3011b01bb114fef42107957860a.zip
op-kernel-dev-7f8fb919655ef3011b01bb114fef42107957860a.tar.gz
drm/amdgpu: fix prime teardown order
We unmapped imported DMA-bufs when the GEM handle was dropped, not when the hardware was done with the buffere. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> CC: stable@vger.kernel.org Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_object.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index ec6ec1f..fc72060 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -60,6 +60,8 @@ static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)
amdgpu_bo_kunmap(bo);
+ if (bo->gem_base.import_attach)
+ drm_prime_gem_destroy(&bo->gem_base, bo->tbo.sg);
drm_gem_object_release(&bo->gem_base);
amdgpu_bo_unref(&bo->parent);
if (!list_empty(&bo->shadow_list)) {
OpenPOWER on IntegriCloud