xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Mon Aug 15 18:07:06 UTC 2016


 os/connection.c |    2 +-
 os/io.c         |    9 +++------
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit b380f3ac51f40ffefcde7d3db5c4c149f274246d
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Tue Aug 2 17:53:01 2016 +0900

    dix: Pass ClientPtr to FlushCallback
    
    This change has two effects:
    
    1. Only calls FlushCallbacks when we're actually flushing data to a
       client. The unnecessary FlushCallback calls could cause significant
       performance degradation with compositing, which is significantly
       reduced even without any driver changes.
    
    2. By passing the ClientPtr to FlushCallbacks, drivers can completely
       eliminate unnecessary flushing of GPU commands by keeping track of
       whether we're flushing any XDamageNotify events to the client for
       which the corresponding rendering commands haven't been flushed to
       the GPU yet.
    
    Reviewed-by: Adam Jackson <ajax at redha.com>
    Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/os/connection.c b/os/connection.c
index 4294ee7..a901ebf 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -908,7 +908,7 @@ CloseDownConnection(ClientPtr client)
     OsCommPtr oc = (OsCommPtr) client->osPrivate;
 
     if (FlushCallback)
-        CallCallbacks(&FlushCallback, NULL);
+        CallCallbacks(&FlushCallback, client);
 
     if (oc->output)
 	FlushClient(client, oc, (char *) NULL, 0);
diff --git a/os/io.c b/os/io.c
index 88edf12..ff0ec3d 100644
--- a/os/io.c
+++ b/os/io.c
@@ -598,9 +598,6 @@ FlushAllOutput(void)
     register ClientPtr client, tmp;
     Bool newoutput = NewOutputPending;
 
-    if (FlushCallback)
-        CallCallbacks(&FlushCallback, NULL);
-
     if (!newoutput)
         return;
 
@@ -767,9 +764,6 @@ WriteToClient(ClientPtr who, int count, const void *__buf)
             NewOutputPending = FALSE;
         }
 
-        if (FlushCallback)
-            CallCallbacks(&FlushCallback, NULL);
-
         return FlushClient(who, oc, buf, count);
     }
 
@@ -815,6 +809,9 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount)
     if (!notWritten)
         return 0;
 
+    if (FlushCallback)
+        CallCallbacks(&FlushCallback, who);
+
     todo = notWritten;
     while (notWritten) {
         long before = written;  /* amount of whole thing written */


More information about the xorg-commit mailing list