FAILED: patch "[PATCH] drm/amdgpu: fix prime teardown order" failed to apply to 4.16-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
7f8fb919655ef3011b01bb114fef42107957860aMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <[email protected]>
Date: Fri, 9 Mar 2018 14:42:54 +0100
Subject: [PATCH] drm/amdgpu: fix prime teardown order
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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 <[email protected]>
Reviewed-by Michel Dänzer <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -2
@@ -36,8 +36,6 @@ void amdgpu_gem_object_free(struct drm_gem_object *gobj)struct amdgpu_bo *robj =gem_to_amdgpu_bo (gobj);if (robj) { -if (robj->gem_base.import_attach) -drm_prime_gem_destroy (&robj->gem_base, robj->tbo.sg);amdgpu_mn_unregister (robj);amdgpu_bo_unref (&robj); }
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -0
@@ -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)) {