xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Mon Oct 27 13:37:00 PDT 2014


 hw/xfree86/ramdac/xf86Cursor.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit df6a3a07f60c40bab2b59b9b3ba0c20c8fb7e95d
Author: Yogish Kulkarni <yogishk at nvidia.com>
Date:   Wed Oct 22 12:55:28 2014 +0530

    Skip SetCursor when vtSema is FALSE.
    
    Consider below sequence -
    1) Cursor is removed : isUp will be FALSE if HW cursor is set.
    2) VT switched away from X : vtSema becomes FALSE.
    3) xf86CursorSetCursor is called with non-null CursorPtr :
    Saves the passed in CursorPtr, fallbacks to SW cursor and invokes
    spriteFuncs->SetCursor which saves the area under cursor and restores
    the cursor. This sets isUp to TRUE and as vtSema is FALSE saved data
    is garbage.
    4) VT switched to X : vtSema becomes TRUE. xf86Cursor enable fb access
    is called which will remove the SW cursor, i.e copies saved data in #3
    to screen.
    
    This results to momentary garbage data on screen. Hence when !vtSema
    skip spriteFuncs->SetCursor.
    
    X.Org Bug 85313 <https://bugs.freedesktop.org/show_bug.cgi?id=85313>
    
    Signed-off-by: Yogish Kulkarni <yogishk at nvidia.com>
    Reviewed-by: Adam Jackson <ajax at redhat.com>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/hw/xfree86/ramdac/xf86Cursor.c b/hw/xfree86/ramdac/xf86Cursor.c
index fac6822..4ff1b59 100644
--- a/hw/xfree86/ramdac/xf86Cursor.c
+++ b/hw/xfree86/ramdac/xf86Cursor.c
@@ -332,8 +332,10 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs,
         ScreenPriv->HotX = cursor->bits->xhot;
         ScreenPriv->HotY = cursor->bits->yhot;
 
-        if (!infoPtr->pScrn->vtSema)
+        if (!infoPtr->pScrn->vtSema) {
             ScreenPriv->SavedCursor = cursor;
+            return;
+        }
 
         if (infoPtr->pScrn->vtSema && xorg_list_is_empty(&pScreen->pixmap_dirty_list) &&
             (ScreenPriv->ForceHWCursorCount ||


More information about the xorg-commit mailing list