Skip to content

Commit

Permalink
drm/vc4: Free hang state before destroying BO cache.
Browse files Browse the repository at this point in the history
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: 2146136 ("drm/vc4: Add an interface for capturing the GPU state after a hang.")
  • Loading branch information
Eric Anholt committed Aug 20, 2016
1 parent 163195f commit def9652
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/vc4/vc4_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit def9652

Please sign in to comment.