[Intel-gfx] [PATCH 1/2] Mark the server as terminate-on-last-client-exit rather than regenning.

Eric Anholt eric at anholt.net
Wed Apr 22 05:27:31 CEST 2009

It's a constant source of suffereing for both developers, and users who
experience the crashes.  A -pogo of the server is 2.7 seconds on my machine
with KMS, and we know we've got some low-hanging fruit, so we're not that
concerned about the cost of fully restarting the server.  (The real costs
are in the ScreenInit, anyway).
Signed-off-by: Eric Anholt <eric at anholt.net>
 src/i830_driver.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 2249a99..3c27745 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -2950,6 +2950,14 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
    pScrn = xf86Screens[pScreen->myNum];
    pI830 = I830PTR(pScrn);
+   /* Flag the server as being due to exit after the last client exits.
+    * Normally, the server tries to CloseScreen then ScreenInit again, but
+    * this had led to such longstanding stability and code complexity problems
+    * that we stopped trying to support it.  As of KMS, server restart is
+    * fast enough, anyway.
+    */
+   dispatchExceptionAtReset |= DE_TERMINATE;
    if (!pI830->use_drm_mode)
        hwp = VGAHWPTR(pScrn);

More information about the Intel-gfx mailing list