drm/ttm: move unbind into the tt destroy.
[sfrench/cifs-2.6.git] / drivers / gpu / drm / nouveau / nouveau_bo.c
index b239381498c3f8b9afdc559d1bd289a9ab82be16..4a020a3da3ddfe6d7f3ee8d1bbeefef8493c33b1 100644 (file)
@@ -1372,6 +1372,7 @@ nouveau_ttm_tt_destroy(struct ttm_bo_device *bdev,
 #if IS_ENABLED(CONFIG_AGP)
        struct nouveau_drm *drm = nouveau_bdev(bdev);
        if (drm->agp.bridge) {
+               ttm_agp_unbind(ttm);
                ttm_tt_destroy_common(bdev, ttm);
                ttm_agp_destroy(ttm);
                return;