xserver: Branch 'master' - 4 commits

Adam Jackson ajax at kemper.freedesktop.org
Tue May 8 16:17:35 UTC 2018


 glx/glxcmds.c                  |    4 +++-
 hw/xwayland/xwayland-present.c |   21 ++++-----------------
 hw/xwayland/xwayland.h         |    1 -
 manpages.am                    |   30 +++++++++++++++---------------
 present/present_event.c        |    2 ++
 5 files changed, 24 insertions(+), 34 deletions(-)

New commits:
commit 0445705a8bbf76a5532997823ea8110daff26c6d
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 7 17:21:20 2018 -0400

    man: Fix automake seddery
    
    Because this is an automakefile, things inside @@ get expanded, which
    means your sed ends up saying s|/var/log|/var/log| and your manual pages
    still have @logdir@ in them. Fix this by hiding the @s inside a trivial
    character range, which keeps the pattern preserved all the way into the
    Makefile.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/manpages.am b/manpages.am
index 8a36b0c1c..15056905c 100644
--- a/manpages.am
+++ b/manpages.am
@@ -34,21 +34,21 @@ MAN_SUBSTS +=   -e 's|@vendorversion@|"$(PACKAGE_STRING)" "$(XORG_MAN_PAGE)"|' \
 
 # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS
 # 's|/,|/, |g' will add a space to help font path formatting
-MAN_SUBSTS += 	-e 's|@logdir@|$(logdir)|g' \
-		-e 's|@datadir@|$(datadir)|g' \
-		-e 's|@mandir@|$(mandir)|g' \
-		-e 's|@sysconfdir@|$(sysconfdir)|g' \
-		-e 's|@xconfigdir@|$(XCONFIGDIR)|g' \
-		-e 's|@xkbdir@|$(XKB_BASE_DIRECTORY)|g' \
-		-e 's|@XKB_DFLT_RULES@|$(XKB_DFLT_RULES)|g' \
-		-e 's|@XKB_DFLT_MODEL@|$(XKB_DFLT_MODEL)|g' \
-		-e 's|@XKB_DFLT_LAYOUT@|$(XKB_DFLT_LAYOUT)|g' \
-		-e 's|@XKB_DFLT_VARIANT@|$(XKB_DFLT_VARIANT)|g' \
-		-e 's|@XKB_DFLT_OPTIONS@|$(XKB_DFLT_OPTIONS)|g' \
-		-e 's|@bundle_id_prefix@|$(BUNDLE_ID_PREFIX)|g' \
-		-e 's|@modulepath@|$(DEFAULT_MODULE_PATH)|g' \
-		-e 's|@suid_wrapper_dir@|$(SUID_WRAPPER_DIR)|g' \
-		-e 's|@default_font_path@|$(COMPILEDDEFAULTFONTPATH)|g' \
+MAN_SUBSTS += 	-e 's|[@]logdir[@]|$(logdir)|g' \
+		-e 's|[@]datadir[@]|$(datadir)|g' \
+		-e 's|[@]mandir[@]|$(mandir)|g' \
+		-e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \
+		-e 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' \
+		-e 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' \
+		-e 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' \
+		-e 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' \
+		-e 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' \
+		-e 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' \
+		-e 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' \
+		-e 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' \
+		-e 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' \
+		-e 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' \
+		-e 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' \
 		-e '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g'
 
 .man.$(APP_MAN_SUFFIX):
commit 9f21872ad8591c1f6f8ea1e466f212c3582d3c33
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 7 17:21:19 2018 -0400

    glx: Be sure to set an error for ghost contexts
    
    Otherwise the caller is going to return garbage memory for the error
    value.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>

diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index 6785e9db3..54d452e58 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -137,8 +137,10 @@ validGlxContext(ClientPtr client, XID id, int access_mode,
                 __GLXcontext ** context, int *err)
 {
     /* no ghost contexts */
-    if (id & SERVER_BIT)
+    if (id & SERVER_BIT) {
+        *err = __glXError(GLXBadContext);
         return FALSE;
+    }
 
     *err = dixLookupResourceByType((void **) context, id,
                                    __glXContextRes, client, access_mode);
commit b9f415cbad47412bfb218cf7375d0c2856a27d1b
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 7 17:21:18 2018 -0400

    present: Fix swapping of PresentCompleteNotify events
    
    The code would fall through to the PresentIdleNotify case, and nothing
    good would come of it.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

diff --git a/present/present_event.c b/present/present_event.c
index c222dd5ff..9aebfdfce 100644
--- a/present/present_event.c
+++ b/present/present_event.c
@@ -91,6 +91,7 @@ present_event_swap(xGenericEvent *from, xGenericEvent *to)
         swapl(&c->serial);
         swapll(&c->ust);
         swapll(&c->msc);
+        break;
     }
     case PresentIdleNotify:
     {
@@ -99,6 +100,7 @@ present_event_swap(xGenericEvent *from, xGenericEvent *to)
         swapl(&c->window);
         swapl(&c->serial);
         swapl(&c->idle_fence);
+        break;
     }
     }
 }
commit cc66777d85f3509b0f9dfc9210d0a0415a2a388d
Author: Adam Jackson <ajax at redhat.com>
Date:   Mon May 7 17:21:17 2018 -0400

    xwayland: Don't create a "fake" crtc for Present
    
    We probably don't want a fake crtc to be visible to clients, and we
    definitely don't want to generate events every time we create such a
    fake (which would happen as a side effect from RRCrtcCreate hitting
    RRTellChanged). As it happens we're not actually using that crtc for
    anything because xwayland doesn't store any state on the crtc object,
    so it suffices to use the real crtc for the screen.
    
    Signed-off-by: Adam Jackson <ajax at redhat.com>
    Tested-by: Roman Gilg <subdiff at gmail.com>
    Reviewed-by: Roman Gilg <subdiff at gmail.com>

diff --git a/hw/xwayland/xwayland-present.c b/hw/xwayland/xwayland-present.c
index ae9f47eba..b5ae80dcf 100644
--- a/hw/xwayland/xwayland-present.c
+++ b/hw/xwayland/xwayland-present.c
@@ -51,14 +51,10 @@ xwl_present_window_get_priv(WindowPtr window)
     struct xwl_present_window *xwl_present_window = xwl_present_window_priv(window);
 
     if (xwl_present_window == NULL) {
-        ScreenPtr screen = window->drawable.pScreen;
-
         xwl_present_window = calloc (1, sizeof (struct xwl_present_window));
         if (!xwl_present_window)
             return NULL;
 
-        xwl_present_window->crtc_fake = RRCrtcCreate(screen,
-                                                     xwl_present_window);
         xwl_present_window->window = window;
         xwl_present_window->msc = 1;
         xwl_present_window->ust = GetTimeInMicros();
@@ -131,8 +127,6 @@ xwl_present_cleanup(WindowPtr window)
     if (xwl_window && xwl_window->present_window == window)
         xwl_window->present_window = NULL;
 
-    RRCrtcDestroy(xwl_present_window->crtc_fake);
-
     if (xwl_present_window->frame_callback) {
         wl_callback_destroy(xwl_present_window->frame_callback);
         xwl_present_window->frame_callback = NULL;
@@ -306,10 +300,13 @@ static RRCrtcPtr
 xwl_present_get_crtc(WindowPtr present_window)
 {
     struct xwl_present_window *xwl_present_window = xwl_present_window_get_priv(present_window);
+    rrScrPrivPtr rr_private;
+
     if (xwl_present_window == NULL)
         return NULL;
 
-    return xwl_present_window->crtc_fake;
+    rr_private = rrGetScrPriv(present_window->drawable.pScreen);
+    return rr_private->crtcs[0];
 }
 
 static int
@@ -342,9 +339,6 @@ xwl_present_queue_vblank(WindowPtr present_window,
     if (!xwl_window)
         return BadMatch;
 
-    if (xwl_present_window->crtc_fake != crtc)
-        return BadRequest;
-
     if (xwl_window->present_window &&
             xwl_window->present_window != present_window)
         return BadMatch;
@@ -454,13 +448,6 @@ xwl_present_flip(WindowPtr present_window,
     if (!xwl_window)
         return FALSE;
 
-    /*
-     * Make sure the client doesn't try to flip to another crtc
-     * than the one created for 'xwl_window'.
-     */
-    if (xwl_present_window->crtc_fake != crtc)
-        return FALSE;
-
     present_box = RegionExtents(&present_window->winSize);
     damage_box = RegionExtents(damage);
 
diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h
index ce290d490..25112e2cb 100644
--- a/hw/xwayland/xwayland.h
+++ b/hw/xwayland/xwayland.h
@@ -182,7 +182,6 @@ struct xwl_present_window {
     WindowPtr window;
     struct xorg_list link;
 
-    RRCrtcPtr crtc_fake;
     uint64_t msc;
     uint64_t ust;
 


More information about the xorg-commit mailing list