summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-07-26 13:47:13 -0700
committerEric Anholt <eric@anholt.net>2016-08-19 19:17:32 -0700
commitdef96527707e1978a0c88e75d13b082f51460d5c (patch)
treeeab4cba5d2041bcf774f69f15bbbeb6ca998efbc /drivers/gpu
parent163195fc12cae0c8b5c0d74d3ba8d2c5f81773bc (diff)
drm/vc4: Free hang state before destroying BO cache.
The BO cache will complain if BOs are still allocated when we try to destroy it (since freeing those BOs would try to hit the cache). You could hit this if you were to unload the module after a GPU hang. Signed-off-by: Eric Anholt <eric@anholt.net> Fixes: 214613656b51 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index bfd1b5280ff3..fba2c831afe6 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -942,8 +942,8 @@ vc4_gem_destroy(struct drm_device *dev)
vc4->overflow_mem = NULL;
}
- vc4_bo_cache_destroy(dev);
-
if (vc4->hang_state)
vc4_free_hang_state(dev, vc4->hang_state);
+
+ vc4_bo_cache_destroy(dev);
}