FAILED: patch "[PATCH] drm/radeon: 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
0660b58c9038f5ef94b8fe33716449945ea786e5Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <[email protected]>
Date: Fri, 9 Mar 2018 14:44:32 +0100
Subject: [PATCH] drm/radeon: 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/radeon/radeon_gem.c +0 -2
@@ -34,8 +34,6 @@ void radeon_gem_object_free(struct drm_gem_object *gobj)struct radeon_bo *robj =gem_to_radeon_bo (gobj);if (robj) { -if (robj->gem_base.import_attach) -drm_prime_gem_destroy (&robj->gem_base, robj->tbo.sg);radeon_mn_unregister (robj);radeon_bo_unref (&robj); }
drivers/gpu/drm/radeon/radeon_object.c +2 -0
@@ -82,6 +82,8 @@ static void radeon_ttm_bo_destroy(struct ttm_buffer_object *tbo)mutex_unlock (&bo->rdev->gem.mutex);radeon_bo_clear_surface_reg (bo);WARN_ON_ONCE (!list_empty (&bo->va)); +if (bo->gem_base.import_attach) +drm_prime_gem_destroy (&bo->gem_base, bo->tbo.sg);drm_gem_object_release (&bo->gem_base);kfree (bo); }