summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-09-17 13:24:50 +1000
committerDave Airlie <airlied@redhat.com>2020-09-18 06:15:24 +1000
commit37bff6542c4e140a11657406c1bab50a40329cc1 (patch)
tree05533f9202ffdf5a4ab13004134db4d4f6511612 /drivers/gpu/drm/radeon/radeon_ttm.c
parent7626168fd132009c79a0457bccc58014abc738f5 (diff)
downloadlinux-37bff6542c4e140a11657406c1bab50a40329cc1.tar.bz2
drm/ttm: move unbind into the tt destroy.
This moves unbind into the driver side on destroy paths. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200917043040.146575-4-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 76e24c6058ff..03e5ae4e3bf6 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -576,6 +576,7 @@ static void radeon_ttm_backend_destroy(struct ttm_bo_device *bdev, struct ttm_tt
{
struct radeon_ttm_tt *gtt = (void *)ttm;
+ radeon_ttm_backend_unbind(bdev, ttm);
ttm_tt_destroy_common(bdev, ttm);
ttm_dma_tt_fini(&gtt->ttm);
@@ -757,6 +758,7 @@ static void radeon_ttm_tt_destroy(struct ttm_bo_device *bdev,
struct radeon_device *rdev = radeon_get_rdev(bdev);
if (rdev->flags & RADEON_IS_AGP) {
+ ttm_agp_unbind(ttm);
ttm_tt_destroy_common(bdev, ttm);
ttm_agp_destroy(ttm);
return;