drm/ttm: fix re-init of global structures
authorChristian König <christian.koenig@amd.com>
Tue, 16 Apr 2019 09:49:17 +0000 (11:49 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 19 Apr 2019 16:11:20 +0000 (11:11 -0500)
commitbd4264112f93045704731850c5e4d85db981cd85
treef14d540c09f52d5f3d629af72b5b11e5f7fd7f42
parent00fd14ff3017f64a9a03a08291e4be0d87bedc17
drm/ttm: fix re-init of global structures

When a driver unloads without unloading TTM we don't correctly
clear the global structures leading to errors on re-init.

Next step should probably be to remove the global structures and
kobjs all together, but this is tricky since we need to maintain
backward compatibility.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Tested-by: Karol Herbst <kherbst@redhat.com>
CC: stable@vger.kernel.org # 5.0.x
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_memory.c
include/drm/ttm/ttm_bo_driver.h