xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 23 17:04:05 UTC 2019


 hw/xfree86/drivers/modesetting/driver.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 456dff1bf890459840718339279dcb84d36531eb
Author: Alex Goins <agoins at nvidia.com>
Date:   Thu Dec 12 20:18:53 2019 -0600

    modesetting: Fix msSharePixmapBacking Segfault Regression
    
    Commit cb1b1e184 modified msSharePixmapBacking() to derive modesettingPtr from
    the 'screen' argument. Unfortunately, the name of the argument is misleading --
    the screen is the slave screen. If the master is modesetting,
    and the slave is not modesetting, it will segfault.
    
    To fix the problem, this change derives modesettingPtr from
    ppix->drawable.pScreen. This method is already used when calling
    ms->glamor.shareable_fd_from_pixmap() later in the function.
    
    To avoid future issues, this change also renames the 'screen' argument to
    'slave'.
    
    Signed-off-by: Alex Goins <agoins at nvidia.com>
    Reviewed-by: Michel Dänzer <mdaenzer at redhat.com>

diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index de7280084..149040e30 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -1443,10 +1443,11 @@ CreateScreenResources(ScreenPtr pScreen)
 }
 
 static Bool
-msSharePixmapBacking(PixmapPtr ppix, ScreenPtr screen, void **handle)
+msSharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **handle)
 {
 #ifdef GLAMOR_HAS_GBM
-    modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
+    modesettingPtr ms =
+        modesettingPTR(xf86ScreenToScrn(ppix->drawable.pScreen));
     int ret;
     CARD16 stride;
     CARD32 size;


More information about the xorg-commit mailing list