summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk@armlinux.org.uk>2016-11-23 00:25:40 +0000
committerRussell King <rmk@armlinux.org.uk>2016-11-23 00:25:40 +0000
commitee14c643bf22764d1a2949250e8851d36840c740 (patch)
tree40d7cabb2857d80a885347c8022d1d896fba432a
parentf12188ff545cf31dc5ba3234172ef2f3053d2521 (diff)
etnaviv: fix segfault in CloseScreen
Ensure all pending operations have been committed and waited to complete when shutting down to avoid segfaults when cleaning up. This can happen when trying to free the screen pixmap, which may be in a fenced state. Signed-off-by: Russell King <rmk@armlinux.org.uk>
-rw-r--r--etnaviv/etnaviv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/etnaviv/etnaviv.c b/etnaviv/etnaviv.c
index 2662fc3..a737f2b 100644
--- a/etnaviv/etnaviv.c
+++ b/etnaviv/etnaviv.c
@@ -503,6 +503,9 @@ static Bool etnaviv_CloseScreen(CLOSE_SCREEN_ARGS_DECL)
etnaviv_dri2_CloseScreen(CLOSE_SCREEN_ARGS);
#endif
+ /* Ensure everything has been committed */
+ etnaviv_commit(etnaviv, TRUE, NULL);
+
pixmap = pScreen->GetScreenPixmap(pScreen);
etnaviv_free_pixmap(pixmap);