xserver: Branch 'server-1.20-branch'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 21 21:56:23 UTC 2020


 randr/rrcrtc.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 1179938c179a6e96170275e24adac3325539be65
Author: Alex Goins <agoins at nvidia.com>
Date:   Thu Jul 2 20:12:43 2020 -0500

    randr: Check rrPrivKey in RRHasScanoutPixmap()
    
    RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether
    or not RandR has been initialized.
    
    As mentioned in commit 4226c6d, it's possible that RandR has not been
    initialized if the server is configured with Xinerama and there is more than one
    X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion
    failure that aborts the server:
    
          Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion
          key->initialized' failed.
    
    Just as in commit 4226c6d, fix the problem by checking
    dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv.
    
    Signed-off-by: Alex Goins <agoins at nvidia.com>
    Acked-by: Olivier Fourdan <ofourdan at redhat.com>
    (cherry picked from commit 8eeff5d7880c6885ee6f206355599f13d739afa7)

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index ae7e30605..7839a0eda 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -2012,9 +2012,15 @@ RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable)
 Bool
 RRHasScanoutPixmap(ScreenPtr pScreen)
 {
-    rrScrPriv(pScreen);
+    rrScrPrivPtr pScrPriv;
     int i;
 
+    /* Bail out if RandR wasn't initialized. */
+    if (!dixPrivateKeyRegistered(rrPrivKey))
+        return FALSE;
+
+    pScrPriv = rrGetScrPriv(pScreen);
+
     if (!pScreen->is_output_slave)
         return FALSE;
 


More information about the xorg-commit mailing list